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

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

> This is a method of the [**RuntimeToolResultMiddleware**](../classes/RuntimeToolResultMiddleware) class in the [**middleware**](../modules/middleware) 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

<ParamField query="result" type="Any" required={true}>
  Raw tool result from the plugin harness
</ParamField>

<ParamField query="tool_name" type="str" required={true}>
  Name of the tool that was executed
</ParamField>

<ParamField query="ctx" type="MiddlewareContext" required={true}>
  Execution context with metadata
</ParamField>

### Returns

<ResponseField name="Returns" type="NormalizedToolResult">
  NormalizedToolResult with standardized format
</ResponseField>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/runtime/middleware.py#L91">
  `praisonaiagents/runtime/middleware.py` at line 91
</Card>
