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

# Function Tool • AI Agent SDK

> FunctionTool: A BaseTool wrapper for plain functions.

# FunctionTool

> Defined in the [**decorator**](../modules/decorator) module.

<Badge color="blue">AI Agent</Badge>

A BaseTool wrapper for plain functions.

Created automatically by the @tool decorator.
Supports Injected\[T] parameters for state injection.

```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: FunctionTool"]
    tool -- "returns" --> result["Result"]
    style tool fill:#189AB4,color:#fff
    style agent fill:#8B0000,color:#fff
    style result fill:#8B0000,color:#fff
```

## Constructor

<ParamField query="func" type="Callable" required={true}>
  No description available.
</ParamField>

<ParamField query="name" type="Optional[str]" required={false}>
  No description available.
</ParamField>

<ParamField query="description" type="Optional[str]" required={false}>
  No description available.
</ParamField>

<ParamField query="version" type="str" required={false} default="'1.0.0'">
  No description available.
</ParamField>

<ParamField query="availability" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="dynamic_schema_overrides" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="retry_policy" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="approval" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="requires_approval" type="Union[bool, str]" required={false} default="_UNSET">
  No description available.
</ParamField>

<ParamField query="to_model_output" type="Optional" required={false}>
  No description available.
</ParamField>

## Methods

<CardGroup cols={2}>
  <Card title="injected_params()" icon="function" href="../functions/FunctionTool-injected_params">
    Get the injected parameters for this tool.
  </Card>

  <Card title="run()" icon="function" href="../functions/FunctionTool-run">
    Execute the wrapped function with injected state.
  </Card>

  <Card title="to_model_output()" icon="function" href="../functions/FunctionTool-to_model_output">
    Build the compact model-facing view via the `to_model_output` fn.
  </Card>

  <Card title="check_availability()" icon="function" href="../functions/FunctionTool-check_availability">
    Check if this tool is currently available to run.
  </Card>
</CardGroup>

## Source

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Tools Concept" icon="wrench" href="/docs/docs/concepts/tools" />

  <Card title="Create Custom Tools" icon="plus" href="/docs/docs/guides/tools/create-custom-tools" />

  <Card title="Tool Development" icon="code" href="/docs/docs/tutorials/advanced-tool-development" />
</CardGroup>
