Tools
The built-in tools the agent uses to read, edit, search, run commands, delegate and ask, and how they vary by model family.
The agent acts through tools. Nib's tool names and input fields (Read, Edit, Bash, file_path, old_string, …) are the ones existing hooks, permission rules and skills are written against, so they work unchanged.
Every call goes through the same gate: input validation and repair, PreToolUse hooks, the permission engine, the tool itself, then PostToolUse hooks. Read-only calls in the same batch run in parallel.
Built-in tools
Files
| Tool | What it does |
|---|---|
Read | Reads a file with line numbers. Up to 2,000 lines by default; offset and limit for ranges, and a negative offset reads from the end. Also reads images, PDFs (up to 20 pages per call) and Jupyter notebooks |
Write | Creates or overwrites a file, creating parent directories as needed |
Edit | Replaces an exact string in a file. Fails if the text isn't unique unless replace_all is set |
ApplyPatch | Applies a V4A patch that can add, update, move and delete several files atomically. GPT-family models see it as apply_patch |
EditLines | Edits by line anchors from the latest Read. Used for the few models that edit more reliably this way |
NotebookEdit | Replaces, inserts or deletes a single cell in a .ipynb notebook |
Search
| Tool | What it does |
|---|---|
Grep | Searches file contents with a regular expression (ripgrep syntax). Runs ripgrep's search engine in-process, so rg doesn't need to be installed. As in ripgrep, lookarounds and backreferences aren't supported, and the error says so |
Glob | Finds files by name pattern, such as src/**/*.{ts,tsx} |
RepoMap | Shows a compact map of the repository or a folder: the most relevant files with their exported symbols, and file counts per folder |
Shell
| Tool | What it does |
|---|---|
Bash | Runs a shell command and returns its output. Default timeout 120 s, maximum 600 s. On Windows it runs in Git Bash |
PowerShell | Runs a PowerShell command and returns its output, with the same timeouts as Bash. The shell on Windows without Git Bash, where there is no Bash tool. Each command needs your approval in Ask mode: rules can deny or ask for a command, but not approve one |
Process | Starts and manages long-running processes such as dev servers and watchers. Waits until a port, URL or log line says the process is ready |
Terminal | Drives an interactive program on a pseudo-terminal: REPLs, debuggers, ssh, prompts, terminal UIs. Not on Windows yet |
Monitor | Watches a background command, a running process or a file, and passes each new output line (optionally filtered by a pattern) to the agent while it keeps working. Ends at a deadline (5 minutes by default, 30 at most) |
StopMonitor | Ends a Monitor watch early |
Web
| Tool | What it does |
|---|---|
WebFetch | Fetches a public page and returns it as Markdown. Refuses private network addresses, and reports cross-host redirects instead of following them |
WebSearch | Searches the web and returns titles, URLs, snippets and, when the search service extracts it, each page's text as Markdown |
Browser | Browses in Nib's built-in browser, on a tab you see live in the Browser pane: opens a page, reads and acts on it, takes screenshots, and reads console and network logs |
Screenshot | Looks at a local page (localhost, 127.0.0.1, file://) in a real browser and returns a screenshot with console errors, at one or several viewport sizes |
Preview | Opens a running local dev server in the built-in browser and returns a screenshot with console errors |
Planning and conversation
| Tool | What it does |
|---|---|
TodoWrite | Maintains the session's task list. GPT-family models use UpdatePlan (update_plan) instead, and current Claude models plan without a progress tool |
AskUserQuestion | Asks you one to four multiple-choice questions when the agent is blocked on a decision that is yours |
NextSteps | Puts one to three follow-up buttons under the agent's final message. A click sends that step as your message |
EnterPlanMode, ExitPlanMode | Switch into plan mode, and present a plan for approval |
Skill | Loads a skill |
ToolSearch | Loads deferred tools by name or keyword |
UseTool | Calls a tool that ToolSearch loaded |
Agents
| Tool | What it does |
|---|---|
Agent | Starts a subagent with a fresh context for a self-contained task |
SendMessage | Sends a message to another agent: a subagent, a teammate, or another session |
ListAgents | Lists the agents you can message |
TaskStop | Stops a background agent, or a background shell command or process |
Workflow | Runs a script that orchestrates many subagents in the background and reports only its result. Used only when you ask for multi-agent orchestration |
Code intelligence
| Tool | What it does |
|---|---|
Diagnostics | Reports compiler and language-server errors and warnings for files |
LSP | Read-only language-server queries: go to definition or implementation, find references, hover, document and workspace symbols, call hierarchy |
RenameSymbol | Renames a symbol across the project through the language server. It first shows one combined diff and the textual mentions the server won't change (comments, strings); applying writes every file at once |
Tests and review
| Tool | What it does |
|---|---|
RunTests | Runs the project's tests (the framework is detected) and returns pass, fail and skip counts with each failure's location and message. The full log is saved as an artifact |
ReportFindings | Returns a code review's verified findings as structured data, once, at the end of the review |
Session
| Tool | What it does |
|---|---|
Chapter | Starts a new chapter: a divider in the transcript and an entry in its table of contents |
Compact | Replaces the earlier turns in the agent's context with a summary, when you ask for it or accept the offer. Your transcript keeps every turn |
History | Searches and re-reads this session's complete history, including what was compacted or trimmed from the agent's context. Reading other sessions of the project follows your permission mode: default asks you first, auto mode leaves it to the classifier, and a History(…) rule can allow it |
RenameSession | Renames this session or another of yours |
ArchiveSession | Archives another of your sessions. It leaves the sidebar and can be restored |
ForkSession | Starts a new session with this conversation and its settings so far, in the same place, so you can try another way without losing this one |
EnterWorktree, ExitWorktree | Moves the session into a new git worktree on its own branch, and back out, keeping or removing the worktree. Only when you ask for isolated work |
Scheduling
| Tool | What it does |
|---|---|
CronCreate | Schedules a prompt in this session on a five-field cron schedule in your local time zone, recurring or once. Jobs run only while the session is idle, and recurring ones expire after 7 days |
CronDelete, CronList | Cancel a scheduled job, and list this session's jobs with their next run times |
ScheduleWakeup | Schedules the next iteration of a self-paced /loop |
Artifacts and handoff
| Tool | What it does |
|---|---|
Artifact | Creates and edits living artifacts (dashboards, small apps, docs, decks, diagrams and tables) that you see in the Artifact pane |
ArtifactCheck | Builds an artifact and renders it without a window: build errors, console errors, data binding states and a screenshot |
ArtifactData | Gives an artifact live data and capabilities |
ArtifactComments | Reads the comments you pinned on an artifact, and resolves them once addressed |
MoveSession | Continues the session on a new cloud computer when you ask, so the work goes on after you close your laptop (cloud computers aren't open yet) |
StructuredOutput | Returns the final answer as JSON that matches the session's output schema, such as the Agent SDK's outputFormat |
Some tools are there only when the session's host provides what they need: History (a saved history), the scheduling tools (a scheduler), the worktree tools (worktrees), Browser, Screenshot and Preview (a browser), the artifact tools (artifacts), MoveSession (somewhere to move), Workflow (workflows), Skill (at least one skill) and StructuredOutput (an output schema).
Behavior worth knowing
Read before edit. Edit and EditLines work only on a file the agent has read, and Write overwrites only a file it has read in full. ApplyPatch needs no read: its patch carries the lines it must match. After a partial read, Edit may change only the lines that were seen. Nib records the file's size and modification time at read time and checks them again before writing. If the file changed since, Edit still applies an exact, unique match and says the file changed, while a fuzzy match is refused until the agent reads the file again; Write refuses to overwrite it. A change that lands while Nib is writing aborts the write.
Fuzzy matching, reported. If Edit's old_string doesn't match exactly, Nib tries a ladder of increasingly lenient matches (line endings and typographic quotes, dashes and spaces folded to plain ones, then trailing whitespace ignored, then indentation ignored, then a block matched by its first and last lines). It reports which tier it used, and refuses matches that are suspiciously different in size.
Diagnostics after edits. After an edit, Nib runs the relevant checker (tsgo or tsc for TypeScript, or a language server) and appends new errors to the tool result. The agent sees a type error it introduced in the same step.
A shell that behaves. Each Bash command runs non-interactively: stdin is closed and pagers are disabled (PAGER=cat, GIT_PAGER=cat), so nothing hangs waiting for input. The working directory carries over between calls while it stays inside the workspace. Secrets are stripped from the environment. A command that runs past its timeout is moved to the background instead of being killed, and the agent is notified when it exits; a command that starts with sleep is killed.
Exit codes in context. Exit code 1 from grep, rg, find, diff, test and git diff means "no matches" or "different", and isn't treated as an error.
Large outputs spill to artifacts. Output over about 30,000 characters is cut to its head and tail, and the full text is saved as an artifact. The agent can Read or Grep it as artifact:<id>, so nothing is lost and the context stays small.
Tools per model family
Each model's profile picks the tool set it works best with. Hooks and permission rules always see the canonical name in the first column.
| Tool | Claude | GPT | Gemini and most open models | Line-anchor models |
|---|---|---|---|---|
Read | ✓ | ✓ | ✓ | ✓ (with line anchors) |
Edit | ✓ | — | ✓ | — |
ApplyPatch | — | as apply_patch | — | — |
EditLines | — | — | — | ✓ |
Write | ✓ | ✓ | ✓ | ✓ |
TodoWrite | Older models (see below) | — | ✓ | ✓ |
UpdatePlan | — | as update_plan | — | — |
ToolSearch, UseTool | ✓ | — | ✓ | ✓ |
| Everything else | ✓ | ✓ | ✓ | ✓ |
- Claude: current models (the 5 series, and the 4 series after Opus 4.7, Sonnet 4.6 and Haiku 4.5) plan without a progress tool. Set
CLAUDE_CODE_ENABLE_TODO_TOOLS=1to give themTodoWriteback. - GPT: GPT-5 and later edit with
apply_patch;gpt-ossusesEdit. GPT models get every tool up front, so they don't needToolSearch. - Line-anchor models: a few small models whose profile picked
EditLinesbecause it made their edits more reliable.
Deferred tools
Every tool definition costs context on every turn. Tools that are useful but rarely needed are deferred: the model sees only their names, and loads the full definition with ToolSearch when it needs one.
The core set is what most turns need: reading, editing, writing and searching files, Bash, the progress tool, Agent, AskUserQuestion, the web tools, ToolSearch, UseTool, NextSteps, and SendMessage, ListAgents, History, Skill, Artifact and StructuredOutput when the session has them. Everything else is deferred, MCP tools included. GPT-family models get every tool up front instead.
Loading a tool doesn't change the tools sent with each request, so the start of the prompt stays byte-identical from turn to turn and the provider's prompt cache keeps working. The loaded definition arrives as the result of ToolSearch, and the agent calls the tool through UseTool. On routes where the provider can defer tools itself, Nib uses that for the models that support it.
MCP tools
Tools from MCP servers appear as mcp__<server>__<tool>. They are deferred unless the server marks them as always loaded. Two extra tools, ListMcpResourcesTool and ReadMcpResourceTool, read resources the servers expose.
Limiting tools
- Deny a tool for everyone with a permission rule:
"deny": ["WebSearch"]. - Deny it for one run:
nib --disallowedTools WebFetch. - Give a subagent a narrower set with
tools:in its frontmatter, or take tools away from a skill withdisallowed-tools:.