Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
AGENT_TOOL_FALLBACK_ENCODINGNoFallback 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

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
agent_tool_help

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.

analyze

Static binary analysis tool for reverse engineering and debugging. Operations: disassemble (x86/x64/ARM/ARM64 disassembly), pe_info (PE header/sections/imports/exports), elf_info (ELF header/sections/symbols), macho_info (Mach-O header/segments/symbols), strings (extract printable strings from binary), hexdump (hex+ASCII view), pattern_search (hex byte pattern with ?? wildcards), entropy (Shannon entropy per section), bin_diff (two-file byte comparison), resource_info (PE resources and version info), imphash (PE import hash for malware classification), rich_header (PE build tool fingerprint), overlay_detect (detect appended data after last section), dwarf_info (debug symbol info). Pure Go implementation — no external tools needed. Supports x86, x64, ARM, ARM64. For runtime debugging, use the debug tool instead.

backup

Creates a timestamped zip backup of a directory. Output: {dirname}_{YYYYMMDD_HHMMSS}.zip Default excludes: .git, node_modules, pycache, binaries. Custom excludes can be added via the excludes parameter.

bash

Execute shell commands with persistent session support. Sessions maintain working directory, environment variables, and shell state across calls. Use session_id to manage multiple independent shell sessions. Use disconnect=true to close a session. Platform: bash/sh on Unix, PowerShell/git-bash/cmd on Windows (auto-detected, best available).

checksum

Computes a hash checksum of a file. Reads the file as raw bytes (no encoding conversion). Supported algorithms: md5, sha1, sha256 (default).

compress

Compresses files and directories into an archive. Supports .zip and .tar.gz formats. Output format is determined by the file extension.

convert_encoding

Converts a file's encoding to a different character set. Reads the file with auto-detected encoding, then rewrites it in the target encoding. Supports: UTF-8, UTF-8-BOM, EUC-KR, Shift_JIS, ISO-8859-1, UTF-16, ASCII, Windows-1252, Big5, GB18030. Example: convert EUC-KR file to UTF-8, or add/remove UTF-8 BOM.

copy

Copies a file or directory to a new location. File copy uses atomic write (temp file + rename) and preserves permissions. Directory copy recreates the full directory structure recursively. Use dry_run=true to preview what would be copied without doing it.

debug

Interactive debugger using Debug Adapter Protocol (DAP). Launch and control debug sessions for any language with a DAP-compatible adapter. Supports breakpoints, stepping, variable inspection, expression evaluation, stack traces. Adapters: dlv (Go), debugpy (Python), codelldb/lldb-dap (C/C++/Rust), and more. Operations: launch, attach, set_breakpoints, continue, next, step_in, step_out, pause, threads, stack_trace, scopes, variables, evaluate, disconnect, status. Extended: breakpoint_locations, set_function_breakpoints, set_exception_breakpoints, set_data_breakpoints, data_breakpoint_info, set_instruction_breakpoints, disassemble, read_memory, write_memory, set_variable, set_expression, goto, goto_targets, step_back, reverse_continue, restart_frame, modules, loaded_sources, exception_info, completions, source, terminate, restart, cancel, step_in_targets, terminate_threads. Requires a DAP adapter executable installed on the system (e.g. 'dlv dap' for Go, 'python -m debugpy' for Python).

decompress

Extracts an archive to a directory. Supports .zip and .tar.gz formats. Includes Zip Slip and Zip Bomb protection. Symlinks are skipped for security.

delete

Deletes a single file. Safety: no directory/symlink deletion, no path traversal, no system files, TOCTOU protection. Use dry_run=true to preview.

diff

Compares two files and outputs a unified diff. Encoding-aware: auto-detects file encoding before comparison. Max 50,000 lines per file.

dnslookup

Query DNS records for a hostname. Supports record types: A, AAAA, MX, CNAME, TXT, NS, SOA. Uses DNS over HTTPS (DoH) by default for privacy and to bypass local DNS filters. Can also use traditional UDP DNS queries against the system resolver. Returns record values with TTL information.

download

Download a file from a URL and save it to disk. Supports binary and text files. For reading web page content as text, use the webfetch tool. Features: ECH (Encrypted Client Hello) and DoH (DNS over HTTPS) enabled by default. Supports HTTP and SOCKS5 proxies. SSRF protection blocks private/internal IPs. Max download size: 100 MB (adjustable via max_size_mb, hard limit 2 GB).

edit

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.). Reads .editorconfig for indentation settings. Use dry_run=true to preview changes without modifying the file.

envvar

Reads environment variables. Returns a single variable by name, or lists all with optional filter. Sensitive values (passwords, tokens, keys) are automatically masked for security.

externalip

Returns your external (public) IP address (both IPv4 and IPv6). Queries dedicated IPv4 and IPv6 detection services with automatic fallback. IPv6 shows "not available" when the network has no IPv6 connectivity. Useful for SSH configuration, firewall rules, or verifying VPN/proxy status. No parameters required.

file_info

Returns detailed file metadata: size, encoding, line ending, indentation style, and line count. Uses the same encoding detection as read/edit (chardet + .editorconfig).

find_tools

Discovers installed development tools (compilers, build systems, runtimes) on the system. Returns paths and versions for: Go, .NET/MSBuild, Node.js, Python, Java, Rust, C/C++ (GCC/Clang/MSVC), CMake, Make, Git, Docker, Bun, Deno. Use this before running build commands to avoid PATH issues. Searches environment variables, PATH, and known installation directories.

firewall

Reads firewall rules (read-only). Linux: iptables/nftables/firewalld. Windows: netsh advfirewall. Use filter to search by rule name or port number. May require elevated privileges on Linux.

glob

Finds files matching a glob pattern. Supports ** for recursive directory matching. Returns matching file paths sorted by modification time (newest first). Skips hidden directories (.git, etc.) and common vendor directories. Use relative_paths=true to return paths relative to the search directory (saves tokens).

grep

Searches file contents for a regex pattern. Encoding-aware: auto-detects file encoding. Can search a single file or recursively search a directory. Supports glob filtering and case-insensitive search.

httpreq

Execute HTTP requests with any method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS). Ideal for testing APIs, webhooks, and web services during development. Features: ECH (Encrypted Client Hello) and DoH (DNS over HTTPS) enabled by default. Supports custom headers, request body, and HTTP/SOCKS5 proxies. SSRF protection blocks private/internal IPs. Response body is truncated at max_response_kb. For fetching web pages as text, use webfetch. For downloading files, use download.

jsonquery

Query a JSON file using dot-notation paths without loading the entire file into context. Supports nested keys (a.b.c), array indices ([0], [-1] for last), and wildcards ([] for all elements). Examples: "dependencies.react", "scripts.build", "items[0].name", "users[].email". Returns the matched value with its type. Objects and arrays are pretty-printed. Use this to extract specific values from large JSON files to save tokens.

listdir

Lists directory contents. Default: flat listing (one path per line, token-efficient for AI agents). Use flat=false for visual tree structure with connectors (├── └──). Skips hidden directories and common build/vendor directories. Use max_depth to control traversal depth (default: 3). Use relative_paths=true to show root as '.' instead of full path (saves tokens).

memtool

Process memory tool for reverse engineering and game hacking. CheatEngine-style workflow: search → filter → filter → find exact addresses → write. Supported: Windows (ReadProcessMemory/WriteProcessMemory), Linux (/proc/pid/mem). macOS: not supported (SIP). Operations: regions (list memory map), search (value scan or unknown initial value scan, creates session), filter (narrow: exact/changed/unchanged/increased/decreased), undo (restore previous filter), read (hex dump), write (modify memory), disasm (disassemble live memory — x86/x64/ARM/ARM64), info (session status + values), close (end session), struct_search (multi-field pattern), pointer_scan (find pointer chains to address), diff (compare memory snapshots).

mkdir

Create a directory. Creates parent directories by default (like mkdir -p). Supports permission mode in octal (e.g. 0755, 0700) — applied on Unix/Linux. Use dry_run=true to preview.

multiread

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 (applied to all files). If a file fails, the error is included in output and remaining files continue. Maximum 50 files per request.

mysql

Execute SQL queries on a MySQL/MariaDB database. Supports SELECT, INSERT, UPDATE, DELETE, SHOW, DESCRIBE, and other SQL statements. SELECT-like queries return formatted table output with column alignment. Non-SELECT queries return affected row count and last insert ID. Connection is closed after each call (no session pooling). Max 1000 rows returned, long values truncated at 200 characters.

patch

Applies a unified diff patch to a file. Parses @@ hunk headers, verifies context lines, and applies changes. Encoding-aware: preserves original file encoding. Use dry_run=true to preview without modifying the file.

portcheck

Check if a TCP port is open on a host. Tests connectivity by attempting a TCP connection with a configurable timeout. Returns OPEN/CLOSED status with response time or error details. Useful for verifying if a server is running, checking firewall rules, or validating deployments. Supports hostnames, IPv4, and IPv6 addresses.

procexec

Execute a command as a new process. Supports background execution and starting in suspended state. WARNING: This tool executes arbitrary commands on the host system. Use with caution. Use suspended=true to start a process in suspended state (Windows: CREATE_SUSPENDED, Linux: SIGSTOP). Use prockill with signal=cont to resume a suspended process.

prockill

Kills, suspends, or resumes a process by PID or port number. Supports tree kill (process + all children), signal selection (kill/term/hup/int/stop/cont). Use signal=stop to suspend and signal=cont to resume a process. On Linux, can detect and handle zombie processes by signaling their parent. Use dry_run=true to preview which processes would be affected. Safety: refuses to target PID 0/1 or the agent-tool process itself.

proclist

Lists running processes with PID, name, command line, and memory usage. Sensitive information in command-line arguments (passwords, tokens) is automatically masked. Use filter to search by process name, or port to find processes using a specific port.

read

Reads a file and returns its contents with line numbers. Encoding-aware: auto-detects file encoding (UTF-8, EUC-KR, Shift-JIS, etc.). Supports offset/limit for reading specific line ranges. Negative offset reads from end (e.g. offset=-5 reads last 5 lines).

redis

Execute Redis commands on a Redis server. Supports all Redis commands (GET, SET, HGETALL, LPUSH, etc.). Results are formatted by type: strings, integers, arrays, and nil values. Connection is closed after each call (no session pooling). Supports TLS encryption for secure connections.

regexreplace

Performs regex find-and-replace across files. Encoding-aware: preserves original file encoding. Supports single file or recursive directory mode with glob filtering. Supports capture group replacement ($1, $2, ${name}). Skips binary files. Use dry_run=true to preview changes.

rename

Renames or moves a file/directory. Atomic operation via os.Rename. Use dry_run=true to preview.

set_config

Changes agent-tool runtime configuration. Supports: fallback_encoding, encoding_warnings, max_file_size_mb, allow_symlinks, workspace. SSRF policy: allow_http_private, allow_mysql_private, allow_redis_private, allow_ssh_private. Network: enable_doh (DNS over HTTPS), enable_ech (Encrypted Client Hello). Call with no arguments to view current configuration. Example: set fallback_encoding to "EUC-KR" for Korean legacy projects.

sftp

Transfer files and manage remote filesystems over SSH (SFTP protocol). Reuses SSH session pool — same authentication and session reuse as the ssh tool. Operations: upload (local to remote), download (remote to local), ls, stat, mkdir, rm, chmod, rename. Async operations: upload_async, download_async (returns transfer_id immediately), status (check progress), cancel. Max file transfer size: 2 GB. Use overwrite=true to replace existing files. Recursive delete is limited to 10,000 items for safety.

sloc

Count source lines of code (SLOC) in files or directories. Returns per-language summary with file count, total lines, and blank lines. Recognizes 70+ languages by file extension. Skips common non-source directories (node_modules, .git, vendor, dist, build). Use glob to filter specific file types. Use show_files to control per-file breakdown.

ssh

Execute commands on a remote server via SSH. Supports password and key-based authentication. SSH agent is used as fallback on Unix. Sessions are automatically pooled and reused for the same host:port:user combination. Idle sessions expire after 10 minutes. Supports IPv6 addresses and ProxyJump (jump_host) for reaching servers through bastion hosts.

sysinfo

Returns system information: OS, CPU cores, RAM, disk space, CPU usage. Set duration_sec (1-20) to measure CPU usage over time.

tlscheck

Checks TLS certificate and connection details for a host. Returns certificate subject, issuer, expiry, SANs, TLS version, and cipher suite. Useful for verifying SSL certificates, checking expiry dates, and debugging TLS issues.

tomlquery

Query a TOML file using dot-notation paths without loading the entire file into context. Supports nested keys (a.b.c), array indices ([0], [-1] for last), and wildcards ([] for all elements). Examples: "dependencies.react", "tool.poetry.name", "servers[0].host", "servers[].role". Returns the matched value with its type. Objects and arrays are pretty-printed as JSON. Use this to extract specific values from large TOML files to save tokens.

webfetch

Fetch content from a URL and return it as text. HTML pages are automatically converted to Markdown for readability. Features: ECH (Encrypted Client Hello) and DoH (DNS over HTTPS) enabled by default. Supports HTTP and SOCKS5 proxies. SSRF protection blocks private/internal IPs. Default User-Agent mimics Chrome browser. Custom headers supported. For downloading binary files, use the download tool instead.

websearch

Search the web using Brave Search or Naver Search API. Requires API key(s) via environment variables:

  • BRAVE_SEARCH_API_KEY for Brave Search (English/global, default)

  • NAVER_CLIENT_ID + NAVER_CLIENT_SECRET for Naver Search (Korean content) If no engine is specified, auto-selects based on configured keys (Brave preferred). Use Naver for Korean-specific content (news, blogs, cafes).

write

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.

yamlquery

Query a YAML file using dot-notation paths without loading the entire file into context. Supports nested keys (a.b.c), array indices ([0], [-1] for last), and wildcards ([] for all elements). Examples: "services.web.ports[0]", "spec.containers[].image", "database.host". Returns the matched value with its type. Objects and arrays are pretty-printed as JSON. Use this to extract specific values from large YAML files to save tokens.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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