> ## 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 Error • Rust AI Agent SDK

> tool_error: Create tool error event

# tool\_error

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Event**](../classes/Event) class in the [**bus**](../modules/bus) module.

Create tool error event

```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: tool_error"]
    tool -- "returns" --> result["Result"]
    style tool fill:#189AB4,color:#fff
    style agent fill:#8B0000,color:#fff
    style result fill:#8B0000,color:#fff
```

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def tool_error(tool_name: impl Into<String>, error: impl Into<String>) -> Self
```

## Parameters

<ParamField query="tool_name" type="impl Into<String>" required={true}>
  No description available.
</ParamField>

<ParamField query="error" type="impl Into<String>" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Self">
  The result of the operation.
</ResponseField>

***

## Related Documentation

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

  <Card title="Rust Code Execution" icon="terminal" href="/docs/rust/code-execution" />

  <Card title="Rust Web Search" icon="search" href="/docs/rust/web-search" />

  <Card title="Rust Error Handling" icon="triangle-exclamation" href="/docs/rust/error-handling" />

  <Card title="Rust Retry" icon="rotate-right" href="/docs/rust/retry" />
</CardGroup>
