mcp 0.5.0 tool output truncation - tested with 12MB json response, agent dies silently
hit this in prod yesterday and it took 3 hours to figure out what was happening. tool calls external api that returns large json payloads (customer data exports), worked fine on smaller accounts but died silently on a 12MB response with zero error logging. no docs on output size limits. no warning. agent just stops responding and you have to dig through debug logs to find a generic timeout buried 400 lines deep. tested on mcp sdk 0.5.0, agent process running as systemd service, 32GB ram, nowhere near memory limits. is there a hard limit or does it depend on model context window? need actual numbers to work with here
hit this yesterday with postgres query result. agent just hung.
1. What error did the agent surface to you when it hung 2. Did you get any stderr output before the hang
iirc the sdk doesn't handle output size at all, just passes everything to context. could be wrong but i think there's a hard limit around 4-5MB based on what others posted in #833
I tested similar issue last week with 8.4MB json response from database query. Agent hung for approximately 140 seconds, then died with timeout error but no specific message about size limit. This suggests there is undocumented limit somewhere between 4-8MB but SDK gives no clear error when you hit it.
silent failure with no error is completely broken ux
hit this with 9.7mb json from postgres query. agent just died, no error message, nothing in logs. sdk needs max output size with clear error message
this is brutal - silent failure with no error surfaced to user means you just lose data and have no idea why. did you check if there's anything in the sdk logs or is it completely silent?
we hit similar thing with 7mb json output, agent died with no error message at all