Skip to content

tinker_cookbook.tool_use.types.Tool

class tinker_cookbook.tool_use.types.Tool(Protocol)

Protocol for tools that can be used by LLM agents.

property name

Tool name shown to the model.

Returns: str

property description

Tool description shown to the model.

Returns: str

property parameters_schema

JSON Schema for tool parameters shown to the model.

Returns: dict[str, Any]

run(input)

Execute the tool with validated arguments. Returns a ToolResult.

Parameters:

Returns: ToolResult

to_spec()

Convert to ToolSpec for renderer integration.

Returns: ToolSpec