Skip to content

ToolSpec

Base classes

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

⋔ Inheritance diagram

graph TD
  106982419682544["tool.ToolSpec"]
  106982277958800["typing.Generic"]
  129768776280576["builtins.object"]
  106982277958800 --> 106982419682544
  129768776280576 --> 106982277958800

🛈 DocStrings

A T3 Code MCP tool: its wire name plus the models for its arguments and result.

Source code in src/pyt3client/tool.py
24
25
26
27
28
29
30
31
32
33
@dataclass(frozen=True, slots=True)
class ToolSpec[InputT: BaseModel, OutputT: BaseModel]:
    """A T3 Code MCP tool: its wire name plus the models for its arguments and result."""

    name: str
    """Tool name as advertised in `tools/list`, such as `t3_thread_launch`."""
    input_type: type[InputT]
    output_type: type[OutputT]
    read_only: bool
    """The tool's `readOnlyHint`. Read-only sign-ins can call only these tools."""

name instance-attribute

name: str

Tool name as advertised in tools/list, such as t3_thread_launch.

read_only instance-attribute

read_only: bool

The tool's readOnlyHint. Read-only sign-ins can call only these tools.

:fa-brands-github: Show source on GitHub