> ## 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**](../modules/base) module.

<Badge color="blue">AI Agent</Badge>

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

<ParamField query="output" type="Any" required={true}>
  No description available.
</ParamField>

<ParamField query="success" type="bool" required={false} default="True">
  No description available.
</ParamField>

<ParamField query="error" type="Optional[str]" required={false}>
  No description available.
</ParamField>

<ParamField query="metadata" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="content" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="model_output" type="Any" required={false}>
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="is_multimodal()" icon="function" href="../functions/ToolResult-is_multimodal">
    True if this result carries structured (possibly image/file) parts.
  </Card>
</CardGroup>

<Accordion title="Internal & Generic Methods">
  * **to\_dict**: Generic utility method.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/base.py#L32">
  `praisonaiagents/tools/base.py` at line 32
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Tools Concept" icon="wrench" href="/docs/docs/concepts/tools" />

  <Card title="Create Custom Tools" icon="plus" href="/docs/docs/guides/tools/create-custom-tools" />

  <Card title="Tool Development" icon="code" href="/docs/docs/tutorials/advanced-tool-development" />
</CardGroup>
