> ## 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 Definition • AI Agent SDK

> get_tool_definition: Get the effective OpenAI-compatible definition for one registered name.

# get\_tool\_definition

Method

> This is a method of the [**ToolRegistry**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/ToolRegistry.md) class in the [**registry**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/registry.md) module.

Get the effective OpenAI-compatible definition for one registered name.

Unlike :meth:`get`, which returns the raw tool object, this applies any
dynamic `schema_override` (via `ToolEntry.schema`) and forces the
advertised `function.name` to the registry key, so a callable
registered under an alias is offered — and later resolved — under that
alias rather than its underlying `__name__`.

Returns `None` if the name is unknown or unavailable.

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

## Parameters

**name** `str` *required*

No description available.

### Returns

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

The result of the operation.

## Uses

* `discover_plugins`
* `logging.error`

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/registry.py#L314)**
>
> `praisonaiagents/tools/registry.py` at line 314

***

## Related Documentation

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

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

> **[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.