Hex Line
v1.31.0Hash-verified file editing MCP server with token efficiency hook for AI coding agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
read_file Read File
Read file with progressive disclosure. Default: minimal plain partial read for discovery; enable edit-ready metadata explicitly when preparing a verified edit.
| Parameter | Type | Description |
|---|---|---|
edit_ready | boolean | Include hash/checksum edit protocol blocks explicitly. Default: false for discovery reads. |
file_path | string | File path |
file_paths | array | Array of file paths to read (batch mode) |
limit | number | Max lines (default: 200 for discovery, 2000 for edit-ready, 0 = all) |
offset | number | Start line (1-indexed, default: 1) |
plain | boolean | Omit hashes (lineNum|content) |
ranges | Line ranges, e.g. ["10-25", {"start":40,"end":55}] | |
verbosity | string | Response budget. `minimal` is discovery-first, `compact` adds revision context, `full` preserves the richest payload. |
edit_file Edit File
Apply hash-verified partial edits to one file. Batch ALL hunks for the same file into ONE call via the `edits` array -- separate sequential edit_file calls on one file go stale and conflict (the most common edit failure). Carry base_revision only for a genuinely later follow-up after the file changed. Anchors accept tag.N, a bare line number, or unique line content (auto-resolved); range_checksum accepts "auto" to compute it for the current range. Preserves existing line endings and trailing-newline shape; conservative conflicts return retry helpers. boundary_mode=inclusive deletes the anchor…
| Parameter | Type | Description |
|---|---|---|
edits * | JSON array of canonical edits. [{"set_line":{"anchor":"ab.12","new_text":"x"}}] [{"replace_lines":{"start_anchor":"ab.10","end_anchor":"cd.15","new_text":"x","range_checksum":"10-15:a1b2"}}] [{"insert… | |
file_path * | string | File to edit |
allow_external | boolean | Allow editing a path outside the current project root. Use only when you intentionally target a temp or external file. |
base_revision | string | Prior revision from read_file/edit_file. Enables conservative auto-rebase for same-file follow-up edits. |
conflict_policy | string | Conflict handling (default: "conservative"). "conservative" returns structured CONFLICT output with recovery_ranges, retry_edit/retry_edits, suggested_read_call, and retry_plan when available. |
dry_run | boolean | Preview changes without writing |
restore_indent | boolean | Auto-fix indentation to match anchor (default: false) |
write_file Write File
Create a new file or overwrite existing. Creates parent dirs. For existing files prefer edit_file (shows diff, verifies hashes).
| Parameter | Type | Description |
|---|---|---|
content * | string | File content |
file_path * | string | File path |
allow_external | boolean | Allow writing a path outside the current project root. Use only when you intentionally target a temp or external file. |
grep_search Search Files
Search file contents with ripgrep. Default: summary-first discovery output; use `content` with `edit_ready=true` when you need verified edit hunks.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Search pattern (regex by default, literal if literal:true) |
allow_large_output | boolean | Bypass the default content-mode block/char caps when you intentionally need a larger payload. |
case_insensitive | boolean | Ignore case (-i) |
context | number | Symmetric context lines around matches (-C) |
context_after | number | Context lines AFTER match (-A) |
context_before | number | Context lines BEFORE match (-B) |
edit_ready | boolean | Preserve hash/checksum search hunks in `content` mode. Default: false. |
glob | string | Glob filter (e.g. "*.ts") |
head_limit | number | Total match events across all files; multiline matches count as 1 (default: 50 for summary discovery, 200 for content, 1000 for files_with_matches/count, 0 = unlimited) |
limit | number | Max matches per file (default: 20 for summary discovery, 100 for content) |
literal | boolean | Literal string search, no regex (-F) |
multiline | boolean | Pattern can span multiple lines (-U) |
output_mode | string | Output format (default: summary) |
path | string | Search dir/file (default: cwd) |
plain | boolean | Omit hash tags, return file:line:content |
smart_case | boolean | CI when pattern is all lowercase, CS if uppercase (-S) |
type | string | File type (e.g. "js", "py") |
outline File Outline
AST-based structural outline with hash anchors for direct edit_file usage. Supports JavaScript/TypeScript, Python, C#, and PHP code files plus markdown headings (.md/.mdx, fence-aware).
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Source file path |
verify Verify Checksums
Check if held checksums are still valid without rereading. Use before delayed or mixed-tool follow-up edits; returns canonical status, next_action, and reread guidance.
| Parameter | Type | Description |
|---|---|---|
checksums * | array | Checksum strings, e.g. ["1-50:f7e2a1b0", "51-100:abcd1234"] |
file_path * | string | File path |
base_revision | string | Optional prior revision to compare against latest state. |
inspect_path Inspect Path
Inspect a file or directory path. Files return compact metadata; directories return a gitignore-aware tree or pattern matches.
| Parameter | Type | Description |
|---|---|---|
path * | string | File or directory path |
format | string | "compact" = shorter path view, "full" = include sizes/metadata where available |
gitignore | boolean | Respect root .gitignore patterns (default: true). Nested .gitignore not supported |
max_depth | number | Max recursion depth (default: 2 for discovery, or 20 in pattern mode) |
max_entries | number | Max entries to show in pattern mode before truncation metadata is returned (default: 60, 0 = unlimited) |
pattern | string | Glob filter on names (e.g. "*-mcp", "*.mjs"). Returns flat match list instead of tree |
type | string | "file", "dir", or "all" (default). Like find -type f/d |
verbosity | string | Response budget. `minimal` returns the shortest tree summary. |
changes Semantic Diff
Semantic diff against git ref (default: HEAD). Returns canonical status, summary, next_action, changed symbols, and graph-backed risk hints when available.
| Parameter | Type | Description |
|---|---|---|
path * | string | File or directory path |
compare_against | string | Git ref to compare against (default: "HEAD") |
bulk_replace Bulk Replace
Search-and-replace text across multiple files inside an explicit root path. Use for renames and refactors when the project scope is known.
| Parameter | Type | Description |
|---|---|---|
path * | string | Root directory for the replacement scope |
replacements * | JSON array of {old, new} pairs: [{"old":"foo","new":"bar"}] | |
allow_external | boolean | Allow a replacement root outside the current project root. Use only when you intentionally target a temp or external directory. |
dry_run | boolean | Preview without writing (default: false) |
format | string | "compact" (default) = summary only, "full" = include capped diffs |
glob | string | File glob (default: "**/*.{md,mjs,json,yml,ts,js}") |
max_files | number | Max files to process (default: 100) |