A Tool interaction example has input, ordered steps, and a result. Each step is an elicitation, sampling, or roots step with its request and response, and accepts only its defined properties.
Requirement
Section titled “Requirement”Interaction examples and steps have their required members, a known step type, and no unknown properties.
Details
Section titled “Details”Rule ID: mcpdesc.tool.interaction.members
Owner: mcpdesc
Surface: Tool interaction example
Kind: structural
Requirement level: must
Protocol versions: independent of the MCP protocol version
Document schema locations: #/$defs/toolInteractionExamples, #/$defs/toolInteractionExample, #/$defs/toolInteractionStep, #/$defs/toolInteractionElicitationStep, #/$defs/toolInteractionSamplingStep, #/$defs/toolInteractionRootsStep
Status: internal · Enforcement: internal
Required by
Section titled “Required by”- MCP Description 0.9.0, Section 9.4
- 9. Tools: req-interaction-example-fields
-
- Tools: req-interaction-step-fields
-
- Tools: req-interaction-examples-map
-
- Tools: req-interaction-step-closed
Examples
Section titled “Examples”Invalid example
Section titled “Invalid example”Source: expected-invalid/discriminated-union-members.json · Selected: /tools/0/interactionExamples/invalid/steps/1
{ "type": "roots", "request": {}, "respose": { "roots": [] }}Invalid example
Section titled “Invalid example”Source: expected-invalid/malformed-tool-interaction-examples.json · Selected: /tools/0/interactionExamples/broken/description
"not allowed"Rule Source Code
Section titled “Rule Source Code”interaction.yaml at immutable tag v0.9.0-rc.3.