Tools Reference

CodeCLI includes 150+ built-in tools spanning file operations, shell execution, web access, GUI automation, multi-agent orchestration, and integrations with external services. Tools are invoked by the AI agent automatically based on the task. Each tool has defined parameters with JSON Schema validation.

iNote
Tools are available to the agent unless restricted by permissions. Use the permissions field incodecli.json or agent configuration to control which tools are available.

Core Tools

Fundamental tools for file and shell operations. These are the most frequently used tools.

bash

Execute a shell command. The command runs in the working directory with full shell expansion. Supports pipes, redirects, and environment variables.

ParameterTypeRequiredDescription
commandstringYesThe shell command to execute
timeoutnumberNoTimeout in milliseconds (default: 120000, max: 600000)
descriptionstringNoHuman-readable description of what the command does
run_in_backgroundbooleanNoRun in background and return immediately (default: false)
Example
json
{ "command": "npm test -- --coverage", "timeout": 30000 }

read

Read file contents. Supports reading specific line ranges and images (PNG, JPG). For large files, use offset and limit parameters.

ParameterTypeRequiredDescription
file_pathstringYesAbsolute path to the file
offsetnumberNoLine number to start reading from (0-indexed)
limitnumberNoNumber of lines to read
pagesstringNoPage range for PDF files (e.g. "1-5")
Example
json
{ "file_path": "/home/user/project/src/index.ts", "offset": 10, "limit": 50 }

write

Create a new file or completely replace an existing file with the given content. Use edit for targeted modifications.

ParameterTypeRequiredDescription
file_pathstringYesAbsolute path for the file
contentstringYesContent to write to the file
Example
json
{ "file_path": "/home/user/project/config.json", "content": "{\n \"port\": 3000\n}" }

edit

Edit an existing file by replacing an exact string match. The old_string must be unique in the file. Supports replace_all for renaming across a file.

ParameterTypeRequiredDescription
file_pathstringYesAbsolute path to the file to edit
old_stringstringYesThe exact text to find and replace
new_stringstringYesThe text to replace it with
replace_allbooleanNoReplace all occurrences (default: false)
Example
json
{ "file_path": "/home/user/project/src/app.ts", "old_string": "const PORT = 3000;", "new_string": "const PORT = 8080;" }

glob

Find files matching a glob pattern. Returns file paths sorted by modification time.

ParameterTypeRequiredDescription
patternstringYesGlob pattern (e.g. "**/*.ts", "src/**/*.tsx")
pathstringNoDirectory to search in (default: current working directory)
Example
json
{ "pattern": "**/*.test.ts", "path": "/home/user/project" }

grep

Search file contents using ripgrep (regex). Supports multiple output modes and file type filtering.

ParameterTypeRequiredDescription
patternstringYesRegular expression pattern to search for
pathstringNoFile or directory to search in
globstringNoFile glob filter (e.g. "*.js", "*.{ts,tsx}")
typestringNoFile type filter: js, py, rust, go, java, etc.
output_modestringNoOutput: content, files_with_matches, count (default: files_with_matches)
-ibooleanNoCase-insensitive search (default: false)
contextnumberNoLines of context before and after each match
head_limitnumberNoMaximum number of results
multilinebooleanNoEnable multiline matching (default: false)
Example
json
{ "pattern": "TODO|FIXME", "path": "/home/user/project/src", "output_mode": "content", "-n": true }

list

List directory contents. Equivalent to ls, showing files and directories.

ParameterTypeRequiredDescription
pathstringYesAbsolute path to the directory
Example
json
{ "path": "/home/user/project/src" }

Web Tools

Tools for fetching and searching web content.

webfetch

Fetch and parse a web page. Returns the page content as markdown or plain text. Supports timeout and image retention options.

ParameterTypeRequiredDescription
urlstringYesThe URL to fetch
return_formatstringNoResponse format: markdown, text (default: markdown)
timeoutnumberNoRequest timeout in seconds (default: 20)
retain_imagesbooleanNoKeep images in output (default: true)
with_links_summarybooleanNoInclude extracted links (default: false)
Example
json
{ "url": "https://docs.example.com/api", "return_format": "markdown" }

websearch

