> ## Documentation Index
> Fetch the complete documentation index at: https://docs.definable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# What are Tools?

> Tools are functions agents call to interact with external systems.

Tools are what make agents capable of real-world action. While LLMs alone can only generate text, agents equipped with tools can search the web, run queries, send emails, call APIs, and perform any action you define.

```python theme={null}
from definable.agent import Agent
from definable.tool.decorator import tool

@tool
def get_weather(city: str) -> str:
    """Get the current weather for a city."""
    return f"The weather in {city} is sunny, 72F."

agent = Agent(
    model="gpt-4o",
    tools=[get_weather],
)

output = agent.run("What's the weather in San Francisco?")
print(output.content)
```

<Tip>
  The `@tool` decorator converts any Python function into an agent-callable tool. Definable automatically generates the JSON Schema from type hints and docstrings.
</Tip>

## How Tools Work

1. The agent sends tool definitions (JSON Schema) to the model.
2. The model decides which tools to call based on the user's message.
3. Tools execute and results are returned to the model.
4. The model processes results and continues (or returns a final response).
5. The loop repeats until the model responds without tool calls.

<Check>
  When using `arun()`, multiple tool calls from the same model response execute concurrently.
</Check>

## Guides

<CardGroup cols={3}>
  <Card title="Create Tools" icon="code" iconType="duotone" href="/tools/creating-tools/overview">
    Write custom Python functions as tools.
  </Card>

  <Card title="Parameters" icon="list" iconType="duotone" href="/tools/creating-tools/parameters">
    Type hints, descriptions, and JSON Schema.
  </Card>

  <Card title="Hooks" icon="anchor" iconType="duotone" href="/tools/creating-tools/hooks">
    Run logic before and after execution.
  </Card>

  <Card title="Caching" icon="database" iconType="duotone" href="/tools/creating-tools/caching">
    Cache results for identical arguments.
  </Card>

  <Card title="Async Tools" icon="bolt" iconType="duotone" href="/tools/creating-tools/async-tools">
    Async tool functions for concurrent execution.
  </Card>

  <Card title="Dependencies" icon="puzzle-piece" iconType="duotone" href="/tools/creating-tools/dependencies">
    Inject services and state into tools.
  </Card>
</CardGroup>

## Toolkits & Skills

| Type                              | What it is                                    | Example                     |
| --------------------------------- | --------------------------------------------- | --------------------------- |
| [**Toolkit**](/toolkits/overview) | Bundle of related tools with shared lifecycle | MCPToolkit, BrowserToolkit  |
| [**Skill**](/skills/overview)     | Instructions + tools for a learned behavior   | GitHub, Slack, SQL Database |
| [**MCP**](/mcp/overview)          | Tools from MCP servers via stdio/HTTP         | Any MCP-compatible server   |

## Resources

* [@tool reference](/reference/tools/decorator)
* [Tool examples](/examples/tools)
* [Built-in skills](/skills/built-in)
* [MCP integration](/mcp/overview)
