Skip to Content

Tools

Tools connect a model response to real work: reading a file, applying a patch, or running a test. You describe the outcome; Codai selects from the tools allowed by the current mode, configuration, and approval policy.

Find the parser for configuration files, add a regression test for an empty model name, and run the relevant tests. Keep unrelated files unchanged.

Inspect available tools

From your shell:

codai config tools

Inside a session:

:config tools

Configuration inspection does not start MCP processes or load plugin assemblies. External tools are discovered separately when needed, so offline inspection is not a live inventory of every remote capability.

These tools are read-only and available in Plan and Agent unless disabled.

ToolPurposeWhen it helps
list_filesList project filesUnderstand a directory before opening files
globFind paths by glob patternLocate test files or a named implementation
grepSearch text in project filesTrace a setting, error message, or symbol
read_fileRead numbered text, optionally by rangeInspect code and cite exact lines
git_statusInspect working-tree stateIdentify existing changes
git_diffInspect Git differencesReview edits without changing Git state
git_logRead recent historyUnderstand prior changes

read_file accepts one path or up to 20 paths sharing an output budget. Its default is 2,000 lines per file, with a 5,000-line ceiling and a 5 MB file-size limit. Large results should be narrowed with paths and line ranges, not repeatedly read in full.

File changes

ToolPurposeRequirement
write_fileCreate or replace a text fileAgent and write approval
edit_fileApply a targeted text editAgent and write approval
apply_patchAdd, update, or delete files through a patchAgent and write approval

Existing files must be readable within the 8 MB editing limit before replacement, patching, or patch deletion. Failed reads do not authorize an overwrite.

Edit steps show actual added and removed line counts. Expand a step to review per-file counts and a bounded diff. If a multi-file patch fails partway through, the failed result reports changes that already reached disk; it is not an atomic rollback.

Commands and verification

ToolPurposeRequirement
run_commandExecute a command in the projectAgent, shell access, and approval
dotnet_buildRun dotnet build and return compiler diagnosticsAgent, shell access, and approval
dotnet_testRun .NET tests and return resultsAgent, shell access, and approval

Builds and tests can write artifacts, so they are not read-only operations. Disable all three with --no-shell.

Commands run with your user’s privileges. Review the exact command and working context before approval. Tool policy is not an operating-system sandbox.

Research and interaction

ToolPurposeBoundary
fetch_webRetrieve readable content from a public HTTP(S) pageNo private-network URLs, binaries, or embedded credentials
ask_questionAsk you for clarificationRequires interactive input; headless runs cannot invent an answer
taskDelegate a bounded investigationRead-only context; no nested delegation
submit_taskReturn a structured task outcomeReports an outcome; does not itself edit files

fetch_web is a page reader, not a browser or search engine. It does not execute scripts or load page subresources; retrieved text is untrusted data. Delegation spends model tokens even though it cannot write files.

Skills

ToolPurpose
skillsDiscover available skill metadata
read_skillLoad a selected skill’s instructions
read_skill_resourceRead a resource from a skill

Skill instructions guide a workflow; they do not enable tools blocked by mode or policy. See Skills to create and invoke a reusable workflow.

Limit tool access

Hide and block a named tool for a single run:

codai --disable-tool fetch_web --disable-tool run_command

Use disabled_tools in configuration for persistent exclusions. --no-sub-agents disables delegation; --no-shell disables command tools. Names must match Codai-facing tool names, including prefixes for MCP tools.

Extend the tool set

  • MCP servers add capabilities from local processes or remote endpoints.
  • .NET plugins register tools in the host process.
  • Permissions still govern external tools; installing a tool does not grant consent to execute it.
Last updated on