You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update tasks docs for the Extensions.Tasks API move
The Tasks feature moved from ModelContextProtocol.Core to the new
ModelContextProtocol.Extensions.Tasks package, which renamed several
types and members. Updated docs/concepts/tasks/tasks.md and the task
references in docs/concepts/stateless/stateless.md so the docfx cross
references resolve and the samples match the current API:
- Types moved to the ModelContextProtocol.Extensions.Tasks namespace.
- Server enablement uses WithTasks(IMcpTaskStore) instead of the removed
McpServerOptions.TaskStore property.
- Custom tool handlers use CallToolWithAlternateHandler returning
ResultOrAlternate<CallToolResult>.
- Task scope uses the McpTasksServerExtensions.CreateMcpTaskScope
extension.
- Client calls use CallToolWithPollingAsync, CallToolAsTaskAsync, and the
Get/Update/CancelTaskAsync client extensions; the stuck-poll threshold
is now the maxConsecutiveStuckPolls parameter.
@@ -600,9 +600,9 @@ In stateless mode, there is no `SessionId`, so the task store does not apply ses
600
600
601
601
### Stateful mode
602
602
603
-
Instatefulmode, the `IMcpTaskStore` receivesthesession's `SessionId` on every operation — `CreateTaskAsync`, `GetTaskAsync`, `ListTasksAsync`, `CancelTaskAsync`, etc. The built-in <xref:ModelContextProtocol.Server.InMemoryMcpTaskStore> enforces session isolation: tasks created in one session cannot be accessed from another.
603
+
Instatefulmode, the `IMcpTaskStore` receivesthesession's `SessionId` on every operation: `CreateTaskAsync`, `GetTaskAsync`, `ListTasksAsync`, `CancelTaskAsync`, etc. The built-in <xref:ModelContextProtocol.Extensions.Tasks.InMemoryMcpTaskStore> enforces session isolation: tasks created in one session cannot be accessed from another.
604
604
605
-
TaskscanoutliveindividualHTTPrequestsbecausethetoolexecutesinthebackgroundafterreturningtheinitial `CreateTaskResult`. Taskcleanupisgovernedbythetask'sTTL (time-to-live), notbysessiontermination. However, the `InMemoryMcpTaskStore` losesalltasksiftheserverprocessrestarts. Fordurabletasks, implementacustom<xref:ModelContextProtocol.Server.IMcpTaskStore>backedbyanexternalstore. See [Implementingacustomtaskstore](xref:tasks#implementing-a-custom-task-store) forguidance.
605
+
TaskscanoutliveindividualHTTPrequestsbecausethetoolexecutesinthebackgroundafterreturningtheinitial `CreateTaskResult`. Taskcleanupisgovernedbythetask'sTTL (time-to-live), notbysessiontermination. However, the `InMemoryMcpTaskStore` losesalltasksiftheserverprocessrestarts. Fordurabletasks, implementacustom<xref:ModelContextProtocol.Extensions.Tasks.IMcpTaskStore>backedbyanexternalstore. See [Implementingacustomtaskstore](xref:tasks#implementing-a-custom-task-store) forguidance.
606
606
607
607
### Task cancellation vs request cancellation
608
608
@@ -654,7 +654,7 @@ The `EventStreamStore` itself has TTL-based limits (default: 2-hour event expira
0 commit comments