๐ ๐๐ฃ ๐ฆ๐ฒ๐ฟ๐๐ฒ๐ฟ๐ ๐๐ฟ๐ผ๐ฝ ๐๐ฎ๐๐ฎ
You built an MCP server. You used a passthrough tool. Your GET requests worked. Your POST requests failed. The body arrived empty.
The cause is the schema. Using z.unknown() makes an empty JSON schema. MCP clients drop properties with empty schemas. The error comes from the upstream service. It is hard to find.
The fix is simple. Give the body a real schema. Use a union of a record and a string. Parse the string body into an object before use. The schema is now non-empty. The data stays.
Two lessons for you:
- Audit tools with unknown or untyped inputs.
- Test write tools against the real service. Unit tests are not enough. This bug lives at the client boundary.
The Hetzner MCP server is open source. Run it with: npx -y hetzner-mcp
What silent failure did you find in MCP tools?
Source: https://dev.to/mjmirza/your-mcp-servers-write-tools-are-silently-dropping-their-body-475j
Optional learning community: https://t.me/GyaanSetuAi