Standard Tools
Built-in tools provided by Dhara core — read, write, edit, bash, find, grep, ask_user.
Standard Tools
Dhara ships with a set of built-in tools for common development tasks. These are always available without installing extensions.
File Operations
read
Read file contents or images:
{
"name": "read",
"description": "Read the contents of a file. Supports text files and images (jpg, png, gif, webp).",
"parameters": {
"path": "string (required) — Path to the file",
"offset": "number (optional) — Line number to start from (1-indexed)",
"limit": "number (optional) — Maximum lines to read"
}
}For text files, output is truncated to 2000 lines or 50KB. Use offset/limit for large files.
write
Create or overwrite a file:
{
"name": "write",
"description": "Write content to a file. Creates the file if it doesn't exist.",
"parameters": {
"path": "string (required) — File path",
"content": "string (required) — File contents"
}
}Automatically creates parent directories.
edit
Targeted text replacement in a file:
{
"name": "edit",
"description": "Edit a file using exact text replacement.",
"parameters": {
"path": "string (required) — File path",
"edits": [
{
"oldText": "string (required) — Exact text to find",
"newText": "string (required) — Replacement text"
}
]
}
}Each oldText must match a unique, non-overlapping region. For multiple changes in the same area, merge into one edit.
Search
grep
Search file contents for patterns:
{
"name": "grep",
"description": "Search file contents for a pattern using regex or literal strings.",
"parameters": {
"pattern": "string (required) — Search pattern (regex or literal)",
"path": "string (optional) — Directory or file to search",
"glob": "string (optional) — Filter by glob pattern, e.g. '*.ts'",
"ignoreCase": "boolean (optional) — Case-insensitive search",
"literal": "boolean (optional) — Treat as literal string instead of regex",
"context": "number (optional) — Lines before/after each match"
}
}Returns matching lines with file paths and line numbers. Respects .gitignore.
find
Search for files by glob pattern:
{
"name": "find",
"description": "Search for files by glob pattern.",
"parameters": {
"pattern": "string (required) — Glob pattern, e.g. '*.ts'",
"path": "string (optional) — Directory to search in",
"limit": "number (optional) — Maximum results (default: 1000)"
}
}ls
List directory contents:
{
"name": "ls",
"description": "List directory contents sorted alphabetically.",
"parameters": {
"path": "string (optional) — Directory to list (default: current dir)",
"limit": "number (optional) — Maximum entries (default: 500)"
}
}Process
bash
Execute shell commands:
{
"name": "bash",
"description": "Execute a command in the current working directory.",
"parameters": {
"command": "string (required) — Shell command to execute",
"timeout": "number (optional) — Timeout in seconds"
}
}Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB.
Interaction
ask_user
Ask the user a question with optional multiple-choice answers:
{
"name": "ask_user",
"description": "Ask the user a question interactively.",
"parameters": {
"question": "string (required) — The question to ask",
"options": "array (optional) — Multiple-choice answers",
"allowMultiple": "boolean (optional) — Allow selecting multiple options",
"allowFreeform": "boolean (optional, default: true) — Allow freeform text answer"
}
}Example:
{
"question": "Which framework should we use?",
"options": [
{ "title": "React", "description": "Component-based UI library" },
{ "title": "Vue", "description": "Progressive JavaScript framework" },
{ "title": "Svelte", "description": "Compile-time framework" }
]
}Provider-Specific Tools
openai_provider
Search and read research papers via alphaXiv:
{
"name": "openai_provider",
"description": "Search, read, and query research papers.",
"parameters": {
"action": "string (required) — search | read | query",
"query": "string (optional) — Search query or paper ID",
"max_results": "number (optional) — Max results (default: 5)"
}
}