Replies: 1 comment
|
The short answer: no, the example response you show is not valid per the current spec. Progress is delivered via What the spec saysProgress tracking in MCP uses a push model, not a pull model:
The // Your proposed tasks/get response — NOT valid
{
"result": {
"taskId": "...",
"status": "working",
...
},
"params": { // ← This field does not exist in a JSON-RPC response
"progressToken": "abc123", // ← Progress goes via notifications, not responses
"progress": 50,
"total": 100,
"message": "Still working on it..."
}
}A valid JSON-RPC 2.0 response has exactly Why the spec separates task status from progressThe separation exists because task polling and progress streaming are different patterns with different lifecycles:
If you are using The "Streamable HTTP way" to solve thisIn Streamable HTTP transport, notifications can be sent on the response stream. A more idiomatic approach for your scenario: 1. If you use Tasks (polling-based): 2. If you want to simplify (avoid dual channels): {
"taskId": "...",
"status": "working",
"statusMessage": "Processing: 50/100 items complete (50%)",
"ttl": 30000,
"pollInterval": 5000
}This is valid because Bottom lineYour proposed JSON structure mixes response and notification formats. The spec cleanly separates them. Use |
Uh oh!
There was an error while loading. Please reload this page.
Pre-submission Checklist
Question Category
Your Question
Can Progress token be used in conjunction with Tasks such that the progres is displayed in calls to tasks/get rather than sent as a notification. For example, consider the following task request and response and the subsequent tasks/get response. Is the response valid?
REQUEST
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_weather",
"arguments": {
"city": "New York",
"_meta": {
"progressToken": "abc123"
}
},
"task": {
"ttl": 60000
}
}
}
RESPONSE
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"task": {
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
"status": "working",
"statusMessage": "The operation is now in progress.",
"createdAt": "2025-11-25T10:30:00Z",
"lastUpdatedAt": "2025-11-25T10:40:00Z",
"ttl": 60000,
"pollInterval": 5000
}
}
}
CALL TO TASKS/GET
{
"jsonrpc": "2.0",
"id": 3,
"method": "tasks/get",
"params": {
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840"
}
}
RESPONSE
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
"status": "working",
"statusMessage": "The operation is still in progress.",
"createdAt": "2025-11-25T10:30:00Z",
"lastUpdatedAt": "2025-11-25T10:40:00Z",
"ttl": 30000,
"pollInterval": 5000
}
"params": {
"progressToken": "abc123",
"progress": 50,
"total": 100,
"message": "Still working on it..."
}
}
Essentially, I am asking if progress token can be combined with tasks/get responses.
Thanks in advance.
All reactions