agent-tool
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AGENT_TOOL_FALLBACK_ENCODING | No | Fallback encoding for projects with non-UTF-8 files (e.g., EUC-KR) when auto-detection fails. Priority: CLI flag > environment variable > default (UTF-8). | UTF-8 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| agent_tool_helpA | Returns usage guide for agent-tool. Call this when you encounter encoding warnings, garbled text, or need to understand agent-tool features. Topics: overview, encoding, indentation, tools, debug, analyze, troubleshooting. |
| editA | Replace exact text in a file. Preserves encoding and local line endings, adapts indentation using the file and .editorconfig, and supports dry-run plus hash-guarded edits. |
| globA | Finds files matching a glob pattern. Supports ** recursive matching and sorts results by modification time (newest first). Defaults to 200 workspace-relative paths and 32768 characters per page. Skips hidden paths and paths excluded by root .gitignore/.ignore or the common generated/vendor policy unless explicitly included. Returns total/has_more/truncated metadata and an opaque next_cursor. |
| grepA | Regex-search encoding-aware files or directories. Supports context, glob filters, content/file/count modes, ignored-path controls, and bounded pageable output. Directory searches skip detected binaries; explicit files are searched. |
| listdirA | Lists directory contents with bounded, pageable output. Default: flat listing, max_depth=3, max_entries=500. When has_more=true, pass next_cursor as cursor to fetch the next page. Filter by type with directories_only or files_only, and by entry-name glob with name_pattern (single) or include (multiple OR patterns, e.g. ["A*", "*.go"]). Use counts_only=true for counts without names, flat=false for a visual tree, and relative_paths=true to save tokens. Skips hidden entries and common build/vendor directories during recursion. |
| multieditA | Applies multiple old_string -> new_string replacements to a single file in one call. Edits are applied sequentially in order; each edit sees the result of the previous one. Atomic: if any edit fails, the file is not modified at all. Encoding-aware: preserves original file encoding (UTF-8, EUC-KR, Shift-JIS, etc.). Line-ending aware: old_string matches whether the file uses CRLF or LF, and inserted newlines follow the region being edited (mixed-newline files stay intact). Accepts "path" as alias for "file_path". Use dry_run=true to preview all changes without modifying the file. |
| multireadA | Reads multiple files in a single call to reduce API round-trips. Encoding-aware: auto-detects file encoding for each file. Supports offset/limit for reading specific line ranges. Defaults to 200 lines per file and 32768 characters total across the call. Returns visible per-file and overall truncation metadata with continuation positions. Use file_paths or paths (string array) with global offset/limit, or files (object array) for per-file offset/limit. If a file fails, the error is included in output and remaining files continue. Maximum 50 files per request. |
| patchA | Applies a unified diff patch to a file. Parses @@ hunk headers, verifies context lines, and applies changes. Encoding-aware: preserves original file encoding. Line-ending aware: each line keeps its own ending (a mixed CRLF/LF file is not rewritten) and a file without a trailing newline does not gain one. Use dry_run=true to preview without modifying the file. |
| readA | Read text with line numbers or return raster images as ImageContent. Detects common encodings; SVG stays text. Text is bounded and reports truncation/next_offset. Use offset/limit to page; relative paths use the workspace or MCP root. |
| toolboxC | Discover and call tools without loading every schema. Use describe, preferably compact with tool_operation, then call with arguments. Reuse schema_handle. output retrieves preserved paged command output. list shows tools; enable/disable/profile manage direct bindings. Profiles: core-lite, core, coding, remote, analysis, full. |
| writeA | Create or overwrite a file. Preserves existing encoding, uses .editorconfig for new files, and creates parent directories. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 11 tools
Most tools have clearly distinct purposes (glob vs grep vs listdir, read vs write). However, edit/multiedit/patch all modify files and read/multiread differ only by cardinality, so an agent must rely on descriptions rather than names alone to pick correctly.
Ten tools use a clean single-token lowercase convention (read, write, edit, glob, grep, listdir, patch), which is predictable. The outlier is agent_tool_help, which uses a prefixed snake_case that breaks the pattern slightly.
11 tools is well-scoped for a file-editing agent toolkit. Each tool earns its place, covering distinct reading, writing, editing, searching, and discovery needs without redundancy.
Core file lifecycle (read/write/edit/patch/search/list) is well covered, but there is no delete, move, or rename operation, which are common filesystem actions an agent may need. The gaps are workable but notable.