adding in readonly annotations to support M365 federated connections - #3799
Open
chrisolver wants to merge 1 commit into
Open
adding in readonly annotations to support M365 federated connections#3799chrisolver wants to merge 1 commit into
chrisolver wants to merge 1 commit into
Conversation
chrisolver
requested review from
Alekhya-Polavarapu,
Aniruddh Munde (Aniruddh25),
Jerry Nixon (JerryNixon),
RubenCerna2079,
aaronburtle,
Mohit G (gmohit21),
rusamant,
Sourabh Jain (sourabh1007),
Souvik Ghosh (souvikghosh04),
Stuart Padley (stuartpa) and
vadeveka
as code owners
September 2, 2026 06:44
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Author
|
@microsoft-github-policy-service agree |
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to tool metadata annotations, are consistent across the updated tools, and do not affect execution logic.
Pull request overview
This pull request updates MCP built-in tool metadata to mark read-only operations with ToolAnnotations.ReadOnlyHint = true, improving downstream interoperability (notably M365 federated connections) by clearly advertising that these tools are non-mutating.
Changes:
- Added
Annotations = new ToolAnnotations { ReadOnlyHint = true }toReadRecordsTooltool metadata. - Added
Annotations = new ToolAnnotations { ReadOnlyHint = true }toDescribeEntitiesTooltool metadata. - Added
Annotations = new ToolAnnotations { ReadOnlyHint = true }toAggregateRecordsTooltool metadata (cached metadata instance).
File summaries
| File | Description |
|---|---|
| src/Azure.DataApiBuilder.Mcp/BuiltInTools/ReadRecordsTool.cs | Marks the read_records MCP tool as read-only via tool annotations. |
| src/Azure.DataApiBuilder.Mcp/BuiltInTools/DescribeEntitiesTool.cs | Marks the describe_entities MCP tool as read-only via tool annotations. |
| src/Azure.DataApiBuilder.Mcp/BuiltInTools/AggregateRecordsTool.cs | Marks the aggregate_records MCP tool as read-only via tool annotations on the cached metadata object. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds read-only annotations to the MCP aggregate records tool so it is correctly advertised as a non-mutating operation for M365 federated connections. Solving #3798
What changed
AggregateRecordsToolto includeToolAnnotationsReadOnlyHint = trueon the tool definitionWhy
This helps the MCP tool metadata reflect that the aggregate records operation is read-only, which is important for M365 federated connection support and for consumers that rely on tool annotations to understand operation safety.
Impact
Files changed
src/Azure.DataApiBuilder.Mcp/BuiltInTools/AggregateRecordsTool.cssrc/Azure.DataApiBuilder.Mcp/BuiltInTools/DescribeEntitiesTool.cssrc/Azure.DataApiBuilder.Mcp/BuiltInTools/ReadRecordsTool.csNotes
This is a small metadata-only change with low risk.