Tools

orangu exposes local workspace tools to the active model.

Available tools

Tool Purpose Key arguments
show_file Show a text file from the workspace path, optional start_line, optional end_line, optional mode
create_file Create a file with content, optionally with its permissions path, optional content, mode, overwrite, parents, git
modify_file Modify a file, by text replacement or by line ranges path, either old_text/new_text (+ replace_all) or edits, optional git
move_file Move or rename a file from, to, optional mode, overwrite, parents, git
delete_file Delete a file path, optional git
create_directory Create one directory path, optional mode, parents
move_directory Move a directory and everything under it from, to, optional mode, parents
delete_directory Delete an empty directory path
list_directory List files and directories below the workspace optional path, optional max_depth
fetch_url Fetch an external URL and return readable text url, optional max_chars
run_shell_command Run a shell command inside the workspace command, optional cwd, optional timeout_seconds
expand_context Retrieve previously compressed/truncated output using its hash ID id

The eight file-lifecycle tools are the same operations orangu-server serves over HTTP as /v1/create_file, /v1/modify_file and so on — one shared implementation (orangu::files), so a tool call, a typed command and an API request behave identically. Their full field-by-field schemas are in the Inference server internals chapter, under File-lifecycle API.

They replace the earlier read_file and edit_file: read_file is now show_file with the same arguments, and edit_file is now modify_file, which still takes old_text/new_text and additionally accepts the server’s edits line ranges. The typed /add_file is obsolete for the same reason — it was /create_file without content (see the Git commands chapter). An existing path is overwritten on every surface — tool, typed command and HTTP endpoint alike; pass "overwrite": false for create-if-absent.

Git. In a Git repository these tools make their change with the Git command — create_file/modify_file stage with git add, move_file moves with git mv, delete_file deletes with git rm — so work is staged as it happens. Nothing is ever committed; that stays your decision (/commit). Pass "git": false on a call for a plain filesystem change.

Workspace restrictions

The tools are rooted in the active workspace. By default this is the current directory, unless orangu was started with --workspace /path/to/project.

Paths that attempt to escape the workspace are rejected.

Absolute paths are allowed only when they still resolve inside the workspace after normalization.

show_file

show_file returns text content with line numbers:

{
  "path": "src/main.rs",
  "start_line": 10,
  "end_line": 20,
  "mode": "full"
}

Behavior:

modify_file

modify_file performs a targeted replacement inside a workspace file:

{
  "path": "src/main.rs",
  "old_text": "fn old_name()",
  "new_text": "fn new_name()"
}

Optional flags:

Important details:

list_directory

list_directory is a workspace-scoped directory listing tool:

{
  "path": "src",
  "max_depth": 3
}

Behavior:

fetch_url

fetch_url retrieves external documentation or reference material:

{
  "url": "https://example.com/docs",
  "max_chars": 12000
}

Behavior:

expand_context

expand_context retrieves massive text blobs (like large file diffs or lengthy command outputs) that orangu automatically truncated before they reached your context window to save tokens.

{
  "id": "abc1234567"
}

Behavior:

run_shell_command

run_shell_command executes a Bash command inside the workspace:

{
  "command": "cargo test --quiet",
  "cwd": "crates/core",
  "timeout_seconds": 60
}

Behavior: