Skip to content

fix(proxy): return full CallToolResult so structuredContent survives outputSchema validation - #15

Open
zachledoux wants to merge 1 commit into
deepgram:mainfrom
zachledoux:fix/proxy-structuredcontent
Open

zachledoux wants to merge 1 commit into
deepgram:mainfrom
zachledoux:fix/proxy-structuredcontent

Conversation

@zachledoux

Copy link
Copy Markdown

Ran ruff format, ruff check, mypy (strict), and pytest locally, all pass (40/40).

Problem

handle_call_tool returned only result.content, discarding result.structuredContent. Since handle_list_tools forwards each remote tool's definition including its outputSchema, any tool with a schema (e.g. search_deepgram_knowledge_sources) fails MCP output-schema validation on schema-validating clients (Claude Code) with:

Output validation error: outputSchema defined but no structured output returned

This makes the proxy's tools unusable from clients that enforce the MCP structured-output contract.

Fix

Return the remote CallToolResult unchanged so structuredContent and isError pass through untouched.

Verification

Tested against a patched copy on PYTHONPATH: structuredContent present (was absent), isError false (was true), real results returned (was an error string).

Environment: deepgram-mcp 0.1.1 via deepctl-cmd-mcp 0.1.15 / deepctl 0.3.0; client Claude Code (enforces the 2026-07-28 structured-output validation).

handle_call_tool returned only result.content, discarding result.structuredContent. Since handle_list_tools forwards each tool's outputSchema, any tool with a schema (e.g. search_deepgram_knowledge_sources) failed MCP output-schema validation with "outputSchema defined but no structured output returned" on schema-validating clients.

Return the remote CallToolResult unchanged so structuredContent and isError pass through. Verified: structuredContent present, isError false, real results returned.

This branch has not been deployed

No deployments
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.

1 participant