Skip to main content
Glama

read_log

Destructive

Read specific lines from a log file. Get recent entries with tail, or filter by time window using since/until.

Instructions

Read lines from a log file. Supports reading from the beginning or end, with optional time-based filtering.

When to use

Use to inspect a specific portion of a log file. Use tail: true for the most recent entries. Use since/until to narrow to a specific time window. For targeted pattern matching, prefer search_log instead.

Parameters

path

Absolute path to the log file. Obtain valid paths from list_logs.

lines

Number of lines to return. Defaults to 100.

tail

If true, return the last N lines instead of the first N. Useful for checking recent log activity. Default: false.

offset

Skip this many lines from the start (or from the end if tail=true). Use for pagination through large files.

since

Return only lines after this point in time. Accepts RFC3339 timestamps (2024-01-15T10:00:00Z) or relative durations (1h, 30m, 2h30m). Relative durations are resolved against the current server time.

until

Return only lines before this point in time. Same format as since.

Response

  • path — file path that was read

  • lines — array of log lines (strings)

  • count — number of lines returned

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the log file. Obtain valid paths from `list_logs`.
tailNoIf true, return the last N lines instead of the first N. Useful for checking recent log activity. Default: false.
linesNoNumber of lines to return. Defaults to 100.
sinceNoReturn only lines after this point in time. Accepts RFC3339 timestamps (`2024-01-15T10:00:00Z`) or relative durations (`1h`, `30m`, `2h30m`). Relative durations are resolved against the current server time.
untilNoReturn only lines before this point in time. Same format as `since`.
offsetNoSkip this many lines from the start (or from the end if `tail=true`). Use for pagination through large files.
Behavior5/5

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

The description fully explains the tool's behavior: reading from start or end, time-based filtering, pagination, default line count, and response structure. Despite `destructiveHint=true` in annotations, the description accurately reflects a read-only operation, adding transparent details beyond the annotation.

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?

The description is well-structured with sections, bullet points, and front-loaded purpose. Every sentence adds value—no fluff. It is appropriately sized for 6 parameters.

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

Completeness5/5

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

Despite no output schema, the description includes a 'Response' section detailing output fields (path, lines, count), making it complete. It covers time filtering, pagination, and file source, addressing all aspects for effective tool invocation.

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

Parameters5/5

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

With 100% schema coverage, baseline is 3, but the description adds significant meaning: explains when to use `tail`, describes time formats with examples, clarifies offset for pagination, and lists defaults. This goes well beyond the schema by providing usage context.

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?

The description clearly states 'Read lines from a log file' and specifies reading from beginning or end with time filtering. It distinguishes from sibling 'search_log' by noting that tool is for pattern matching, making the purpose specific and unambiguous.

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

Usage Guidelines5/5

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

The 'When to use' section explicitly states when to use the tool (inspect log portions), when to use `tail` (recent entries), and when not to (use `search_log` for pattern matching). It also advises obtaining paths from `list_logs`, providing clear context.

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

Install Server

Other Tools

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/kascada/logmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server