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. |
| editB | Replaces old_string with new_string in the specified file. Smart indentation: auto-converts between tabs and spaces to match the file's style. Encoding-aware: preserves original file encoding (UTF-8, EUC-KR, Shift-JIS, UTF-8 BOM, etc.). Line-ending aware: matches old_string regardless of CRLF/LF, and inserted lines follow the newline style of the region being edited (mixed-newline files stay intact). Reads .editorconfig for indentation settings. Use dry_run=true to preview changes without modifying the file. |
| 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 and common generated/vendor directories unless explicitly included. Returns total/has_more/truncated metadata and an opaque next_cursor. |
| grepA | Searches file contents for a regex pattern. Encoding-aware: auto-detects file encoding. Can search a single file or recursively search a directory. Output modes: content (default), files_with_matches, count. Compact content groups matches under one file header by default; use output_format=classic for path:line:text. A CRLF ending is a terminator, not content: "^foo$" matches in a CRLF file and returned lines carry no stray CR. A lone CR is not a line break (same as read), so a CR-only file is one line. Context: use before/after/context to include surrounding lines (like grep -B/-A/-C). Large result sets stay usable: max_results supports up to 100000, while max_line_chars and max_output_chars bound the text returned to the agent. has_more and a visible continuation hint report when additional grep output exists. Directory search skips binary files (extension list + NUL-byte sniff); pass a binary file directly as path to search it anyway. |
| 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 | Reads a file and returns its contents with line numbers. Encoding-aware: auto-detects file encoding (UTF-8, EUC-KR, Shift-JIS, etc.). Image files (PNG, JPG, GIF, BMP, WebP, TIFF, ICO) are returned as ImageContent (base64). SVG files are returned as text. Supports offset/limit for reading specific line ranges. Text defaults to 400 lines and 32768 characters; use offset/limit to continue. Every text result ends with total line count, truncation state, and next_offset when more is available. Negative offset reads from end (e.g. offset=-5 reads last 5 lines). Offset accepts integer, string range "100-200", or [start, end] array. Accepts "path" as alias for "file_path". Relative paths use the configured workspace, MCP client root, or server CWD in that order. |
| toolboxA | Discover and call any AgentTool capability without loading every tool schema into the model context. Use operation=describe with tool= to fetch one tool's instructions and input schema, then operation=call with tool= and arguments={...} to invoke it. This gateway works even when the MCP client ignores tools/list_changed. Use operation=output with output_id= to retrieve bounded raw command output preserved after diagnostic compaction. Large records report next_offset for paging and expire after 30 minutes. Use operation=list to see active and available tools. enable/disable/profile also expose direct tool bindings on clients that refresh dynamically. Profiles: core (compact file/search tools), coding, remote, analysis, full. |
| writeA | Creates or overwrites a file with the given content. Encoding-aware: preserves original encoding for existing files, uses .editorconfig hints for new files. Auto-creates parent directories if they don't exist. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/knewstimek/agent-tool'
If you have feedback or need assistance with the MCP directory API, please join our Discord server