Tools Reference
50+ built-in tools across 8 categories for autonomous coding operations. File operations, git, shell, web search, testing, memory, MCP, and more.
XibeCode provides 50+ built-in tools across 8 categories for autonomous coding operations. These tools are automatically available to the AI agent based on the current mode's permissions.
Tool Categories Overview
| Category | Tools | Description |
|---|---|---|
| File Operations | 8 | Read, write, edit, delete files |
| Directory Operations | 3 | List, search, create, move |
| Git Operations | 7 | Status, diff, checkpoints, revert |
| Shell & Code Search | 2 | Execute commands, grep code |
| Web Operations | 2 | Search, fetch URLs |
| Test Operations | 4 | Run tests, generate tests, analyze code |
| Memory Operations | 6+ | curated_memory, session_search, skills, lessons |
| Browser Operations | 8 | Screenshots, testing, performance, accessibility |
Reliability Controls (v0.9.1)
Recent versions add stronger guardrails around tool execution quality:
- Evidence-aware completion gating: the agent must gather grounded evidence before it can conclude work.
- Post-edit verification: edit/write actions are validated with read-back checks.
- Improved loop resistance: repeated same/near-same tool input patterns are detected and blocked earlier.
- Safer memory recall: recalled memories are treated as hints and filtered by relevance.
- Grounded context compaction: old context keeps summarized facts instead of silently dropping all detail.
File Operations
read_file
Read the contents of a file.
{ "path": "src/app.ts", "start_line": 1, "end_line": 100 }read_multiple_files
Read multiple files at once for context.
{ "paths": ["src/app.ts", "src/utils.ts", "package.json"] }write_file
Write content to a file (creates or overwrites).
{ "path": "src/new-file.ts", "content": "export const hello = 'world';" }edit_file
Edit a file using search and replace.
{
"path": "src/app.ts",
"search": "const oldValue = 1;",
"replace": "const newValue = 2;"
}edit_lines
Edit specific line ranges in a file.
{
"path": "src/app.ts",
"start_line": 10,
"end_line": 15,
"content": "// New content"
}insert_at_line
Insert content at a specific line.
{
"path": "src/app.ts",
"line": 5,
"content": "import { newModule } from './module';"
}verified_edit
Edit with verification — ensures the search pattern exists before replacing.
{
"path": "src/app.ts",
"search": "exact content to find",
"replace": "replacement content"
}delete_file
Delete a file.
{ "path": "src/deprecated.ts" }Directory Operations
list_directory
{ "path": "src/", "recursive": false }search_files
{ "pattern": "*.ts", "path": "src/" }create_directory
{ "path": "src/new-feature/" }move_file
{ "source": "src/old-name.ts", "destination": "src/new-name.ts" }Git Operations
get_git_status
Returns staged, unstaged, and untracked files.
get_git_diff_summary
{ "staged": true }get_git_changed_files
Get list of files changed in the current branch.
create_git_checkpoint
{ "message": "before auth refactor", "strategy": "stash" }revert_to_git_checkpoint
{ "checkpoint_id": "stash@{0}" }git_show_diff
{ "path": "src/app.ts" }get_mcp_status
Get MCP server status.
Shell Commands
run_command
{
"command": "npm install express",
"cwd": "./",
"timeout": 30000,
"stdin": "input data"
}Dangerous commands like rm -rf / are blocked automatically.
In cloud sandbox_full mode, file and command tools execute against the remote
sandbox workspace (not your host absolute paths). Use repo-relative paths for
reliable results.
Code Search
grep_code
{
"pattern": "function.*async",
"path": "src/",
"include": "*.ts",
"case_sensitive": false
}Web Operations
web_search
{ "query": "typescript best practices 2024", "num_results": 5 }fetch_url
{ "url": "https://api.example.com/data", "method": "GET" }Test Operations
run_tests
{ "path": "src/", "filter": "auth", "verbose": true }Supports: Vitest, Jest, Mocha, pytest, Go test, Cargo test.
get_test_status
Returns passed, failed, and skipped test counts.
Memory Operations
curated_memory
Durable global memory in ~/.xibecode/memories/MEMORY.md and USER.md. Prefer an atomic operations batch for multi-change or consolidation when full.
{
"target": "memory",
"operations": [
{ "action": "remove", "old_text": "stale fact" },
{ "action": "add", "content": "Prefer pnpm for all package installs" }
]
}target:memory(agent notes) oruser(profile/preferences)- Single-op fields:
action,content,old_text - Frozen into the system prompt at session start; mid-session writes apply next session
- On success:
done=true— do not re-save the same entry
See Memory.
session_search
Search past sessions when details are not in MEMORY.md.
{ "query": "auth middleware fix", "limit": 8 }save_skill / list_skills / view_skill
save_skill— write a reusable procedure under~/.xibecode/skills/learned/list_skills— progressive disclosure (metadata only)view_skill— load full skill body by name
remember_lesson
{
"trigger": "Build failed after git pull",
"action": "Ran pnpm install and rebuilt",
"outcome": "Typecheck passed",
"tags": ["deps", "pnpm"]
}update_memory
Legacy/project memory key-value style updates (project auto-memory layer). Prefer curated_memory for durable cross-session facts.
Browser & screenshots
Playwright is not bundled with the CLI (no Chromium download on install). Prefer:
take_screenshot(agent-browser first, then headless Chrome/Chromium)run_command+agent-browserfor interactive browser flows- MCP or project-local Playwright if you need full E2E in the consumer repo
Optional: install agent-browser globally on supported platforms. Override with XIBECODE_PREFERRED_BROWSER=chrome.
take_screenshot
{
"url": "http://localhost:3000",
"path": "screenshots/home.png",
"fullPage": true
}pathmust be under the project workspace (e.g.screenshots/home.png). Absolute/tmp/...paths are remapped intoscreenshots/.- Result includes a
MEDIA:…line — put it in the final reply so Telegram uploads the PNG. - Localhost is allowed.
Other browser tools
get_console_logs, run_visual_test, accessibility/performance/responsive helpers may return guidance stubs when no bundled browser is available — use agent-browser or host tooling instead.
Context Operations
get_context
Get smart context for a file (imports, tests, related files).
revert_file
Revert a file to its last backed-up state.
Skills Operations
search_skills_sh
Search for skills on skills.sh marketplace.
install_skill_from_skills_sh
Install a skill from skills.sh.
Tool Permissions by Mode
- read_only: read_file, read_multiple_files, list_directory, search_files
- write_fs: write_file, edit_file, edit_lines, insert_at_line, delete_file, move_file, create_directory
- git_read: get_git_status, get_git_diff_summary, get_git_changed_files, git_show_diff
- git_mutation: create_git_checkpoint, revert_to_git_checkpoint
- shell_command: run_command
- tests: run_tests, get_test_status
- network: web_search, fetch_url
- context: grep_code, get_context
Safety Features
- Command Blocking — Dangerous commands like
rm -rf /are blocked - Risk Assessment — High-risk operations are flagged with warnings
- Automatic Backups — Files are backed up before editing
- Dry-Run Mode — Preview changes without executing
- Mode Permissions — Tools are restricted based on current mode
- Completion Evidence Gate — Prevents premature “done” responses without grounded proof
Extending Tools
You can add custom tools via:
- Plugins — JavaScript/TypeScript modules
- MCP Servers — External tool servers
Next Steps
- Agent Modes — Learn about mode permissions
- Plugins — Create custom tools
- Examples — See tools in action