Skip to main content
Glama

Read log file

read_log_file
Read-only

Retrieve log entries from system log files on Linux servers to monitor events, diagnose issues, and troubleshoot system behavior by specifying file path and line count.

Instructions

Read a specific log file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
log_pathYesAbsolute path to the log file (must be in allowed list)
linesNoNumber of lines to retrieve from the end.
hostNoRemote host to connect to via SSH

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
unitNo
entriesYes
lines_countNo
Behavior3/5

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

Annotations provide readOnlyHint=true, which the description doesn't contradict. The description adds minimal behavioral context beyond annotations—it specifies 'log file' but doesn't mention constraints like the allowed list mentioned in the schema, rate limits, authentication needs for remote hosts, or what happens with invalid paths. With annotations covering safety, this earns a baseline score.

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 extremely concise—a single sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to scan and understand quickly. Every word earns its place.

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?

Given the tool's moderate complexity (3 parameters, remote host capability) and the presence of both annotations (readOnlyHint) and an output schema, the description is reasonably complete. It specifies the resource type (log file) but could better address sibling differentiation and usage context. The output schema means return values don't need explanation.

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 the schema fully documents all three parameters (log_path, lines, host). The description adds no additional parameter semantics beyond what's in the schema, such as explaining the allowed list or SSH requirements. Baseline 3 is appropriate when the schema does all the work.

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

Purpose4/5

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

The description clearly states the verb ('Read') and resource ('a specific log file'), making the purpose unambiguous. However, it doesn't differentiate from the sibling tool 'read_file' which appears to be a more general file reading tool, nor does it mention the 'get_journal_logs' or 'get_service_logs' siblings that might handle different types of logs.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'read_file', 'get_journal_logs', or 'get_service_logs'. It doesn't mention prerequisites (e.g., file must exist, path must be in allowed list) or exclusions, leaving the agent to infer usage from context alone.

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/rhel-lightspeed/linux-mcp-server'

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