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

# normalize • AI Agent SDK

> normalize: Normalize a tool result into standard format.

# normalize

Method

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

Normalize a tool result into standard format.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def normalize(result: Any, tool_name: str, ctx: MiddlewareContext) -> NormalizedToolResult
```

## Parameters

**result** `Any` *required*

Raw tool result from the plugin harness

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

Name of the tool that was executed

**ctx** `MiddlewareContext` *required*

Execution context with metadata

### Returns

**Returns** `NormalizedToolResult`

NormalizedToolResult with standardized format

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/middleware.py#L91)
>
> `praisonaiagents/runtime/middleware.py` at line 91


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