> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tool Result • AI Agent SDK

> ToolResult: Wrapper for tool execution results.

# ToolResult

> Defined in the [**base**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/base.md) module.

AI Agent

Wrapper for tool execution results.

In addition to the text/JSON `output` channel, tools may return a
structured, multimodal `content` channel so that images/files produced by
a tool become model-visible message parts on the next turn (e.g. a
screenshot tool, chart renderer, or PDF rasteriser feeding a vision model).

`content` is an ordered list of content parts. Each part is a dict:

* `&#123;"type": "text", "text": "..."&#125;`
* `&#123;"type": "image", "data": &lt;base64-str-or-bytes&gt;, "mime": "image/png",
   "name": "shot.png"&#125;`
* `&#123;"type": "image", "url": "https://... or data:..."&#125;`
* `&#123;"type": "file", "data": ..., "mime": "application/pdf", "name": ...&#125;`

Plain text/JSON tool returns behave exactly as before; multimodal is purely
additive and opt-in by the tool author.

For context economy, a tool may also set `model_output` to a compact,
model-facing summary/diff. When present the executor feeds `model_output`
to the LLM instead of the full `output` (fewer tokens), while the full
`output`/`content` remain available to display, hooks, and tracing.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    agent["Agent"] -- "uses" --> tool["Tool: ToolResult"]
    tool -- "returns" --> result["Result"]
    style tool fill:#189AB4,color:#fff
    style agent fill:#8B0000,color:#fff
    style result fill:#8B0000,color:#fff
```

## Constructor

**output** `Any` *required*

No description available.

**success** `bool` (default: True)

No description available.

**error** `Optional[str]`

No description available.

**metadata** `Optional`

No description available.

**content** `Optional`

No description available.

**model\_output** `Any`

No description available.

## Methods

> [card] [is\_multimodal()](https://praison.ai/docs/sdk/reference/praisonaiagents/functions/ToolResult-is_multimodal.md)
>
> True if this result carries structured (possibly image/file) parts.

> [accordion] Internal & Generic Methods
>
> * **to\_dict**: Generic utility method.

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/base.py#L32)
>
> `praisonaiagents/tools/base.py` at line 32

***

## Related Documentation

> [card] [Tools Concept](https://praison.ai/docs/docs/concepts/tools)

> [card] [Create Custom Tools](https://praison.ai/docs/docs/guides/tools/create-custom-tools)

> [card] [Tool Development](https://praison.ai/docs/docs/tutorials/advanced-tool-development)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.