Support Stream tool result? #263
Replies: 5 comments 5 replies
-
|
I suppose this would enable a downstream client to process the data in logical chunks. But what would be a realistic use case? |
Beta Was this translation helpful? Give feedback.
-
|
I totally agree!! |
Beta Was this translation helpful? Give feedback.
-
|
I think it would be more useful for the streamed content to be more granular than just chunks of content: This would allow tools to stream the result of an LLM output for example. |
Beta Was this translation helpful? Give feedback.
-
|
I have a similar user case in which the tool exposed by a MCP server is actually an agent powered by LLM, streaming its output will have much better UX, and also "agent as tool" is a common design pattern, it could be good to have native support for it |
Beta Was this translation helpful? Give feedback.
-
|
This PR should handle this use case in a transport-agnostic way: #776 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Your Idea
With the current design, a single invocation to tool need to return the content list as a whole, it would be nice to have that support streaming.
eg:
instead of:
{ "jsonrpc": "2.0", "id": 4, "result": { "content": [ { "type": "text", "text": "Failed to fetch weather data: API rate limit exceeded" } ], "isError": true } }It would be nice :
{ "jsonrpc": "2.0", "id": 4, "result": { "content": [ { "type": "text", "text": "this is the first content" } ], "hasMore": true, "isError": false } }{ "jsonrpc": "2.0", "id": 4, "result": { "content": [ { "type": "text", "text": "Failed to fetch weather data: API rate limit exceeded" } ], "hasMore": false,, "isError": true } }Scope
Beta Was this translation helpful? Give feedback.
All reactions