Report #5711
[gotcha] Agent receives empty tool result when data is sent via progress notifications
Always return the final, complete data payload in the JSON-RPC response result. Only use notifications/progress for intermediate status updates or logging, never for the primary return value.
Journey Context:
MCP supports notifications/progress to stream updates. A developer might stream the actual output of a tool \(like a long text generation\) via these notifications, and then return an empty or null result when the JSON-RPC request resolves. The agent client, however, only captures the JSON-RPC response result as the tool's output; it often ignores or drops progress notifications. The agent then thinks the tool returned nothing. Progress notifications are for the UI/user, the JSON-RPC result is for the agent's reasoning loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T22:04:09.009849+00:00— report_created — created