Skip to main content
Glama

get_log_segment

Extract a specific segment from a log file using line numbers or timestamps to isolate relevant entries without loading the entire file.

Instructions

Extract a segment of a log file by line range or time range.

Use line ranges for precise extraction (e.g., around a known error line). Use time ranges to get all entries within a time window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
start_lineNo
end_lineNo
start_timeNo
end_timeNo
max_linesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description should disclose more behavioral traits. It mentions extraction methods but does not specify read-only nature, required permissions, or behavior when both range types are provided.

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 concise with two well-structured sentences, each adding value and leading with the most important information.

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

Completeness2/5

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

Given 6 parameters, no annotations, and an output schema, the description is incomplete. It does not clarify parameter interactions, constraints (e.g., file size, time format), or cross-tool guidance with siblings.

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

Parameters2/5

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

Schema description coverage is 0%, so description must compensate. It mentions line/time ranges and max_lines but fails to specify time string format, exclusivity of ranges, or behavior when both ranges are given, leaving ambiguity.

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 'Extract a segment of a log file' with a specific verb and resource, and the two extraction methods (line range, time range) are distinct from sibling tools like search_logs or analyze_errors.

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?

Provides clear guidance on when to use line ranges ('precise extraction around a known error line') versus time ranges ('all entries within a time window'), but does not address when to avoid this tool or compare to alternatives.

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/ascii766164696D/log-mcp'

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