# MCP tools

> The tools DMN's MCP server gives agents: search, read, memory, index, impact, edit, run, canvas, lease, test and repo, with their modes, what each needs approval for, and how to connect a client.

Source: https://getdmn.com/docs/mcp-tools/

## The tools

| Tool | What it does | Modes and main inputs |
|---|---|---|
| `search` | Code search: plain-language questions, symbols, callers, folder maps, file globs and exact text | `mode`: `auto` (the default), `symbol`, `trace`, `structure`, `files`, `grep`, `keyword`, `graph`. `query`, `path`, `file_types`, `limit`; `curate` returns full code sections for the top hits |
| `read` | Read source by file and line range, or by symbol name; also the project's rules | `path` or `symbol`, `start_line`, `end_line`; `source: rules` |
| `memory` | The project's shared notes | `mode`: `read` (a note, the list, or a search with `query`), `write`, `delete`; `reflect` and `synthesize` distil and merge notes with the model set in Settings ▸ Memory |
| `impact` | What could break if a symbol or file changes | `symbol` or `path`, `depth` |
| `lease` | Claims on files an agent is about to edit, so other agents can see them | `mode`: `claim`, `release`, `list`, `check`. `paths`, `reason`, `ttl_minutes` (30 by default, at most 480) |
| `repo` | Branch, status, recent commits, ahead and behind, stashes and an in-progress merge or rebase | `commit_limit` |
| `index` | The project's index: its status, what's in it, and starting an update | `mode`: `status`, `list`, `preview`, `start`, `drop` |
| `test` | Which tests exercise the current changes, for Rust projects, with the commands to run them | `base_ref`, `head_ref` |
| `edit` | Change a file: replace exact lines, or a whole symbol's body | `path`, then `deltas` or `symbol` with `replace`. Needs your approval |
| `run` | Run a command in the project and capture its output and exit code | `command`, `cwd`, `timeout_secs`. Needs your approval, unless the project runs commands in the WSL jail |
| `canvas` | Show a diff, a file or test results as a tile in the DMN app | `mode`: `diff`, `file`, `test_results` |

## Approvals

`edit` and `run` change things, so the first call doesn't do it: it returns `approval_required` with an id. The request waits in the Fleet panel until you click **Approve once** or **Reject**, and the agent retries with that id. An approval covers that exact request, once.

With the [WSL jail](/docs/security/#the-wsl-jail) on for a project, `run` executes in Linux over a copy of the project and needs no approval.

## Connecting a client

```sh
dmn mcp-init            # preview what it would add, for every client it finds
dmn mcp-init --apply    # write it
dmn mcp-init --print    # just print the config block for each client
```

The server is the `dmn-mcp-bridge` program, over standard input and output. It finds the project from the folder the client starts it in. [Connect your agents](/docs/connect/) covers each client.

## Skill or MCP

The tools and the `dmn` command line reach the same engine. The skill is lighter: tool definitions are sent with every request an agent makes, and the skill sends none. In [our benchmark](/benchmarks/#levers), agents given DMN over MCP instead of the skill never called its tools, and saved nothing. Use MCP for agents without a shell.
