Skip to main content
Glama

rails_read_logs

Read-only

Read recent Rails log entries with level filtering, search, and sensitive data redaction to debug errors and investigate failed requests.

Instructions

Read recent log entries with level filtering and sensitive data redaction. Use when: debugging errors, checking recent activity, investigating failed requests. Key params: lines (default 50), level (ERROR/WARN/INFO/DEBUG/FATAL/all), file, search. Search matches the redacted line, so a filtered value cannot be searched for.

Input Schema

NameRequiredDescriptionDefault
fileNoLog file name (e.g. 'production', 'sidekiq', or a rotated 'development.log.0'). Defaults to current Rails.env log. '.log' suffix optional.
levelNoMinimum log level filter. 'all' shows everything (default). 'ERROR' shows ERROR+FATAL only.
linesNoNumber of lines to tail from the log file. With `search`, the number of matching lines to show, searched for in the last 4 MB of the file. Default: 50, max: 500.
searchNoCase-insensitive text filter. Only lines containing this string are returned, searched for in the last 4 MB of the file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.39.1

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish the safe read-only, non-destructive, closed-world profile, so the description is not carrying the safety burden. Its real addition is the redaction behavior and the caveat that search matches the redacted line, so a redacted token cannot be searched for — genuinely useful operational context. It does not describe output shape or truncation behavior for very large files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, purpose first, then usage triggers, then the parameter shorthand, then the single most surprising caveat last. Every sentence carries information not duplicated elsewhere.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a four-param read tool with full schema coverage and a closed-world read-only profile, the description covers purpose, triggers, key defaults and the redaction/search gotcha. The only gap is that with no output schema the description never says what a returned log entry looks like (raw lines? structured objects?), which an agent might want before parsing results.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and every parameter already has a thorough description including defaults, enum semantics and the 4 MB search window, so the baseline is 3. The description earns a 4 by foregrounding which params matter ('Key params: lines (default 50), level (...)') and by adding a semantic constraint the schema cannot express — search operates on redacted text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Read recent log entries' — plus the two capabilities (level filtering, sensitive data redaction). Nothing in the sibling list reads logs; the rest are code/schema introspectors, so the agent can route here without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use when: debugging errors, checking recent activity, investigating failed requests' gives three concrete triggering scenarios, which is above the minimum implied-usage bar. It stops short of 5 because no when-NOT-to-use or named alternative is given (e.g. rails_search_code for grepping source rather than logs).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.