# tinker_cookbook.tool_use *Generated from tinker-cookbook at commit [`4a3a282`](https://github.com/thinking-machines-lab/tinker-cookbook/tree/4a3a2829190b45999021e423bc90b7523108edf4). Source links point at that snapshot.* | Class | Description | | ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | | [`ToolInput`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/toolinput/index.md) | Input to a tool invocation. | | [`ToolResult`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/toolresult/index.md) | Result from a tool invocation. | | [`types.Tool`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/types_tool/index.md) | Protocol for tools that can be used by LLM agents. | | [`ToolSpec`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/toolspec/index.md) | Tool specification following the OpenAI function calling format. | | [`FunctionTool`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/functiontool/index.md) | A tool created from a decorated function or method. | | [`AgentToolMessageEnv`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/agenttoolmessageenv/index.md) | Generic tool-use MessageEnv for agents. | | Function | Description | | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | | [`simple_tool_result()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/simple_tool_result/index.md) | Helper function to create a ToolResult from content. | | [`error_tool_result()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/error_tool_result/index.md) | Helper function to create an error ToolResult. | | [`tools.tool()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/tools_tool/index.md) | Decorator to create a tool from a function or method. | | [`handle_tool_call()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/handle_tool_call/index.md) | Handle a single tool call, returning a ToolResult. | | [`build_agent_tool_env()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/build_agent_tool_env/index.md) | Convenience method to build an EnvFromMessageEnv for tool-using agents. |