---
question: Where do the tools an agent can call come from?
kind: overview
---

# Tools

A tool is a function an agent's model can call. The model reads each tool's name, description and arguments, decides when to call one, and gets its result back. Tools are Python, attached to an engine agent in its `New()`: see [Give it tools](/user-guide/build/agents/give-it-tools). A workspace agent has none.

No `abi` command, REST endpoint or `config.yaml` key creates a tool. Nexus only lists them: Edit Agent shows a read-only **Tools** list.

## Where tools come from

- **Workflows**: a workflow returns its tools with `as_tools()`. See [Creating a Workflow](/user-guide/build/agents/creating-a-workflow).
- **Integrations**: by convention, an integration file has a module-level `as_tools(configuration)`. See [Creating an Integration](/user-guide/build/agents/creating-an-integration).
- **SPARQL queries**: the `templatablesparqlquery` module turns the queries declared in a module's ontology folder into tools, with no Python. See [SPARQL Query Template System](/user-guide/build/knowledge-graph/sparql_query_template_system).
- **Functions**: any LangChain tool, such as a function with the `@tool` decorator.
- **Sub-agents**: each sub-agent adds a `transfer_to_<name>` tool to its parent. See [Add sub-agents](/user-guide/build/agents/add-sub-agents).

## Key concepts

- **Name and description**: what the model chooses from. Write the description as the question or action the tool answers. A name keeps letters, digits, `_` and `-`; other characters become `_`.
- **Arguments**: a Pydantic model (`args_schema`). Field descriptions tell the model what to pass.
- **Default tools**: every agent gets `get_time_date`, and four code-workspace tools (`write_file`, `read_file`, `list_dir`, `run_terminal`) that the model only sees when a code workspace is bound to the request. `enable_default_tools=False` on the agent leaves them out.
- **Tool calling**: the chat model has to support it. Otherwise the engine logs a warning and the agent runs without tools.
- **`[TOOLS]`**: the scaffolded system prompt lists each tool's name and description in place of this placeholder.

## Module tools

The engine also loads the tool classes of a module's `tools/` folder, subclasses of `Expose` or of LangChain's `BaseTool`, and keeps an instance of each on the module. An `Expose` tool whose `run(parameters)` takes a Pydantic model gets a REST route, `POST /tools/<class name in snake case>`, with the same `ABI_API_KEY` auth as the agents. A LangChain `BaseTool` stays inside the agents: it has no route.
