Tools

Command Code ships with a set of built-in tools that the agent can call during a session. Each tool has a name, a short description, and a small set of parameters. The agent picks the right tool based on what you're asking it to do.

This page lists every public, operational tool call used by Command Code. Tool availability depends on the current permission mode, the prompt, and whether you're running inside an IDE.

Tools for reading, writing, and editing files on the local filesystem. All paths are validated against your workspace (the current directory and any directories added with --add-dir).

ToolDescription
read_fileRead the contents of a file by absolute path.
read_multiple_filesRead many files at once using glob patterns.
read_directoryList the contents of a directory.
write_fileCreate or overwrite a file.
edit_fileMake precise text replacements in an existing file.

Tools for finding files and code patterns across the workspace.

ToolDescription
globFind files by glob path patterns.
grepSearch file contents using regular expressions.

Tools for running shell commands and managing processes.

ToolDescription
shell_commandExecute a shell command and capture its output.
kill_shellTerminate a running process by port or pid.

Tools the agent uses to organize work and collaborate with you.

ToolDescription
todo_writeTrack progress on multi-step tasks with a structured todo list.
ask_user_questionAsk the user a clarifying question with predefined answer options.
enter_plan_modeSwitch to plan mode for read-only work.
exit_plan_modePresent a plan for approval and exit plan mode.

Tools that are only exposed when Command Code is connected to an IDE via the IDE integration.

ToolDescription
diagnosticsGet LSP errors, warnings, and hints from your IDE.

Subagents are specialized agents the main agent can delegate to. They are exposed to the model as callable tools, named after the agent. Command Code ships with these built-in subagents:

AgentDescription
exploreCodebase exploration and search across multiple files.
planDesign implementation approaches and weigh trade-offs.

In addition to the built-in tools above, any tools exposed by an MCP server you've connected are automatically registered and prefixed with mcp__<server>__<tool>. They appear alongside built-in tools and are subject to the same permission prompts.

Info

MCP tools are disabled in plan mode for safety. Only read-only, built-in tools are available in plan mode with the write_file allowed only for writing plan files.

By default, Command Code prompts you before tools that modify state (write_file, edit_file, shell_command, kill_shell) run. You can change this behavior:

  • --auto-accept: start in auto-accept mode, skipping permission prompts for write tools
  • --yolo: bypass all permission prompts (also --dangerously-skip-permissions)
  • --plan: start in plan mode

See the CLI Reference for the full list of flags.

  • Slash Commands: built-in and custom slash commands
  • CLI Reference: all flags, subcommands, and options
  • MCP: extend Command Code with external tools via Model Context Protocol
  • Hooks: run scripts before or after tool calls