mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 14:54:24 +01:00
feat: add structured capability types
Replace generic capability dictionaries with structured types for prompts, resources, tools, and roots. This improves type safety and makes capability features like listChanged and subscribe more explicit in the protocol.
This commit is contained in:
@@ -33,10 +33,13 @@ from .types import (
|
||||
Notification,
|
||||
PingRequest,
|
||||
ProgressNotification,
|
||||
PromptsCapability,
|
||||
ReadResourceRequest,
|
||||
ReadResourceResult,
|
||||
Resource,
|
||||
ResourcesCapability,
|
||||
ResourceUpdatedNotification,
|
||||
RootsCapability,
|
||||
SamplingMessage,
|
||||
ServerCapabilities,
|
||||
ServerNotification,
|
||||
@@ -46,6 +49,7 @@ from .types import (
|
||||
StopReason,
|
||||
SubscribeRequest,
|
||||
Tool,
|
||||
ToolsCapability,
|
||||
UnsubscribeRequest,
|
||||
)
|
||||
from .types import (
|
||||
@@ -82,10 +86,13 @@ __all__ = [
|
||||
"Notification",
|
||||
"PingRequest",
|
||||
"ProgressNotification",
|
||||
"PromptsCapability",
|
||||
"ReadResourceRequest",
|
||||
"ReadResourceResult",
|
||||
"ResourcesCapability",
|
||||
"ResourceUpdatedNotification",
|
||||
"Resource",
|
||||
"RootsCapability",
|
||||
"SamplingMessage",
|
||||
"SamplingRole",
|
||||
"ServerCapabilities",
|
||||
@@ -98,6 +105,7 @@ __all__ = [
|
||||
"StopReason",
|
||||
"SubscribeRequest",
|
||||
"Tool",
|
||||
"ToolsCapability",
|
||||
"UnsubscribeRequest",
|
||||
"stdio_client",
|
||||
"stdio_server",
|
||||
|
||||
Reference in New Issue
Block a user