[BUG] mcp serve: tools advertise outputSchema but return no structuredContent
Resolved 💬 2 comments Opened Dec 18, 2025 by hwaxxer Closed Dec 18, 2025
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When running as an MCP server, some tools advertise a outputSchema but return structuredContent: null for successful tools/call responses, for example Bash.
This causes every session.call_tool with those tools to error.
What Should Happen?
The python MCP SDK enforces that tools with outputSchema must return structuredContent (see https://github.com/modelcontextprotocol/python-sdk/blob/v1.24.0/src/mcp/client/session.py#L416)
Error Messages/Logs
Tool Bash has an output schema but did not return structured content
Steps to Reproduce
npx -y @anthropic-ai/claude-code@2.0.72 mcp serve- call tool Bash with
{ "command": "echo hi" }using the official Python MCP SDK (e.g.mcp==1.24.0)
...or run the following script:
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
1.0.119
Claude Code Version
2.0.72
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