Skip to main content
Glama
narmaku

Linux MCP Server

by narmaku

read_log_file

Retrieve log file contents from Linux systems for diagnostic analysis, supporting both local files and remote SSH connections with configurable line output.

Instructions

Read a specific log file (whitelist-controlled via LINUX_MCP_ALLOWED_LOG_PATHS).

Args:
    log_path: Path to the log file
    lines: Number of lines to retrieve from the end (default: 100)
    host: Remote host to connect to via SSH (optional, executes locally if not provided)
    username: SSH username for remote host (required if host is provided)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
log_pathYes
linesNo
hostNo
usernameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: the tool reads log files (implying read-only), mentions whitelist control via LINUX_MCP_ALLOWED_LOG_PATHS (important access restriction), and explains SSH behavior for remote execution. However, it doesn't cover rate limits, error handling, or output format details.

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 appropriately sized and front-loaded: the first sentence states the core purpose and key constraint (whitelist), followed by a clear Args section with concise explanations for each parameter. Every sentence adds value with no wasted words.

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 (4 parameters, no annotations, but with output schema), the description is mostly complete. It covers purpose, usage context, parameters, and key behavioral constraints. However, it doesn't mention the output schema's existence or what the tool returns (though the output schema handles that), and lacks details on error cases or the whitelist mechanism.

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?

Schema description coverage is 0%, so the description must compensate fully. It adds significant meaning beyond the schema: explains that log_path is for log files with whitelist control, lines retrieves from the end with a default, host is for remote SSH (optional), and username is required if host is provided. This covers all 4 parameters thoroughly.

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 the verb ('Read') and resource ('a specific log file'), and distinguishes it from siblings by specifying it's for log files (not system info, processes, etc.) and mentioning whitelist control via LINUX_MCP_ALLOWED_LOG_PATHS, which is unique among the sibling tools.

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?

The description provides clear context for usage: it's for reading log files with path-based access control. It implies when to use (for log files) vs. alternatives like get_journal_logs or get_service_logs, but doesn't explicitly name them or state exclusions. The optional SSH parameters give guidance on remote vs. local execution.

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/narmaku/linux-mcp-server-archived'

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