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
Copy file name to clipboardExpand all lines: src/mcp/types.py
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -858,6 +858,18 @@ class ToolAnnotations(BaseModel):
858
858
model_config=ConfigDict(extra="allow")
859
859
860
860
861
+
classInternalToolProperties(BaseModel):
862
+
"""
863
+
Internal properties for tools that are not serialized in the MCP protocol.
864
+
"""
865
+
866
+
immediate_result: Any=Field(default=None)
867
+
"""Function to execute for immediate results in async operations."""
868
+
869
+
keepalive: int|None=Field(default=None)
870
+
"""Keepalive duration in seconds for async operations."""
871
+
872
+
861
873
classTool(BaseMetadata):
862
874
"""Definition for a tool the client can call."""
863
875
@@ -883,6 +895,10 @@ class Tool(BaseMetadata):
883
895
See [MCP specification](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/47339c03c143bb4ec01a26e721a1b8fe66634ebe/docs/specification/draft/basic/index.mdx#general-fields)
0 commit comments