Search the web and return results with titles, descriptions, and URLs. Supports domain filtering.

ParameterTypeRequiredDescription
querystringYesSearch query (minimum 2 characters)
allowed_domainsstring[]NoOnly include results from these domains
blocked_domainsstring[]NoExclude results from these domains
Example
json
{ "query": "Rust Axum middleware guide 2026", "allowed_domains": ["docs.rs", "tokio.rs"] }

codesearch

Search public code repositories for specific patterns. Returns matching code snippets with repository context.

ParameterTypeRequiredDescription
querystringYesCode search query
languagestringNoProgramming language filter
limitnumberNoMaximum results (default: 10)
Example
json
{ "query": "Axum router with state", "language": "rust" }

Task Tools

Tools for agent orchestration and skill invocation.

task

Spawn a subagent to handle a specific subtask. The subagent runs independently with its own context window and can use the full set of available tools.

ParameterTypeRequiredDescription
descriptionstringYesDescription of the task for the subagent
agentstringNoNamed agent configuration to use
promptstringNoCustom prompt to send to the subagent
modelstringNoOverride the model for this subagent
toolsstring[]NoRestrict available tools for this subagent
Example
json
{ "description": "Write unit tests for src/auth/*.ts", "agent": "test-writer" }

skill

Load a specialized skill (slash command) that provides domain-specific instructions and tools to the current agent.

ParameterTypeRequiredDescription
skillstringYesSkill name to invoke (e.g. "commit", "review-pr")
argsstringNoArguments to pass to the skill
Example
json
{ "skill": "commit", "args": "-m 'Fix auth token refresh'" }

Computer Use

GUI automation tool for desktop interaction. Supports 10 actions.

computer_use

Interact with the desktop environment. Supports screenshots, mouse, keyboard, and window management.

ActionParametersDescription
screenshotdisplay (optional)Capture the screen and return as base64 image
clickx, y, button?, clicks?Click at coordinates. button: left/right/middle. clicks: 1/2
typetextType text at the current cursor position
keykeysPress key combination (e.g. "ctrl+c", "alt+Tab")
mouse_movex, yMove the cursor to the specified coordinates
scrollx, y, direction, amountScroll at position. direction: up/down/left/right
dragstartX, startY, endX, endYClick-drag from start to end coordinates
window_list(none)List all visible windows with titles and IDs
window_focuswindowFocus a window by name or ID
screen_size(none)Get screen dimensions (width x height)
Example
json
{ "action": "click", "x": 500, "y": 300 }
{ "action": "type", "text": "Hello World" }
{ "action": "key", "keys": "ctrl+s" }
{ "action": "window_list" }

Development Tools

Advanced development tool suites from Lgrep and Thoth.

Lgrep Tools (8 tools)

Lgrep provides structural code analysis tools for understanding and navigating codebases.

ToolDescriptionKey Parameters
lgrep_symbolsList symbols (functions, classes, variables) in a filefile_path, symbol_type
lgrep_referencesFind all references to a symbol across the codebasesymbol, file_path
lgrep_definitionsGo to definition of a symbolsymbol, file_path
lgrep_callersFind all callers of a functionsymbol, file_path
lgrep_calleesFind all functions called by a functionsymbol, file_path
lgrep_hierarchyShow type hierarchy (inheritance chain)symbol, file_path
lgrep_outlineGet a structural outline of a filefile_path
lgrep_searchStructural code search using pattern matchingpattern, language
Example
json
{ "tool": "lgrep_symbols", "file_path": "/home/user/project/src/auth.ts", "symbol_type": "function" }

Thoth Tools (3 tools)

Thoth provides documentation and knowledge base tools for generating and querying docs.

ToolDescriptionKey Parameters
thoth_indexIndex a codebase for documentation queriespath, format
thoth_queryQuery the indexed documentationquery, top_k
thoth_generateGenerate documentation for a file or modulefile_path, format, style
Example
json
{ "tool": "thoth_query", "query": "How does authentication work?", "top_k": 5 }

Integration Tools

Tools for integrating with external services and platforms.

Obsidian Tools (10+ tools)

Read, write, and manage notes in an Obsidian vault.

