normalize • AI Agent SDK
normalize: Normalize a tool result into standard format.
normalize
Method
</div>
This is a method of the RuntimeToolResultMiddleware class in the middleware module.
Normalize a tool result into standard format.
Signature
def normalize(result: Any, tool_name: str, ctx: MiddlewareContext) -> NormalizedToolResultParameters
ParamField
AnyRaw tool result from the plugin harness
ParamField
strName of the tool that was executed
ParamField
MiddlewareContextExecution context with metadata
Returns
ResponseField
NormalizedToolResultNormalizedToolResult with standardized format
Source
View on GitHubpraisonaiagents/runtime/middleware.py at line 91