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

> tool_end: Emit tool end event.

# tool\_end

Method

> This is a method of the [**TraceEmitter**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/TraceEmitter.md) class in the [**protocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocol.md) module.

Emit tool end 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_end"]
    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_end(tool_name: str, duration_ms: float, status: str, result_summary: Optional[str], agent_name: Optional[str], agent_id: Optional[str], error_message: Optional[str], metadata: Optional[Dict[str, Any]]) -> None
```

## Parameters

**tool\_name** `str` *required*

No description available.

**duration\_ms** `float` *required*

No description available.

**status** `str` (default: 'ok')

No description available.

**result\_summary** `Optional[str]`

No description available.

**agent\_name** `Optional[str]`

No description available.

**agent\_id** `Optional[str]`

No description available.

**error\_message** `Optional[str]`

No description available.

**metadata** `Optional`

No description available.

## Uses

* `ActionEvent`
* `time.time`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/trace/protocol.py#L316)
>
> `praisonaiagents/trace/protocol.py` at line 316

***

## 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.