# tinker_cookbook.tool_use.FunctionTool

## _class_ [**tinker_cookbook.tool_use.FunctionTool**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L157)()

A tool created from a decorated function or method.

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

### _property_ [**parameters_schema**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L207)

JSON Schema for tool parameters.

**Returns:** _dict[str, Any]_

### [**to_spec**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L211)()

Convert to ToolSpec for renderer integration.

**Returns:** _ToolSpec_

### [**run**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L219)( _input_)

Execute the tool with validated arguments. Returns a ToolResult.

**Parameters:**

- [**input**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L219) ( _[ToolInput](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/toolinput/)_)

**Returns:** _[ToolResult](https://tinker-docs.thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L219)_

## Referenced by

- [tinker_cookbook.tool_use.tools.tool](https://tinker-docs.thinking-machines.ai/cookbook/api-reference/tool_use/tools_tool/)
