> ## 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 Tool Schema Consistency • AI Agent SDK

> validate_tool_schema_consistency: Validate a list of tools for schema consistency with OpenAI format.

# validate\_tool\_schema\_consistency

Function

> This function is defined in the [**base**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/base.md) module.

Validate a list of tools for schema consistency with OpenAI format.

This function ensures all tools in a list can be properly serialized
and have consistent schema structures for use with LLM providers.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    agent["Agent"] -- "uses" --> tool["Tool: validate_tool_schema_consistency"]
    tool -- "returns" --> result["Result"]
    style tool fill:#189AB4,color:#fff
    style agent fill:#8B0000,color:#fff
    style result fill:#8B0000,color:#fff
```

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def validate_tool_schema_consistency(tools: List[Any], return_schemas: bool) -> Any
```

## Parameters

**tools** `List[Any]` *required*

List of tool objects to validate

**return\_schemas** `bool` (default: False)

If True, return the list of built schemas instead of just a boolean, so callers can reuse them without rebuilding.

### Returns

**Returns** `Any`

True if all tools are valid and consistent (or the built schemas list
when `return_schemas` is True)

### Exceptions

> [accordion] ToolValidationError
>
> If validation fails

## Uses

* `validate_tool`
* `ToolValidationError`
* `json.dumps`
* `names.add`

## Used By

* [`get_sorted_tool_schemas`](../functions/get_sorted_tool_schemas)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/base.py#L530)
>
> `praisonaiagents/tools/base.py` at line 530

***

## Related Documentation

> [card] [Tools Concept](https://praison.ai/docs/docs/concepts/tools)

> [card] [Create Custom Tools](https://praison.ai/docs/docs/guides/tools/create-custom-tools)

> [card] [Tool Development](https://praison.ai/docs/docs/tutorials/advanced-tool-development)


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