# tinker_cookbook.tool_use.simple_tool_result

### [**tinker_cookbook.tool_use.simple_tool_result**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L25)( _content_, _call_id_, _name_, _should_stop_, _metrics_, _metadata_)

Helper function to create a ToolResult from content.

`content` accepts either a plain string or a `list[ContentPart]` for multimodal results (e.g. text interleaved with images). This matches the `Message["content"]` type, so callers can build parts in any order.

**Parameters:**

- [**content**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L26) ( _str | list[ContentPart]_) – Content to return to the model — a string or list of ContentPart.
- [**call_id**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L28) ( _str_) – The tool call ID (usually passed from ToolInput).
- [**name**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L29) ( _str_) – The tool name (usually self.name in a tool method).
- [**should_stop**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L30) ( _bool_) – Whether to stop the episode after this tool call.
- [**metrics**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L31) ( _dict[str, float] | None_) – Optional metrics dict (e.g., {"latency": 0.5, "count": 1}).
- [**metadata**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/tool_use/tools.py#L32) ( _dict[str, Any] | None_) – Optional metadata dict for debugging.

**Returns:** A ToolResult with the given content and options.

```
@tool
async def search(query: str) -> ToolResult:
    results = await do_search(query)
    return simple_tool_result(
        json.dumps(results),
        metrics={"result_count": len(results)}
    )

@tool
async def screenshot() -> ToolResult:
    img = take_screenshot()
    return simple_tool_result(
        [TextPart(type="text", text="Screenshot taken"),
        ImagePart(type="image", image=img)],
    )
```
