Skip to content

schema: draft structured tool-failure classification (ToolFailure) - #3312

Open
johnyzaguirre-glean wants to merge 1 commit into
modelcontextprotocol:mainfrom
johnyzaguirre-glean:draft/tool-failure-classification
Open

schema: draft structured tool-failure classification (ToolFailure)#3312
johnyzaguirre-glean wants to merge 1 commit into
modelcontextprotocol:mainfrom
johnyzaguirre-glean:draft/tool-failure-classification

Conversation

@johnyzaguirre-glean

Copy link
Copy Markdown

Summary

Prototype for discussion #2930 — adds an optional, additive
io.modelcontextprotocol/toolFailure _meta key on CallToolResult
carrying class (capability/reliability/governance), an extensible
code, retryable/retryNotBefore, a required correlationId for
operator debugging, and agentGuidance.

  • Extends CallToolResult, not the JSON-RPC Error type, per the existing
    rule that tool failures must stay visible to the model
  • Reuses the existing _meta namespaced-extension pattern (same one used
    for subscriptionId) — additive, no new -320xx code, no breaking change
  • Field shape reflects where discussion Proposal: standardize operator-friendly tool failure metadata for common MCP cases #2930 converged: class+code
    split, mandatory correlationId, agentGuidance kept separate from
    diagnostics

This is a discussion prototype, not a submitted SEP — posting for feedback
per the "documentation-first before a formal SEP" question raised in the
thread. Happy to move this into a proper SEP if there's interest.

AI disclosure

This PR was written primarily by Claude Code, based on my discussion with
it about consolidating the proposals raised in #2930 (and related, #3188).
I reviewed and understand the schema changes.

Test plan

  • npm run check:schema:ts passes (tsc, eslint, prettier)
  • npm run generate:schema regenerated schema.json/schema.mdx cleanly
  • npm run check:schema — 259/259 example checks pass, including the
    new ToolFailure/policy-blocked.json example

Prototype for discussion modelcontextprotocol#2930 — adds an optional, additive
`io.modelcontextprotocol/toolFailure` _meta key on CallToolResult carrying
class ("capability" | "reliability" | "governance"), an extensible code,
retryable/retryNotBefore, a required correlationId for operator debugging,
and agentGuidance. Local draft only — not filed as a PR, issue, or
discussion comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant