-
Notifications
You must be signed in to change notification settings - Fork 31
Description
Problem Statement
I would like to be able to use Strands to interact with MCP servers exposing task-augmented tools.
Proposed Solution
For a minimum implementation, I should be able to have the agent simply block on the result of the task, making it indistinguishable from any other tool from an integration standpoint. A more sophisticated implementation should leverage task statuses for messaging and could implement proper concurrency, but I consider that out of scope for a P0.
This only requires calling this._client.experimental.tasks.callToolStream() instead of this._client.callTool() here. callToolStream() supports both task and non-task tools. There's room for discussion around whether this should just be replaced or if it should be under some sort of flag for now.
Use Case
This basic level of integration would just unblock usage of task-augmented tools in general. Practically speaking, that happens to enable using tools that take an extended amount of time to run without holding e.g. an HTTP connection open for the full duration of the tool call.
The aforementioned more sophisticated implementations would give developers confidence that a tool is continuing to execute via active status polling, and would also enable agents to multitask (again out of scope for P0, but this is a building block towards those more advanced use cases).
Alternatives Solutions
No response
Additional Context
I have a demo server to test against here.