Skip to main content
Glama
Majrooo

majrooo-mcp-devkit

by Majrooo

read_log_slice

Read-onlyIdempotent

Read a specific line range from a saved log file to inspect output without rerunning commands. Works with local and temp directory logs.

Instructions

Reads a slice of a log file by the given line range. Use this tool instead of re-running the same command with a higher maxLines when you already have the log path saved from a previous run_safe_command / run_destructive_command response. NOTE: the file is read directly via Node.js (not through the shell), so it also works for logs in os.tmpdir().

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logPathYesPath to the log file
lineCountNoNumber of lines to read (default: 100)
startLineNoStarting line (0-based, default: 0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so the safety profile is covered. The description adds genuinely useful behavior beyond that: the file is read directly via Node.js rather than through the shell, which implies it can reach logs in os.tmpdir() that shell-based reads might not. It stops short of describing error behavior for a missing path or whether lineCount is clamped.

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?

Two sentences, no filler, and the core action is front-loaded ahead of the routing advice and the shell-bypass note. Every clause carries actionable information for selection.

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 read-only tool whose annotations already carry the safety profile and which has no output schema to explain, the description covers purpose, routing and the shell-bypass nuance well. Minor gaps remain around failure modes and any size limits for large slices.

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

Parameters3/5

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

Schema description coverage is 100%, so logPath, lineCount and startLine are already documented with defaults and 0-based indexing. The description only echoes the 'line range' concept and adds no format or edge-case guidance beyond the schema, making the baseline 3 appropriate.

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 ('Reads a slice of a log file') plus the scoping mechanism ('by the given line range'). It is readily distinguishable from the command-execution siblings because it names them only as the source of the log path, not as the same operation.

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?

Explicitly tells the agent when to prefer this tool ('instead of re-running the same command with a higher maxLines') and under what precondition ('when you already have the log path saved from a previous run_safe_command / run_destructive_command response'). The named alternative and the selecting condition leave nothing to inference.

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