Skip to content

Flexible tool annotations #848

@laurentsimon

Description

@laurentsimon

Is your feature request related to a problem? Please describe.

The tool annotations are static and cannot be customized. It has two limitations:

  1. Different use cases may need to label their tools differently to enforce policies (an example is Proposal: Leveraging Action Manifests for Better Agent Security #440). It's likely that certain annotations will differ based on ecosystem (Android vs Cloud agents vs ...). A way to customize these annotations would be useful so we don't have to create extensions or different SDKs for different ecosystems.
  2. It's currently impractical to experiment with new annotations without breaking the ecosystem of MCP SDKs. As such, it's hard to validate what works and what does not to inform the specs.

Describe the solution you'd like

A potential solution would be to turn the annotations into a list of key / value pairs. Something like:

toolAnnotations = [
  {
     "mcp.org/openWorldHint": {
        "value": true,
      }
      ...
     "mycompany.com/something": {
        "value": { object },
        "critical": true,
        "experimental": true
      }
  }
]

All existing annotations would be expressed this way and new ones may be added overtime. In the example above, an agent implementation would ignore fields it does not understand, and fail only if the annotation is marked "critical", for example. (like x509 certificate extensions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions