Skip to content

v2.3.2

Choose a tag to compare

@herbertkokholm herbertkokholm released this 09 Aug 13:10
· 12 commits to main since this release

server-card.json: stop emitting explicit nulls

/.well-known/mcp/server-card.json was serializing each tool's
outputSchema/annotations with a plain model_dump(), so a tool
without an output schema -- or any unset annotation hint like
destructiveHint/idempotentHint -- came through as an explicit JSON
null instead of being omitted. That's inconsistent with the MCP SDK's
own tools/list serialization, which always excludes unset fields, and
a strict client-side JSON Schema validator could reasonably reject a
null where it expects either a missing key or a concrete value.

Fixed by using exclude_none=True and only including outputSchema/
annotations in a tool's card entry when the tool actually has them.