ToolDescriptionKey Parameters
obsidian_readRead a note from the vaultpath, vault
obsidian_writeCreate or update a notepath, content, vault
obsidian_searchSearch notes by contentquery, vault, limit
obsidian_listList notes in a folderfolder, vault
obsidian_tagsList all tags and their countsvault
obsidian_backlinksGet backlinks for a notepath, vault
obsidian_frontmatterRead or update frontmatterpath, vault, updates
obsidian_moveMove/rename a notefrom, to, vault
obsidian_deleteDelete a notepath, vault
obsidian_dailyGet or create today's daily notevault, template
obsidian_graphGet graph data (nodes and edges)vault, depth
Example
json
{ "tool": "obsidian_search", "query": "project roadmap", "vault": "personal", "limit": 10 }

GitHub Tools (7 tools)

Interact with GitHub repositories, issues, and pull requests.

ToolDescriptionKey Parameters
github_issuesList, create, or update issuesowner, repo, action, title, body
github_prList, create, or manage pull requestsowner, repo, action, number, title
github_repoRepository operations (clone, fork, info)owner, repo, action
github_branchBranch management (create, delete, list)owner, repo, action, branch
github_fileRead or write files in a repositoryowner, repo, path, content, branch
github_searchSearch code, issues, or repositoriesquery, type, limit
github_workflowTrigger and monitor GitHub Actionsowner, repo, workflow_id, action
Example
json
{ "tool": "github_pr", "owner": "poly", "repo": "backend", "action": "list", "state": "open" }

Mainframe Tools (9 tools)

Control multi-terminal agent sessions in mainframe mode.

ToolDescriptionKey Parameters
mainframe_spawnSpawn a new agent paneagent, model, prompt
mainframe_focusSwitch focus to a panepane_id
mainframe_broadcastSend a message to all panesmessage
mainframe_pausePause a specific panepane_id
mainframe_resumeResume a paused panepane_id
mainframe_killTerminate an agent panepane_id
mainframe_layoutChange pane layoutlayout (e.g. "2x2")
mainframe_mergeMerge results from all panesstrategy
mainframe_statusGet status of all panes(none)
Example
json
{ "tool": "mainframe_spawn", "agent": "coder", "model": "claude-sonnet-4-20250514", "prompt": "Fix the failing tests" }

Swarm Tools (6 tools)

Orchestrate multi-agent swarm execution.

ToolDescriptionKey Parameters
swarm_initInitialize a new swarmtask, max_agents, model
swarm_statusGet swarm execution statusswarm_id
swarm_cancelCancel a running swarmswarm_id
swarm_resultsCollect results from completed swarmswarm_id, format
swarm_scaleScale agent count up or downswarm_id, count
swarm_retryRetry failed tasks in a waveswarm_id, wave
Example
json
{ "tool": "swarm_init", "task": "Add tests for all API endpoints", "max_agents": 4, "model": "claude-sonnet-4-20250514" }

Mercury Tools (4 tools)

Cognitive memory layer for persistent knowledge across sessions.

ToolDescriptionKey Parameters
mercury_storeStore a memory entrykey, value, tags
mercury_recallRecall memories by queryquery, tags, limit
mercury_forgetDelete a memory entrykey
mercury_listList all stored memoriestags, limit
Example
json
{ "tool": "mercury_recall", "query": "project architecture decisions", "limit": 5 }

RAG Tools (3 tools)

Retrieval-Augmented Generation for querying document collections.

ToolDescriptionKey Parameters
rag_indexIndex documents for retrievalpath, chunk_size, overlap
rag_queryQuery the indexed documentsquery, top_k, threshold
rag_statusCheck indexing status and stats(none)
Example
json
{ "tool": "rag_query", "query": "How is authentication implemented?", "top_k": 5 }

Reason Tools (3 tools)

Structured reasoning and analysis tools.

ToolDescriptionKey Parameters
reason_analyzePerform structured analysis of a problemproblem, approach, depth
reason_decomposeBreak down a task into subtaskstask, strategy
reason_evaluateEvaluate multiple options against criteriaoptions, criteria, weights
Example
json
{ "tool": "reason_decompose", "task": "Migrate from REST to GraphQL", "strategy": "incremental" }

