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

# Validate Schema Roundtrip • AI Agent SDK

> validate_schema_roundtrip: Validate that schema can round-trip through OpenAI-style serialization.

# validate\_schema\_roundtrip

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

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

Validate that schema can round-trip through OpenAI-style serialization.

This ensures the tool schema is compatible with LLM providers that expect
OpenAI function calling format and that parameters can be properly parsed.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def validate_schema_roundtrip() -> bool
```

### Returns

<ResponseField name="Returns" type="bool">
  True if round-trip validation passes
</ResponseField>

### Exceptions

<AccordionGroup>
  <Accordion title="ToolValidationError">
    If round-trip fails
  </Accordion>
</AccordionGroup>

## Uses

* `get_schema`
* `json.dumps`
* `json.loads`
* `ToolValidationError`

## Used By

* [`validate_tool`](../functions/validate_tool)
* [`tool`](../functions/tool)

## Source

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