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

# Tool Call • AI Agent SDK

> tool_call: Script a turn in which the model calls one tool.

# tool\_call

Method

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

Script a turn in which the model calls one tool.

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

## Parameters

**name** `str` *required*

Tool function name.

**arguments** `Optional`

Arguments to call it with.

### Returns

**Returns** `ScriptedReply`

class:`ScriptedReply` to put in the script.

## Uses

* `ScriptedReply`
* `ScriptedToolCall`

## Source

> **[View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/model_harness/scripted.py#L311)**
>
> `praisonaiagents/model_harness/scripted.py` at line 311

***

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