[Proposal] Task semantics and multi-turn interactions with tools #314
Replies: 5 comments 2 replies
-
|
This has overlap with the A2A task implementation. I think MCP should seriously look at incorporating the A2A protocol into base MCP, there's just so much overlap. |
Beta Was this translation helpful? Give feedback.
-
|
To keep this thread updated, we have been having similar discussion in #220 and captured key differences here: https://docs.google.com/document/d/18aW0P38h14ccJTkN-irhy2NVdG-_V_Oe7WblnAiKKGM/edit?tab=t.0#heading=h.kvf97tlsh3d2. Its hard to differentiate between agents and tools at this point. Partial response streaming, Async tool execution, structured output, are few things MCP is missing, but looks like anyway a good idea to capture in MCP. #97, #314 A discussion that is still open is if tools can do back and forth/multi-turn with caller, some of us believe similar to workflows this should be an acceptable pattern and captured a hint on a tool. Else this will need to be defined as a new primitive. |
Beta Was this translation helpful? Give feedback.
-
|
Raised couple of PRs related to discussion in this thread and #111 : |
Beta Was this translation helpful? Give feedback.
-
|
@siwachabhi @patwhite
in such process, every |
Beta Was this translation helpful? Give feedback.
-
|
Update: Elicitation PR got merged into spec, on partial streaming more current thought process is: #776 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Your Idea
This is a distillation of thoughts across multiple threads and other protocols to enable multi-turn interactions in MCP. Starting with discussion thread to get feedback, before raising PR.
Abstract
This proposal outlines a mechanism to enhance the Model Context Protocol with request status tracking capabilities. By introducing a progress field in responses and associated retrieval methods, MCP can support multi-turn interactions, partial streaming responses, and agent-driven conversation flows.
Proposed approach here in one way or other is adopted by majority of hosted agents(return of control, function call) and multi-turn protocols(interrupts, awaits), ie, provide job like semantics spanning multiple requests/results.
Motivation
As MCP gains traction as a protocol for agent interactions, several limitations have emerged in the current specification:
This problem is especially apparent in scenarios like:
Proposal
MCP already supports progress and cancellation notifications. This proposal introduces progress state tracking to the MCP protocol, enabling multi-turn interactions and partial result streaming through two core mechanisms:
1. Enhanced Result Objects with Progress State
We propose extending the existing
Resultinterface to include aprogressfield within the_metaobject. This enhancement allows servers to communicate the current state of a request directly within response objects:This extension enables:
input-requiredstate)workingstate2. Progress Retrieval Method
To complement the enhanced result objects, we introduce a new method for clients to retrieve the current progress of any ongoing request:
This method enables:
3. Extend tool annotation
Extend tool annotations to hint if it support multi-turn interactions.
Request Flow Examples
Multi-turn conversation with human in the loop
Stream of partial chunked response
Get latest progress
Backward Compatibility
This proposal is designed to maintain full backward compatibility:
Older clients will simply ignore the additional fields, while older servers will not provide status information, leading to graceful degradation of functionality.
Server Implementation Requirements
Servers implementing this proposal must:
progressTokenprogressTokenas continuationsprogress/getrequests with the latest status and contentClient Implementation Requirements
Clients implementing this proposal must:
progressTokenvalues for requestsinput-requiredstatesprogress/getwhen neededAlternatives
References
Scope
Beta Was this translation helpful? Give feedback.
All reactions