Skip to content

Conversation

@jba
Copy link
Contributor

@jba jba commented Sep 3, 2025

The ToolHandler constructed by ToolFor sets the result's Content to the marshaled output, following the spec's suggestion.

See https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content.

Also, set StructuredContent to the marshaled RawMessage to avoid a double marshal.

Fixes #391.

The ToolHandler constructed by ToolFor sets the result's Content to
the marshaled output, following the spec's suggestion.

See https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content.

Also, set StructuredContent to the marshaled RawMessage to avoid a
double marshal.

Fixes modelcontextprotocol#391.
@jba jba merged commit 7769b2a into modelcontextprotocol:main Sep 3, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proposal: tool handler should set Content field if nil

2 participants