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

# To Model Output • AI Agent SDK

> to_model_output: Build the compact model-facing view via the ``to_model_output`` fn.

# to\_model\_output

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

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

Build the compact model-facing view via the `to_model_output` fn.

Returns `None` when no builder was supplied so the executor falls back
to the full output (unchanged behaviour).

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def to_model_output(result: Any) -> Optional[Any]
```

## Parameters

<ParamField query="result" type="Any" required={true}>
  No description available.
</ParamField>

### Returns

<ResponseField name="Returns" type="Optional[Any]">
  The result of the operation.
</ResponseField>

## Uses

* `logging.warning`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/decorator.py#L193">
  `praisonaiagents/tools/decorator.py` at line 193
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Output Concept" icon="file-export" href="/docs/docs/concepts/output" />

  <Card title="Output Configuration" icon="gear" href="/docs/docs/configuration/output-config" />

  <Card title="Save Output" icon="floppy-disk" href="/docs/docs/features/save-output" />
</CardGroup>
