The MCP tool specification allows for optional annotations to describe tool behavior (e.g., whether an operation is mutating or safe). This metadata is valuable for AI agents to make more intelligent and safer decisions, for example by requiring stricter user confirmation for mutating actions.
This ticket covers adding support for these annotations.
Acceptance Criteria
- A convention for defining annotations in
openapi.yaml is established (e.g., a custom x-annotations field).
- At least one mutating tool (e.g.,
checkout_pull_request) is updated in openapi.yaml with an annotation like {"mutating": true}.
toolService.mjs is refactored to parse these annotations and include them in the tool definitions.
- The
tools/list response is verified to include the new annotations property for relevant tools.
The MCP tool specification allows for optional
annotationsto describe tool behavior (e.g., whether an operation is mutating or safe). This metadata is valuable for AI agents to make more intelligent and safer decisions, for example by requiring stricter user confirmation for mutating actions.This ticket covers adding support for these annotations.
Acceptance Criteria
openapi.yamlis established (e.g., a customx-annotationsfield).checkout_pull_request) is updated inopenapi.yamlwith an annotation like{"mutating": true}.toolService.mjsis refactored to parse these annotations and include them in the tool definitions.tools/listresponse is verified to include the newannotationsproperty for relevant tools.