FunctionTool - Tinker Documentation

tinker_cookbook.tool_use.FunctionTool

class tinker_cookbook.tool_use.FunctionTool()

A tool created from a decorated function or method.

Implements the Tool protocol. Used internally by the @tool decorator.

property parameters_schema

JSON Schema for tool parameters.

Returns: dict[str, Any]

to_spec()

Convert to ToolSpec for renderer integration.

Returns: ToolSpec

run( input)

Execute the tool with validated arguments. Returns a ToolResult.

Parameters:

Returns: ToolResult

Referenced by