Story Tools (3 tools)

Story and requirements management tools.

ToolDescriptionKey Parameters
story_createCreate a new user storytitle, description, priority, labels
story_listList stories with filteringstatus, priority, assignee, limit
story_updateUpdate a storyid, status, description, priority
Example
json
{ "tool": "story_create", "title": "Add 2FA support", "description": "Users should be able to enable TOTP-based 2FA", "priority": "high" }

Dataset Tools (3 tools)

Manage datasets for training, evaluation, and RAG.

ToolDescriptionKey Parameters
dataset_createCreate a new dataset from filesname, source, format
dataset_querySearch within a datasetdataset_id, query, limit
dataset_listList all datasetsformat, limit
Example
json
{ "tool": "dataset_create", "name": "api-docs", "source": "./docs/api", "format": "jsonl" }

Session Tools

Tools for managing task state within a session.

todowrite

Create or update the task list for the current session. Replaces the entire todo list.

ParameterTypeRequiredDescription
todosarrayYesArray of { id, content, status, priority } objects
Example
json
{ "todos": [
{ "id": "1", "content": "Fix auth bug", "status": "in_progress", "priority": "high" },
{ "id": "2", "content": "Write tests", "status": "pending", "priority": "medium" },
{ "id": "3", "content": "Update docs", "status": "completed", "priority": "low" }
] }

todoread

Read the current task list.

Example
json
{ }

kanbanwrite

Create or update the kanban board. Supports columns, cards, priorities, and swim lanes.

ParameterTypeRequiredDescription
boardobjectYesBoard with columns[] and cards[] objects
Example
json
{ "board": {
"columns": ["Backlog", "In Progress", "Review", "Done"],
"cards": [
{ "id": "c1", "title": "Fix login bug", "column": "In Progress", "priority": "high" },
{ "id": "c2", "title": "Add tests", "column": "Backlog", "priority": "medium" }
]
} }

kanbanread

Read the current kanban board state.

Example
json
{ }

session_memory

Store and retrieve session-specific memory. Persists across turns within a session.

ParameterTypeRequiredDescription
actionstringYesAction: store, recall, list, clear
keystringNoMemory key (for store/recall)
valuestringNoMemory value (for store)
Example
json
{ "action": "store", "key": "project_stack", "value": "Next.js 16 + Rust/Axum" }

Other Tools

python_sandbox

Execute Python code in an isolated sandbox environment. Useful for data analysis, calculations, and scripting.

ParameterTypeRequiredDescription
codestringYesPython code to execute
timeoutnumberNoTimeout in seconds (default: 30)
Example
json
{ "code": "import json\nprint(json.dumps({'result': 42}))" }

image

Read and analyze image files. Supports PNG, JPG, JPEG, WebP, and GIF.

ParameterTypeRequiredDescription
file_pathstringYesAbsolute path to the image file
promptstringNoAnalysis prompt for the image
Example
json
{ "file_path": "/home/user/screenshot.png", "prompt": "Describe the UI layout" }

clipboard

Read from or write to the system clipboard.

ParameterTypeRequiredDescription
actionstringYesAction: read, write
contentstringNoContent to write (for write action)
Example
json
{ "action": "write", "content": "Hello, clipboard!" }

network

Network diagnostic tools: ping, DNS lookup, and HTTP requests.

ParameterTypeRequiredDescription
actionstringYesAction: ping, dns, http
targetstringYesTarget host, domain, or URL
optionsobjectNoAction-specific options
Example
json
{ "action": "http", "target": "https://api.example.com/health", "options": { "method": "GET" } }

time

Get the current date and time in various formats and timezones.

ParameterTypeRequiredDescription
formatstringNoOutput format: iso, unix, relative (default: iso)
timezonestringNoIANA timezone (default: UTC)
Example
json
{ "format": "iso", "timezone": "America/New_York" }

monitor

Monitor system resources: CPU, memory, disk, and process information.

ParameterTypeRequiredDescription
resourcestringYesResource to monitor: cpu, memory, disk, processes
intervalnumberNoSampling interval in seconds (default: 1)
Example
json
{ "resource": "memory", "interval": 2 }
PreviousCommandsNextKeyboard Shortcuts