# tinker_cookbook.tool_use

| Class | Description |
| --- | --- |
| [`ToolInput`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/toolinput/) | Input to a tool invocation. |
| [`ToolResult`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/toolresult/) | Result from a tool invocation. |
| [`types.Tool`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/types_tool/) | Protocol for tools that can be used by LLM agents. |
| [`FunctionTool`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/functiontool/) | A tool created from a decorated function or method. |
| [`AgentToolMessageEnv`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/agenttoolmessageenv/) | Generic tool-use MessageEnv for agents. |

| Function | Description |
| --- | --- |
| [`simple_tool_result()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/simple_tool_result/) | Helper function to create a ToolResult from content. |
| [`error_tool_result()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/error_tool_result/) | Helper function to create an error ToolResult. |
| [`tools.tool()`](https://tinker-docs.thinkingmachines.ai/cookbook/api-reference/tool_use/tools_tool/) | 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/) | 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/) | Convenience method to build an EnvFromMessageEnv for tool-using agents.
