Misar Docs
MisarMailMisar.BlogMisarReachMisarPostMisar.DevMisar PlatformMisar IdentityMisar Posts API
Features

Tools

Complete reference for all 33+ tools available to the Misar Code agent across file system, search, git, IDE, and agent control categories.

Overview

The Misar Code agent uses a rich set of tools to interact with your workspace. Tools are invoked automatically based on your request — you do not call them directly. This page documents every available tool so you know exactly what the agent can do.

Run /explore to enter read-only mode, which disables all write and destructive tools for safe codebase exploration.

File System (11 tools)

ToolDescription
list_dirList files and directories at a given path
read_fileRead the full contents of a file
read_rangeRead a specific line range from a file
write_fileCreate or overwrite a file with new content
replace_in_fileApply a targeted string replacement inside a file
apply_patchApply a unified diff patch to one or more files
create_dirCreate a new directory (including nested paths)
removeDelete a file or directory
moveMove or rename a file or directory
copyCopy a file or directory to a new location
statGet metadata for a file (size, modified time, type)

Search (5 tools)

ToolDescription
searchFull-text search across the workspace
grepRegex pattern search in files
globFind files matching a glob pattern
find_related_filesLocate files related to a given symbol or path
repo_mapGenerate a high-level map of repository structure

Git (6 tools)

ToolDescription
git_statusShow current working tree status
git_diffShow diffs (staged, unstaged, or between commits)
git_logShow commit history
git_commitCreate a commit with a message
git_create_branchCreate and switch to a new branch
git_pushPush commits to a remote

The agent follows safe git practices by default: it will not force-push to main/master and will not skip hooks. It will ask for confirmation before destructive git operations.

IDE Integration (5 tools)

ToolDescription
list_open_editorsList all currently open editor tabs
get_selectionGet the currently selected text in the active editor
get_active_editorGet the active file path and cursor position
get_diagnosticsRead VS Code error and warning diagnostics
run_testsRun the workspace test suite and capture output

Web (3 tools)

ToolDescription
web_fetchFetch the content of a URL (proxied through the backend)
web_searchSearch the web for current information
query_documentationQuery official documentation for a library or API

Notebook (2 tools)

ToolDescription
notebook_readRead cells and outputs from a Jupyter notebook
notebook_editEdit cells in a Jupyter notebook

Git Worktree (2 tools)

ToolDescription
enter_worktreeCreate and switch into a git worktree for isolated work
exit_worktreeExit a worktree and return to the main workspace

Plan (1 tool)

ToolDescription
write_planWrite a numbered execution plan for review before implementation

Agent Control (12 tools)

ToolDescription
enter_plan_modeSwitch to plan-only mode; the agent proposes steps without executing them
exit_plan_modeExit plan mode and begin execution
save_memoryPersist a note to .misar/MEMORY.md for future sessions
todo_writeWrite a structured task list for tracking subtasks
todo_readRead the current task list
ask_userPause and ask the user a clarifying question
spawn_agentLaunch a sub-agent for a parallel or delegated subtask
send_messageSend a message to a running sub-agent
task_outputRead output from a completed sub-agent task
task_stopStop a running sub-agent
invoke_skillRun a user-defined .skill slash command
set_configUpdate a Misar Code configuration setting at runtime
list_available_toolsList all tools the agent currently has access to

Tool Safety

Command Execution

The run_command tool uses execFile (not a shell) to prevent shell injection attacks. A blocklist prevents execution of known dangerous operations including:

  • rm -rf / and similar destructive recursive deletes
  • shutdown, reboot, halt
  • dd if= targeting block devices
  • mkfs and disk-formatting commands
  • Commands targeting /etc/passwd, /etc/shadow, or /boot

Even with these protections, review agent-proposed commands before approving them. The agent will always ask for confirmation before running commands that modify system state outside the project directory.

Permission Model

Tools are gated by a permission system:

  • Always allowed — read-only tools (read_file, list_dir, git_status, etc.) run without prompting
  • Needs approval — write tools prompt once per session unless you add them to alwaysAllowed
  • Pattern grants — use glob patterns like run_command:git * to pre-approve a class of commands
  • Explore mode/explore overrides all permissions to read-only for the session