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

# register • AI Agent SDK

> register: Register a tool with the registry.

# register

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

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

Register a tool with the registry.

Thread-safe: Uses lock for concurrent access in multi-agent scenarios.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def register(tool: Union[BaseTool, Callable], name: Optional[str], overwrite: bool, trust_level: Optional[str], dynamic_schema_overrides: Optional[Callable[[Dict[str, Any]], Dict[str, Any]]]) -> None
```

## Parameters

<ParamField query="tool" type="Union[BaseTool, Callable]" required={true}>
  BaseTool instance or callable function
</ParamField>

<ParamField query="name" type="Optional[str]" required={false}>
  Override name (default: tool.name or function.**name**)
</ParamField>

<ParamField query="overwrite" type="bool" required={false} default="False">
  If True, overwrite existing tool with same name
</ParamField>

<ParamField query="trust_level" type="Optional[str]" required={false}>
  Trust level for the tool ("trusted" or "external")
</ParamField>

<ParamField query="dynamic_schema_overrides" type="Optional" required={false}>
  Optional function to dynamically modify tool schema. Called with base schema dict, returns modified schema dict.
</ParamField>

### Exceptions

<AccordionGroup>
  <Accordion title="ValueError">
    If tool with same name exists and overwrite=False
  </Accordion>
</AccordionGroup>

## Uses

* `ToolTrustLevel`
* `ValueError`
* `callable`
* `TypeError`
* `logging.debug`
* `ToolEntry`

## Used By

* [`HookRegistry.register_function`](../functions/HookRegistry-register_function)
* [`HookRegistry.register_command`](../functions/HookRegistry-register_command)
* [`register_middleware`](../functions/register_middleware)
* [`register_runtime`](../functions/register_runtime)
* [`tool`](../functions/tool)

## Source

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