Documentation

Tools

The complete inventory of 50+ built-in tools — file ops, git, code intelligence, browser, teams, and more.

Edit on GitHub

Nyzhi ships with over 50 built-in tools, organized into categories. Each tool has a permission level that determines whether it can run automatically or needs your approval.

Permission Levels

LevelBehavior
Read-onlyRuns automatically, can execute in parallel
Needs approvalRequires confirmation (based on your trust mode)

Read-only tools never modify your files or system. Approval-required tools always run sequentially — never in parallel.

File and Code Tools

These are the core tools for reading, writing, and searching your codebase.

ToolPermissionWhat it does
readRead-onlyRead file contents (with optional line ranges)
writeApprovalCreate or overwrite a file
editApprovalReplace a specific string in a file
multi_editApprovalTransactional string replacements across multiple files
apply_patchApprovalApply a unified diff atomically
batch_applyApprovalRun an operation across many files
globRead-onlyFind files by glob pattern
grepRead-onlySearch file contents with regex
fuzzy_findRead-onlyFuzzy filename search
tail_fileRead-onlyRead the last N lines of a file
bashApprovalExecute shell commands

Example: The Agent Edits a File

When you ask Nyzhi to fix a bug, it typically:

  1. Uses grep or glob to find the relevant file
  2. Uses read to examine the code
  3. Uses edit to make the change
  4. Uses bash to run tests

Git Tools

Full Git integration without leaving Nyzhi:

ToolPermissionWhat it does
git_statusRead-onlyShow working tree status
git_diffRead-onlyShow staged/unstaged changes
git_logRead-onlyView commit history
git_showRead-onlyInspect a specific commit
git_branchRead-onlyList branches
git_commitApprovalStage and commit changes
git_checkoutApprovalSwitch or create branches

Filesystem Tools

Lower-level file operations:

ToolPermissionWhat it does
list_dirRead-onlyList directory entries
directory_treeRead-onlyRecursive tree view
file_infoRead-onlyFile metadata (size, modified, permissions)
delete_fileApprovalDelete a file or empty directory
move_fileApprovalMove or rename a path
copy_fileApprovalCopy a file
create_dirApprovalCreate a directory

Code Intelligence

Tools that understand code structure, not just text:

ToolPermissionWhat it does
verifyRead-onlyRun verification checks (tests, lint, typecheck)
lsp_diagnosticsRead-onlyLSP diagnostics and capabilities
ast_searchRead-onlySearch using structural patterns
lsp_goto_definitionRead-onlyJump to symbol definition
lsp_find_referencesRead-onlyFind all references to a symbol
lsp_hoverRead-onlyGet type info and docs at a position
semantic_searchRead-onlyEmbedding-based code retrieval (requires index)

Planning and Interaction

Tools the agent uses to organize work and communicate with you:

ToolPermissionWhat it does
todowriteRead-onlyCreate or update a structured todo list
todoreadRead-onlyRead the current todo list
create_planRead-onlyCreate or update a session plan
thinkRead-onlySide-effect-free reasoning (scratchpad)
ask_userRead-onlyAsk a structured multiple-choice question
tool_searchRead-onlyDiscover deferred or MCP tools

Memory and Knowledge

Persistent context across sessions:

ToolPermissionWhat it does
memory_readRead-onlyRead user or project memory
memory_writeApprovalSave knowledge for future sessions
notepad_readRead-onlyRead the session notepad
notepad_writeRead-onlyRecord a learning, decision, or issue
load_skillRead-onlyLoad a named skill file

Web and Browser

Internet access and browser automation:

ToolPermissionWhat it does
web_fetchApprovalFetch a URL and extract text content
web_searchApprovalSearch the web and return snippets
browser_openApprovalOpen a URL in a headless browser
browser_screenshotApprovalCapture a screenshot
browser_evaluateApprovalRun JavaScript in the page context
create_prApprovalCreate a pull request (GitHub/GitLab)
review_prRead-onlyRetrieve and review a PR diff

Team and Task Tools

Multi-agent collaboration (see Teams):

ToolPermissionWhat it does
team_createApprovalCreate a team with config, inboxes, and task board
team_deleteApprovalDelete all team artifacts
team_listRead-onlyList all teams
send_team_messageRead-onlyMessage a teammate or broadcast
read_inboxRead-onlyRead unread messages
task_createRead-onlyCreate a shared task
task_updateRead-onlyUpdate task status or owner
task_listRead-onlyList all team tasks
spawn_teammateApprovalSpawn an agent and register as team member

Subagent Lifecycle

Available in the interactive TUI only:

ToolPermissionWhat it does
spawn_agentRead-onlySpawn a child agent with a specific role
send_inputRead-onlySend follow-up instructions to a running agent
waitRead-onlyBlock until agents reach a terminal status
close_agentRead-onlyShut down an agent and free its slot
resume_agentRead-onlyReopen a completed agent for more work

Note: Subagent tools are only registered in the TUI runtime (nyz). They are not available in nyz run or nyz exec.

Deferred Tools and MCP

When you connect many MCP servers, the tool count can grow large. Nyzhi handles this with deferred loading:

  • When there are more than 15 MCP tools, they’re registered as deferred
  • The agent uses tool_search to discover them on demand
  • A deferred index is saved to .nyzhi/context/tools/mcp-index.md

This keeps the initial tool list compact and reduces token usage.

Tool Context

Every tool execution receives a runtime context with:

  • session_id — current session
  • cwd — working directory
  • project_root — detected project root
  • depth — 0 for main agent, incremented for subagents
  • allowed_tool_names — role-based tool filtering
  • sandbox_level — file system access restrictions
  • team_name, agent_name, is_team_lead — team metadata

This context enables features like role-scoped behavior, sandbox enforcement, and team messaging.

Next Steps

  • MCP — connect external tool servers
  • Configuration — trust modes and tool approval settings
  • Teams — multi-agent collaboration