Tools & approvals
What the agent can do, and how you stay in control of writes and commands.
Every tool the agent uses executes locally on your machine, in the working directory of the pane hosting the conversation. Mel's backend only relays the model's *request* to use a tool — your client runs it and sends the result back. This page lists the toolset and explains how approvals keep you in charge.
The toolset
| Tool | What it does |
|---|---|
read_file | Reads a file (up to 24 KB per call; larger files are read in pages via an offset) |
list_dir | Lists a directory |
grep | Searches the project's contents (git-aware, includes untracked files) |
find_files | Finds files by name substring across the project |
write_file | Creates or fully overwrites a file, creating parent directories |
edit_file | Exact string replacement — the old text must match uniquely, with an optional replace-all mode |
run_command | Runs a shell command (up to 10 minutes) and returns the exit code plus output |
web_search | Searches the live web — see Web search |
write_plan | Publishes a plan document to a panel beside the conversation, before code is written |
create_pdf | Renders markdown to a styled PDF. The transcript card names the renderer, shows the folder the file went to, and offers *Reveal in folder* and *Copy path* beside a clickable link that opens it — and tells you why if your machine has nothing registered to open PDFs, rather than doing nothing. Mel never opens the file on its own; that stays your click. Best fidelity with Chrome, Edge, or Chromium installed (wkhtmltopdf/weasyprint also work); machines with none of them use Mel's built-in renderer, so a PDF is always produced |
update_tasks | Creates and updates the live task checklist — see Tasks & the lifecycle |
Conversations with project memory enabled add remember and recall; orchestration adds worker-management tools.
Approvals
Tools split into two classes:
- Reads (
read_file,list_dir,grep,find_files,web_search) run without gating — they can't change anything. - Writes and commands (
write_file,edit_file,run_command) pause the run on an inline approval card showing exactly what the agent wants to do.
Each card offers:
- Allow — run this one call.
- Always allow — a checkbox that approves this *kind* of action (file edits, or commands) for the rest of the conversation.
- Deny — refuse; the agent is told and adjusts course.
"Always allow" is scoped per kind and per conversation — approving edits doesn't approve commands, and a new conversation starts fresh. To skip approvals entirely for a run, use autonomous mode.
Plan mode
Approvals gate actions one at a time. Plan mode gates the whole approach: the agent can read, search and browse, but *every* tool that would change something is refused until you approve a plan. Ask it to "plan this first", or let it decide a change is large enough to show you the shape of it, and it switches into plan mode itself.
While plan mode is on you'll see:
- a ✦ Plan mode chip beside the agent input, for as long as the mode lasts;
- the finished plan in the ✦ Plan side panel, labelled with its state — *Awaiting your approval*, *In progress*, *Completed* or *Abandoned* — and with the prompt it was written for;
- an approve/keep-planning decision in the transcript when the agent is ready.
Approving ends plan mode and the agent carries the plan out immediately. Choosing Keep planning leaves it on so the agent can revise.
Plan mode is a mode, not a per-turn setting. It survives from one turn to the next, so a plan can be researched across several exchanges. That also means it can outlive the question that would have ended it: if you type a new prompt instead of answering the approval, the decision is dropped, plan mode stays on, and the transcript says so. Two ways out at any time — click the ✦ Plan mode chip beside the input, or Exit plan mode in the plan panel's header. Either one leaves immediately, including mid-run.
The plan panel stays open after the plan is done, because it's the record of what was agreed — a finished plan says *Completed* rather than disappearing. Close it with the ✕ in its header; that closes the panel only, and doesn't change the mode.
Reopening a saved conversation does not restore plan mode: the agent is told plan mode ended with the previous session, and the plan comes back as a read-only record.
Diff cards
Every applied write_file or edit_file produces a diff card in the transcript: the file path, green +N and red -N counts, and the changed lines rendered as red/green monospace rows (long diffs are truncated for display). The turn's usage summary totals files changed and lines applied, and you can open the full change set in code review.
The agent's working discipline
The system prompt enforces habits that make tool use trustworthy:
- Read before edit — the agent reads a file before modifying it, so
edit_file's exact-match semantics catch stale assumptions instead of corrupting files. - Verify after change — after editing, it re-reads the file or runs the build/tests rather than declaring victory.
- Continue until done — multi-step work runs to completion (up to 80 tool rounds) instead of stopping at the first plausible answer.