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.
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| command | string | Yes | The shell command to execute |
| timeout | number | No | Timeout in milliseconds (default: 120000, max: 600000) |
| description | string | No | Human-readable description of what the command does |
| run_in_background | boolean | No | Run in background and return immediately (default: false) |
read
Read file contents. Supports reading specific line ranges and images (PNG, JPG). For large files, use offset and limit parameters.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_path | string | Yes | Absolute path to the file |
| offset | number | No | Line number to start reading from (0-indexed) |
| limit | number | No | Number of lines to read |
| pages | string | No | Page range for PDF files (e.g. "1-5") |
write
Create a new file or completely replace an existing file with the given content. Use edit for targeted modifications.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_path | string | Yes | Absolute path for the file |
| content | string | Yes | Content to write to the file |
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_path | string | Yes | Absolute path to the file to edit |
| old_string | string | Yes | The exact text to find and replace |
| new_string | string | Yes | The text to replace it with |
| replace_all | boolean | No | Replace all occurrences (default: false) |
glob
Find files matching a glob pattern. Returns file paths sorted by modification time.
| Parameter | Type | Required | Description |
|---|---|---|---|
| pattern | string | Yes | Glob pattern (e.g. "**/*.ts", "src/**/*.tsx") |
| path | string | No | Directory to search in (default: current working directory) |
grep
Search file contents using ripgrep (regex). Supports multiple output modes and file type filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
| pattern | string | Yes | Regular expression pattern to search for |
| path | string | No | File or directory to search in |
| glob | string | No | File glob filter (e.g. "*.js", "*.{ts,tsx}") |
| type | string | No | File type filter: js, py, rust, go, java, etc. |
| output_mode | string | No | Output: content, files_with_matches, count (default: files_with_matches) |
| -i | boolean | No | Case-insensitive search (default: false) |
| context | number | No | Lines of context before and after each match |
| head_limit | number | No | Maximum number of results |
| multiline | boolean | No | Enable multiline matching (default: false) |
list
List directory contents. Equivalent to ls, showing files and directories.
| Parameter | Type | Required | Description |
|---|---|---|---|
| path | string | Yes | Absolute path to the directory |
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The URL to fetch |
| return_format | string | No | Response format: markdown, text (default: markdown) |
| timeout | number | No | Request timeout in seconds (default: 20) |
| retain_images | boolean | No | Keep images in output (default: true) |
| with_links_summary | boolean | No | Include extracted links (default: false) |
websearch
Search the web and return results with titles, descriptions, and URLs. Supports domain filtering.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query (minimum 2 characters) |
| allowed_domains | string[] | No | Only include results from these domains |
| blocked_domains | string[] | No | Exclude results from these domains |
codesearch
Search public code repositories for specific patterns. Returns matching code snippets with repository context.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Code search query |
| language | string | No | Programming language filter |
| limit | number | No | Maximum results (default: 10) |
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | Description of the task for the subagent |
| agent | string | No | Named agent configuration to use |
| prompt | string | No | Custom prompt to send to the subagent |
| model | string | No | Override the model for this subagent |
| tools | string[] | No | Restrict available tools for this subagent |
skill
Load a specialized skill (slash command) that provides domain-specific instructions and tools to the current agent.
| Parameter | Type | Required | Description |
|---|---|---|---|
| skill | string | Yes | Skill name to invoke (e.g. "commit", "review-pr") |
| args | string | No | Arguments to pass to the skill |
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.
| Action | Parameters | Description |
|---|---|---|
| screenshot | display (optional) | Capture the screen and return as base64 image |
| click | x, y, button?, clicks? | Click at coordinates. button: left/right/middle. clicks: 1/2 |
| type | text | Type text at the current cursor position |
| key | keys | Press key combination (e.g. "ctrl+c", "alt+Tab") |
| mouse_move | x, y | Move the cursor to the specified coordinates |
| scroll | x, y, direction, amount | Scroll at position. direction: up/down/left/right |
| drag | startX, startY, endX, endY | Click-drag from start to end coordinates |
| window_list | (none) | List all visible windows with titles and IDs |
| window_focus | window | Focus a window by name or ID |
| screen_size | (none) | Get screen dimensions (width x height) |
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.
| Tool | Description | Key Parameters |
|---|---|---|
| lgrep_symbols | List symbols (functions, classes, variables) in a file | file_path, symbol_type |
| lgrep_references | Find all references to a symbol across the codebase | symbol, file_path |
| lgrep_definitions | Go to definition of a symbol | symbol, file_path |
| lgrep_callers | Find all callers of a function | symbol, file_path |
| lgrep_callees | Find all functions called by a function | symbol, file_path |
| lgrep_hierarchy | Show type hierarchy (inheritance chain) | symbol, file_path |
| lgrep_outline | Get a structural outline of a file | file_path |
| lgrep_search | Structural code search using pattern matching | pattern, language |
Thoth Tools (3 tools)
Thoth provides documentation and knowledge base tools for generating and querying docs.
| Tool | Description | Key Parameters |
|---|---|---|
| thoth_index | Index a codebase for documentation queries | path, format |
| thoth_query | Query the indexed documentation | query, top_k |
| thoth_generate | Generate documentation for a file or module | file_path, format, style |
Integration Tools
Tools for integrating with external services and platforms.
Obsidian Tools (10+ tools)
Read, write, and manage notes in an Obsidian vault.
| Tool | Description | Key Parameters |
|---|---|---|
| obsidian_read | Read a note from the vault | path, vault |
| obsidian_write | Create or update a note | path, content, vault |
| obsidian_search | Search notes by content | query, vault, limit |
| obsidian_list | List notes in a folder | folder, vault |
| obsidian_tags | List all tags and their counts | vault |
| obsidian_backlinks | Get backlinks for a note | path, vault |
| obsidian_frontmatter | Read or update frontmatter | path, vault, updates |
| obsidian_move | Move/rename a note | from, to, vault |
| obsidian_delete | Delete a note | path, vault |
| obsidian_daily | Get or create today's daily note | vault, template |
| obsidian_graph | Get graph data (nodes and edges) | vault, depth |
GitHub Tools (7 tools)
Interact with GitHub repositories, issues, and pull requests.
| Tool | Description | Key Parameters |
|---|---|---|
| github_issues | List, create, or update issues | owner, repo, action, title, body |
| github_pr | List, create, or manage pull requests | owner, repo, action, number, title |
| github_repo | Repository operations (clone, fork, info) | owner, repo, action |
| github_branch | Branch management (create, delete, list) | owner, repo, action, branch |
| github_file | Read or write files in a repository | owner, repo, path, content, branch |
| github_search | Search code, issues, or repositories | query, type, limit |
| github_workflow | Trigger and monitor GitHub Actions | owner, repo, workflow_id, action |
Mainframe Tools (9 tools)
Control multi-terminal agent sessions in mainframe mode.
| Tool | Description | Key Parameters |
|---|---|---|
| mainframe_spawn | Spawn a new agent pane | agent, model, prompt |
| mainframe_focus | Switch focus to a pane | pane_id |
| mainframe_broadcast | Send a message to all panes | message |
| mainframe_pause | Pause a specific pane | pane_id |
| mainframe_resume | Resume a paused pane | pane_id |
| mainframe_kill | Terminate an agent pane | pane_id |
| mainframe_layout | Change pane layout | layout (e.g. "2x2") |
| mainframe_merge | Merge results from all panes | strategy |
| mainframe_status | Get status of all panes | (none) |
Swarm Tools (6 tools)
Orchestrate multi-agent swarm execution.
| Tool | Description | Key Parameters |
|---|---|---|
| swarm_init | Initialize a new swarm | task, max_agents, model |
| swarm_status | Get swarm execution status | swarm_id |
| swarm_cancel | Cancel a running swarm | swarm_id |
| swarm_results | Collect results from completed swarm | swarm_id, format |
| swarm_scale | Scale agent count up or down | swarm_id, count |
| swarm_retry | Retry failed tasks in a wave | swarm_id, wave |
Mercury Tools (4 tools)
Cognitive memory layer for persistent knowledge across sessions.
| Tool | Description | Key Parameters |
|---|---|---|
| mercury_store | Store a memory entry | key, value, tags |
| mercury_recall | Recall memories by query | query, tags, limit |
| mercury_forget | Delete a memory entry | key |
| mercury_list | List all stored memories | tags, limit |
RAG Tools (3 tools)
Retrieval-Augmented Generation for querying document collections.
| Tool | Description | Key Parameters |
|---|---|---|
| rag_index | Index documents for retrieval | path, chunk_size, overlap |
| rag_query | Query the indexed documents | query, top_k, threshold |
| rag_status | Check indexing status and stats | (none) |
Reason Tools (3 tools)
Structured reasoning and analysis tools.
| Tool | Description | Key Parameters |
|---|---|---|
| reason_analyze | Perform structured analysis of a problem | problem, approach, depth |
| reason_decompose | Break down a task into subtasks | task, strategy |
| reason_evaluate | Evaluate multiple options against criteria | options, criteria, weights |
Story Tools (3 tools)
Story and requirements management tools.
| Tool | Description | Key Parameters |
|---|---|---|
| story_create | Create a new user story | title, description, priority, labels |
| story_list | List stories with filtering | status, priority, assignee, limit |
| story_update | Update a story | id, status, description, priority |
Dataset Tools (3 tools)
Manage datasets for training, evaluation, and RAG.
| Tool | Description | Key Parameters |
|---|---|---|
| dataset_create | Create a new dataset from files | name, source, format |
| dataset_query | Search within a dataset | dataset_id, query, limit |
| dataset_list | List all datasets | format, limit |
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| todos | array | Yes | Array of { id, content, status, priority } objects |
todoread
Read the current task list.
kanbanwrite
Create or update the kanban board. Supports columns, cards, priorities, and swim lanes.
| Parameter | Type | Required | Description |
|---|---|---|---|
| board | object | Yes | Board with columns[] and cards[] objects |
kanbanread
Read the current kanban board state.
session_memory
Store and retrieve session-specific memory. Persists across turns within a session.
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Action: store, recall, list, clear |
| key | string | No | Memory key (for store/recall) |
| value | string | No | Memory value (for store) |
Other Tools
python_sandbox
Execute Python code in an isolated sandbox environment. Useful for data analysis, calculations, and scripting.
| Parameter | Type | Required | Description |
|---|---|---|---|
| code | string | Yes | Python code to execute |
| timeout | number | No | Timeout in seconds (default: 30) |
image
Read and analyze image files. Supports PNG, JPG, JPEG, WebP, and GIF.
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_path | string | Yes | Absolute path to the image file |
| prompt | string | No | Analysis prompt for the image |
clipboard
Read from or write to the system clipboard.
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Action: read, write |
| content | string | No | Content to write (for write action) |
network
Network diagnostic tools: ping, DNS lookup, and HTTP requests.
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | Yes | Action: ping, dns, http |
| target | string | Yes | Target host, domain, or URL |
| options | object | No | Action-specific options |
time
Get the current date and time in various formats and timezones.
| Parameter | Type | Required | Description |
|---|---|---|---|
| format | string | No | Output format: iso, unix, relative (default: iso) |
| timezone | string | No | IANA timezone (default: UTC) |
monitor
Monitor system resources: CPU, memory, disk, and process information.
| Parameter | Type | Required | Description |
|---|---|---|---|
| resource | string | Yes | Resource to monitor: cpu, memory, disk, processes |
| interval | number | No | Sampling interval in seconds (default: 1) |