# tinker_cookbook.tool_use.ToolSpec *Generated from tinker-cookbook at commit [`4a3a282`](https://github.com/thinking-machines-lab/tinker-cookbook/tree/4a3a2829190b45999021e423bc90b7523108edf4). Source links point at that snapshot.* ## *class* [**tinker_cookbook.tool_use.ToolSpec**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/renderers/base.py#L726)(*TypedDict*) Tool specification following the OpenAI function calling format. This represents a tool that can be called by the model, including its name, description, and parameter schema. ```python tool_spec: ToolSpec = { "name": "get_weather", "description": "Get the current weather for a location", "parameters": { "type": "object", "properties": { "location": {"type": "string", "description": "City name"}, }, "required": ["location"], }, } ``` **Fields:** - [**name**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/renderers/base.py#L747) (*str*) – The name of the tool. - [**description**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/renderers/base.py#L749) (*str*) – A description of what the tool does. - [**parameters**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/4a3a2829190b45999021e423bc90b7523108edf4/tinker_cookbook/renderers/base.py#L751) (*dict*) – JSON Schema object describing the tool's parameters. ## Referenced by - [tinker_cookbook.renderers.Renderer.create_conversation_prefix_with_tools](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/renderers/renderer/#renderer-create_conversation_prefix_with_tools) - [tinker_cookbook.tool_use.FunctionTool.to_spec](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/functiontool/#functiontool-to_spec) - [tinker_cookbook.tool_use.types.Tool.to_spec](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/types_tool/#tool-to_spec)