Skip to content

Conversation

@jonathanhefner
Copy link
Member

@jonathanhefner jonathanhefner commented Dec 5, 2025

Not all MCP clients support structuredContent in MCP tool results, so examples now return data as JSON in content and parse it client-side.

Pattern used:

  • Server: content: [{ type: "text", text: JSON.stringify(data) }]
  • Client: JSON.parse(result.content!.filter(...).map(...).join(""))

🤖 Generated with Claude Code

@jonathanhefner jonathanhefner force-pushed the examples-use-content-for-now branch from 60c5147 to 05cdaf5 Compare December 5, 2025 22:32
Not all MCP clients support structuredContent in MCP tool results, so
examples now return data as JSON in content and parse it client-side.

Pattern used:
- Server: content: [{ type: "text", text: JSON.stringify(data) }]
- Client: JSON.parse(result.content!.filter(...).map(...).join(""))

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jonathanhefner jonathanhefner force-pushed the examples-use-content-for-now branch from 05cdaf5 to 61cd4ed Compare December 5, 2025 22:35
@jonathanhefner jonathanhefner merged commit 437b918 into modelcontextprotocol:main Dec 5, 2025
1 check passed
ochafik added a commit that referenced this pull request Dec 11, 2025
…nt-for-now"

This reverts commit 437b918, reversing
changes made to d5b13b7.
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.

2 participants