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

# Tools

> Built-in tools, declarative tool definitions, and allowlists/denylists for controlling agent capability.

When you run an agent, it uses tools to actually do things — read a file, run a shell command, write output. You control exactly which tools are available.

<Tip>
  For example, a code reviewer only needs `read` and `cli`. A file generator needs `write`. You can allowlist or denylist per query.
</Tip>

## Built-in Tools

| Tool            | Description                                    | Concurrent      | Read-only     |
| --------------- | ---------------------------------------------- | --------------- | ------------- |
| `cli`           | Execute shell commands                         | not concurrent  | not read-only |
| `read`          | Read file contents with pagination             | concurrent safe | read-only     |
| `write`         | Create/write files (auto-creates dirs)         | not concurrent  | not read-only |
| `edit`          | Edit existing file contents (find and replace) | not concurrent  | not read-only |
| `memory`        | Load/save git-committed memory (auto-archives) | not concurrent  | not read-only |
| `capture_photo` | Capture camera frame as photo                  | not concurrent  | not read-only |
| `task_tracker`  | Track task progress, search skills             | not concurrent  | not read-only |
| `skill_learner` | Save/evaluate learned skills with confidence   | not concurrent  | not read-only |

## Tool Details

* **cli** — Runs shell commands. Timeout is 120s by default (configurable). Output is capped at \~100 KB (stdout + stderr combined).
* **read** — Reads file contents. Encoding utf-8 (binary files return a placeholder message). Use offset and limit for large files (offset = start line, limit = number of lines) — it won't load the whole thing at once.
* **write** — Creates or overwrites files. Parent directories are created automatically.
* **memory** — Loads and saves to memory/MEMORY.md. `load` returns MEMORY.md contents; `save` appends + git commits (every save is a git commit — fully versioned). Auto-archives when max\_lines exceeded to `memory/archive/<YYYY-MM>.md`.

## Declarative Tools

```yaml theme={null}
# tools/lookup-account.yaml
name: lookup-account
description: Look up account details by customer ID
input_schema:
  properties:
    customer_id:
      type: string
      description: The customer ID
  required: [customer_id]
implementation:
  script: scripts/lookup.sh
  runtime: sh
```

The script receives JSON args on stdin and outputs plain text on stdout.

## Tool Allowlists and Denylists

```typescript theme={null}
// SDK — allowlist or denylist per query
for await (const msg of query({
  prompt: "...",
  allowedTools: ["read", "cli"],
  disallowedTools: ["write"],
})) { /* ... */ }
```

<CardGroup cols={2}>
  <Card title="Skills" icon="sparkles" href="/open-source/gitagent/capabilities/skills">
    Reusable task modules the agent learns and crystallizes over time
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/open-source/gitagent/capabilities/workflows">
    Chain skills into deterministic, repeatable pipelines
  </Card>

  <Card title="Hooks" icon="webhook" href="/open-source/gitagent/capabilities/hooks">
    Intercept, block, or modify agent behavior at every stage
  </Card>

  <Card title="Plugins" icon="puzzle-piece" href="/open-source/gitagent/capabilities/plugins">
    Extend GitAgent with installable tools, skills, and hooks
  </Card>
</CardGroup>
