Skip to content

Support tool structured content and output schema #139

@ptitjes

Description

@ptitjes

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

The 2025-06-18 version of the protocol introduces the Tool's "Structured Content" and "Output Schema" support which allows servers to optionally specify a tool output schema and a tool result structured content.

cf. https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content
and https://modelcontextprotocol.io/specification/2025-06-18/server/tools#output-schema

Describe the solution you'd like

  • Add an optional outputSchema field to Tool
  • Add an optional structuredContent field to CallToolResult
    • How should this articulate with the existing CompatibilityCallToolResult?

Open question:

The specification says:

If an output schema is provided:

  • Servers MUST provide structured results that conform to this schema.
  • Clients SHOULD validate structured results against this schema.

Should we enforce that in the SDK or leave it to the responsibility of the host?

Describe alternatives you've considered
N/A

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions