Skip to content

SdkMcpTool

Base classes

Name Children Inherits
Generic
typing
Abstract base class for generic types.

⋔ Inheritance diagram

graph TD
  172910701["mcp_utils.SdkMcpTool"]
  3481597255["typing.Generic"]
  2751680898["builtins.object"]
  3481597255 --> 172910701
  2751680898 --> 3481597255

🛈 DocStrings

Definition for an SDK MCP tool.

Source code in src/clawd_code_sdk/mcp_utils.py
@dataclass
class SdkMcpTool[T]:
    """Definition for an SDK MCP tool."""

    name: str
    description: str
    input_schema: type[T] | dict[str, Any]
    handler: Callable[[T], Awaitable[dict[str, Any]]]
    title: str | None = None
    annotations: ToolAnnotations | None = None
    output_schema: dict[str, Any] | None = None
    meta: dict[str, Any] | None = None
    search_hint: str | None = None
    always_load: bool | None = None
    max_result_size_chars: int | None = None

:fa-brands-github: Show source on GitHub