mcpproxy-go icon indicating copy to clipboard operation
mcpproxy-go copied to clipboard

tool_response_limit does not truncate structuredContent

Open uznog opened this issue 2 weeks ago • 1 comments

In v0.68.0, v0.73.0 and main (6370f1f4), tool_response_limit truncates only the text blocks in content. structuredContent passes through unchanged (internal/server/content_forward.go#L194-199). An upstream server that returns large structuredContent (for example a Vikunja MCP server) bypasses the limit, and the full payload reaches the client context. Expected: when a response exceeds tool_response_limit, truncate or drop structuredContent too, and point to read_cache for the full result. If the full pass-through is intentional (PR #1861), please add a config option to drop or cap structuredContent.

uznog avatar Nov 18 '26 16:11 uznog

Thanks for the clear report and for pointing at the exact lines, @uznog! This was a gap, not an intentional pass-through: #1861 only clarified that output validation doesn't mutate structuredContent. Fixed in #1937: an oversize structuredContent is now held back and delivered as truncated text with a read_cache handle, so tool_response_limit covers it too.

Dumbris avatar Nov 19 '26 11:11 Dumbris