Skip to content

tinker_cookbook.tool_use.Tool

class tinker_cookbook.tool_use.Tool(Protocol)

Protocol for tools that can be used by LLM agents.

property name

Tool name shown to the model.

property description

Tool description shown to the model.

property parameters_schema

JSON Schema for tool parameters shown to the model.

run(input)

Execute the tool with validated arguments. Returns a ToolResult.

Parameters:

  • input (ToolInput)

to_spec()

Convert to ToolSpec for renderer integration.