- Notifications
You must be signed in to change notification settings - Fork1.2k
SEP-1862: Tool Resolution#1862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
SEP-1862: Tool Resolution#1862
Uh oh!
There was an error while loading.Please reload this page.
Conversation
SamMorrowDrums commentedNov 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Coincidentally there may already be a case for a preflight request for other purposes. As@findleyrmentioned on Discord, we might not be able to support forwarding of 403 errors during tool calls due toSEP-1699 and so we might wish to enable a preflight checks to supportscope challenges also. cc@dend |
findleyr commentedNov 24, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
By comparison, LSP has a notion of 'resolve', which is when the client asks the server to 'finish filling out' a particular stub. For example That's slightly different, because the client isn't passing in any specific arguments in the resolve request: it's simply exchanging the stub for a fully filled-out version, but I think there's something to be learned from the design: we probably want to avoid a future where there are a bunch of separate preflight checks for a single tool call--it would be better to consolidate them into a single exchange. I'm not sure what that means, concretely: do we return the entire tool from the preflight check, rather than just its annotations? |
- Update creation date to 2025-11-21- Consolidate duplicate file/API examples into single table-based example- Remove redundant 'Why Return Full Tool?' section (already in Rationale)- Clean up TypeScript comments- Apply prettier formatting
SamMorrowDrums commentedNov 25, 2025
Revised DirectionThanks@findleyr for the excellent feedback on adopting an LSP-inspired resolve pattern. I've substantially revised this SEP based on your suggestions and additional considerations around extensibility. Key ChangesRenamed concept:
Returns full Tool object instead of just annotations
Added LSP context with comparison table
Added Future Extensibility section
Cleaned up examples
Open for DiscussionI'd appreciate feedback on:
The goal is a clean, extensible foundation that avoids the "proliferation of preflight methods" concern@findleyr raised. |
…eristics, and related SEPs- Add authorization delegation context example (based on SEP-214 token exchange)- Add execution characteristics example for long-running task indication- Update motivation to mention execution characteristics and auth boundary crossings- Add SEP-1385 (Tool Execution Requirements) to Related Work- Add SEP-214 (On-Behalf-Of Token Exchange) to Related Work
SamMorrowDrums commentedNov 26, 2025
As an example trying to do Scope Challenge for GitHub MCP, I would ideally allow public repo access without a repo scope challenge, however then I won't be able to send a challenge for accessing private repos, so the granularity of 1 scope for one tool is definitely not sufficient for our use case. In order to allow least privilege generally, I am forced to provide a scope challenge for all available data, which is a problem when a legitimate user wants to access only public repo data and not give the token full repo scope. This is currently not solvable. |
Introduces trust and sensitivity annotations for MCP requests and responses,enabling clients and servers to track, propagate, and enforce trust boundarieson data as it flows through tool invocations.Key features:- Result annotations: sensitiveHint, privateHint, openWorldHint, maliciousActivityHint, attribution- Request annotations for propagating trust context- Propagation rules ensuring sensitivity markers persist across agent sessions- Integration with Tool Resolution (modelcontextprotocol#1862) for pre-execution annotations- Per-item annotations for mixed results (e.g., search results)- Defense-in-depth approach complementing tool-level annotationsClosesmodelcontextprotocol#711
Adds argument-specific scope requirements as a key use case:- Motivation: Over-scoping problem (e.g., GitHub repo scope for public repos)- Future Extensibility: Dynamic securitySchemes example with noauth/oauth2- Related Work: Cross-reference to SEP-1488 and SEP-711 (Trust Annotations)The key insight is that static securitySchemes declarations requiremaximum permissions upfront, but tool resolution enables servers toreturn argument-specific requirements (e.g., noauth for public repos,repo scope only for private repos).This reduces unnecessary OAuth prompts and enables principle of leastprivilege in MCP tool invocations.
Uh oh!
There was an error while loading.Please reload this page.
Summary
This SEP proposes atool resolution mechanism that enables servers to provide argument-specific metadata before tool invocation. The design takes inspiration from LSP's resolve pattern and HTTP preflight OPTION requests while adapting it for MCP's unique requirements.
Key Changes
tools/resolvemethod: Clients can request refined tool metadata based on intended argumentsresolvefield: Tools can indicate they support resolutiontools.resolve: trueThe Problem
Tool definitions from
tools/listare static. Amanage_filestool must declaredestructiveHint: trueeven thoughreadoperations are completely safe. This causes:The Solution
Before invoking a tool, clients can call
tools/resolvewith the tool name and intended arguments. The server returns a complete tool definition with annotations refined for that specific operation:Why This Approach?
This design follows@findleyr'ssuggestion to adopt an LSP-inspired resolve pattern:
By returning the full
Toolobject, we:tools/annotations,tools/scopes,tools/costs)Future Extensibility
The pattern supports future metadata beyond annotations:
These are explicitly out of scope for this SEP but the mechanism supports them.
Backward Compatibility
Fully backward compatible:
resolve: trueChecklist: