pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/modelcontextprotocol/python-sdk/commit/c92bb2f7ffaa61813d7cc350887f4ece38307769

sorigen="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0bd78641c0a1f3e0.css" /> SEP-1686: Tasks (#1645) · modelcontextprotocol/python-sdk@c92bb2f · GitHub
Skip to content

Commit c92bb2f

Browse files
authored
SEP-1686: Tasks (#1645)
1 parent 5983a65 commit c92bb2f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+14230
-120
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,6 +2512,7 @@ MCP servers declare capabilities during initialization:
25122512
## Documentation
25132513

25142514
- [API Reference](https://modelcontextprotocol.github.io/python-sdk/api/)
2515+
- [Experimental Features (Tasks)](https://modelcontextprotocol.github.io/python-sdk/experimental/tasks/)
25152516
- [Model Context Protocol documentation](https://modelcontextprotocol.io)
25162517
- [Model Context Protocol specification](https://modelcontextprotocol.io/specification/latest)
25172518
- [Officially supported servers](https://github.com/modelcontextprotocol/servers)

docs/experimental/index.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Experimental Features
2+
3+
!!! warning "Experimental APIs"
4+
5+
The features in this section are experimental and may change without notice.
6+
They track the evolving MCP specification and are not yet stable.
7+
8+
This section documents experimental features in the MCP Python SDK. These features
9+
implement draft specifications that are still being refined.
10+
11+
## Available Experimental Features
12+
13+
### [Tasks](tasks.md)
14+
15+
Tasks enable asynchronous execution of MCP operations. Instead of waiting for a
16+
long-running operation to complete, the server returns a task reference immediately.
17+
Clients can then poll for status updates and retrieve results when ready.
18+
19+
Tasks are useful for:
20+
21+
- **Long-running computations** that would otherwise block
22+
- **Batch operations** that process many items
23+
- **Interactive workflows** that require user input (elicitation) or LLM assistance (sampling)
24+
25+
## Using Experimental APIs
26+
27+
Experimental features are accessed via the `.experimental` property:
28+
29+
```python
30+
# Server-side
31+
@server.experimental.get_task()
32+
async def handle_get_task(request: GetTaskRequest) -> GetTaskResult:
33+
...
34+
35+
# Client-side
36+
result = await session.experimental.call_tool_as_task("tool_name", {"arg": "value"})
37+
```
38+
39+
## Providing Feedback
40+
41+
Since these features are experimental, feedback is especially valuable. If you encounter
42+
issues or have suggestions, please open an issue on the
43+
[python-sdk repository](https://github.com/modelcontextprotocol/python-sdk/issues).

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy