Skip to content

SEP-3172: Add optional recovery metadata to ToolAnnotations - #3172

Open
RohithGajawada45 wants to merge 6 commits into
modelcontextprotocol:mainfrom
RohithGajawada45:main
Open

SEP-3172: Add optional recovery metadata to ToolAnnotations#3172
RohithGajawada45 wants to merge 6 commits into
modelcontextprotocol:mainfrom
RohithGajawada45:main

Conversation

@RohithGajawada45

Copy link
Copy Markdown

SEP: Add optional recovery metadata to ToolAnnotations

Summary

This PR proposes an additive extension to ToolAnnotations that allows a tool to declare an optional compensating operation for workflow recovery.

The proposal is intentionally narrow in scope. It does not define workflow execution, Saga semantics, distributed transactions, retry policies, or checkpointing. Instead, it standardises a way for tools to advertise existing recovery relationships through MCP metadata so that orchestrators can discover them in a portable, machine-readable way.

The proposal is fully backward compatible: servers and clients that do not recognise the new field continue to behave exactly as they do today.

A runnable reference implementation is included to demonstrate the proposal's behavior independently of any specific MCP implementation.

Motivation

Today, MCP tool metadata can describe properties such as whether a tool is destructive or idempotent, but it provides no machine-readable way to express how an already-completed operation may be compensated if a later step in the same workflow fails.

Several orchestration frameworks implement workflow recovery internally, but those recovery relationships are generally framework-specific rather than discoverable through the tool description itself. This proposal explores whether that relationship should be expressible as optional protocol metadata.

Included in this PR

  • SEP draft describing the proposed recovery field for ToolAnnotations
  • Reference implementation demonstrating metadata-driven compensation
  • (Supporting explainer available if useful during review)

Feedback requested

The primary question I'd appreciate feedback on is architectural rather than syntactic:

Is ToolAnnotations the appropriate place for optional recovery metadata, or would this kind of relationship fit better elsewhere in MCP (for example, an extension namespace or another protocol mechanism)?

Feedback on the proposed API shape and overall approach is also very welcome.

@RohithGajawada45
RohithGajawada45 requested review from a team as code owners July 29, 2026 19:44
Updated the SEP index to include a new SEP and adjusted the table formatting.
Add SEP-3172 proposal for recovery metadata in ToolAnnotations.
@localden localden changed the title SEP: Add optional recovery metadata to ToolAnnotations SEP-3172: Add optional recovery metadata to ToolAnnotations Jul 29, 2026
@localden localden added SEP proposal SEP proposal without a sponsor. labels Jul 29, 2026
@kajolsabbir100-hue

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

proposal SEP proposal without a sponsor. SEP

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants