Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOGS_MCP_DIRNoAllowed directory for logs. Can also be provided via the repeatable --dir command-line argument. If neither is set, only the current working directory is allowed.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Investigate huge log files (GBs; plain or .gz; rotated sets; multi-line stack traces) without reading them. Start with log_overview to learn the format, time range and level mix. Then error_clusters to see what is going wrong grouped into templates, timeline to see WHEN, search_logs for exact events (with context), trace_request to follow one request/correlation id across files, compare_windows to find what is new or spiking versus an earlier window, and tail_logs for the latest lines. path may be a file (its rotated siblings app.log.1, app.log.2.gz are included), a directory, or a glob. since/until accept ISO times or -30m / -2h meaning before the newest log entry. All files stay on disk and are streamed: nothing is loaded into memory.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
log_overviewA

Start here. Summarise a log file, rotated set, directory or glob: size, exact line count, detected format (JSON lines, logfmt, syslog, nginx/apache access, ISO-timestamped text, plain), multi-line style (Python traceback / Java stack trace), time range, and a level histogram.

Files larger than max_scan_mb MiB get a sampled (clearly marked ESTIMATED) level histogram; line counts and first/last timestamps stay exact. tz is the UTC offset used to interpret timestamps that carry no zone and to display times (e.g. +03:00).

search_logsA

Find log events by text/regex, minimum level and time window. A stack trace is ONE event, so a match shows the whole trace. level is a minimum (WARN, ERROR, ...). context adds that many neighbouring events either side. Output is capped at max_matches (max 500) and always states how many more matches exist; newest_first=true keeps the NEWEST matches instead of the oldest. since/until: ISO ('2026-11-06T12:30:00Z', '2026-11-06 12:30') or relative to the newest log entry ('-30m', '-2h'). Naive times use tz.

error_clustersB

Group events at or above level into message templates. Numbers, UUIDs, IPs, hex ids, paths and URLs are normalised away so 'timeout after 31ms for user 8f2c...' and '... 47ms for user 91ab...' become one template. For stack traces the exception line is part of the template. Each cluster shows count, first/last seen, levels and a real example event. Use level='all' to cluster everything.

timelineB

Event counts per time bucket for a pattern and/or minimum level, with an ASCII sparkline and bars. Shows WHEN something started or spiked. bucket is 'auto' (about 60 buckets) or a duration such as 10s, 5m, 1h, 1d.

tail_logsA

The last lines physical lines (max 1000), read from the end of the file without scanning the rest. If the newest file is short, earlier rotated files are used. Optional pattern filter (scans at most 64 MiB backwards). follow_seconds (max 60) then waits and returns lines appended during that window.

trace_requestB

Follow one request / correlation / trace / user id across ALL matching files (use a directory or glob to span services). Returns every event mentioning the id, merged into time order, with the file each came from, the time span and how many were errors. Stack traces stay attached to their event.

compare_windowsB

What changed? Compare error templates between window A (baseline) and window B. Reports templates that are NEW in B, SPIKED in B (event rate at least spike_factor times A's, normalised if the windows differ in length), and GONE. With no window arguments, B is the last window (default 1h) of the logs and A is the equal-length window just before it - ideal for 'what broke just now'.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 7 tools

Disambiguation5/5

Each tool has a distinct investigative role: overview, text search, clustering, time-bucket analysis, tailing, cross-file tracing, and window comparison. Overlaps such as error_clusters vs compare_windows and search_logs vs trace_request are clearly separated by their descriptions and intended use.

Naming Consistency4/5

All names use snake_case and are readable, with several clear verb_noun names such as search_logs, tail_logs, trace_request, and compare_windows. However, log_overview, error_clusters, and timeline use noun-phrase conventions, creating minor inconsistency in pattern.

Tool Count5/5

Seven tools is well-scoped for a log-analysis server. Each tool adds a distinct capability and none appears redundant or filler.

Completeness5/5

The surface covers the key log investigation workflow: summarization, search, error grouping, temporal analysis, tailing, request tracing, and change comparison. There are no obvious dead ends for the stated purpose, and caps/pagination behavior are described where relevant.