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

# Get Tool Schema • AI Agent SDK

> get_tool_schema: Get OpenAI-compatible schema for any tool-like object.

# get\_tool\_schema

Function

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

Get OpenAI-compatible schema for any tool-like object.

Supports:

* BaseTool instances
* FunctionTool instances
* Plain functions (generates schema from signature)
* LangChain tools
* CrewAI tools

```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: get_tool_schema"]
    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 get_tool_schema(obj: Any) -> Optional[Dict[str, Any]]
```

## Parameters

**obj** `Any` *required*

No description available.

### Returns

**Returns** `Optional[Dict[str, Any]]`

The result of the operation.

## Uses

* `obj.get_schema`
* `callable`

## Used By

* [`ToolEntry.schema`](../functions/ToolEntry-schema)

## Source

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

***

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