How do I stream the results from an mcp tool call #551
Unanswered
aparnarajan-pf
asked this question in
Q&A
Replies: 1 comment 5 replies
-
|
The short answer is: I don't think the SDK supports that currently. I also don't think this is well defined in the spec, though please correct me if I'm wrong. The transport interface (and the transport concept in the MCP spec) abstracts away the underlying wire format, and so MCP is very request-response oriented. Just so I understand, you want to be able to stream your response as partial JSON, right? E.g. you want your consumer to immediately observe the following blob, and be able to parse and extract streaming content elements? {
"content": [
{"text": ...}, |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
I have a tool which invokes another llm and returns streaming response. How do I send this response as part of mcp call tool result? I have look at the examples, couldnt find an example where response is streamed. I saw similar discussion in other programing language library implementations
Beta Was this translation helpful? Give feedback.
All reactions