Skip to main content
Glama

Read log file

read_log_file
Read-only

Read specific log files from local or SSH-connected Linux hosts to diagnose system issues, with options to fetch first or last lines.

Instructions

Read a specific log file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoRemote host to connect to via SSH
log_pathYesAbsolute path to the log file (must be in allowed list)
last_linesNoNumber of last lines to retrieve from the log file. Default: 100. Mutually exclusive with first_lines.
first_linesNoNumber of first lines to retrieve from the log file. Mutually exclusive with last_lines.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
unitNo
entriesYes
lines_countNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv1.6.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / first_lines
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 10000,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Number of first lines to retrieve from the log file. Mutually exclusive with last_lines."
      +}
    • addedInput schema / properties / last_lines
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 10000,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Number of last lines to retrieve from the log file. Default: 100. Mutually exclusive with first_lines."
      +}
    • removedInput schema / properties / lines
      Removed value: -{
      -  "default": 100,
      -  "description": "Number of lines to retrieve from the end.",
      -  "maximum": 10000,
      -  "minimum": 1,
      -  "type": "integer"
      -}
    • changedOutput schema / properties / path / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "format": "path",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / unit / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "format": "path",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

The annotation readOnlyHint=true is consistent with the description's 'Read' verb, so there is no contradiction. The description adds little behavioral context beyond the annotation though — it does not mention the remote-host SSH behavior or the allowed-list restriction on log paths, though those details do appear in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with zero filler words, stating the core action immediately. It is highly efficient, though its brevity sacrifices the sibling-differentiation and usage context that the description could have transported.

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

Completeness3/5

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

The schema is rich (100% parameter coverage, examples, mutual-exclusivity constraints), an output schema exists, and annotations cover the read-only safety profile — so the description does not need to explain return values or parameters. The one material gap is the absence of routing guidance among read_log_file, read_file, get_journal_logs, and get_service_logs, which is a real cost for an agent facing this sibling list.

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%, with all four parameters (host, log_path, last_lines, first_lines) having meaningful descriptions including defaults, examples, and mutual exclusivity. Per the high-coverage baseline, the description carries no parameter burden, and it adds none — an appropriate split of responsibilities.

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 states a clear verb and resource: 'Read a specific log file.' The word 'specific' signals path-based file access rather than journal or service aggregation. However, it does not explicitly differentiate from near-neighbor siblings like read_file, get_journal_logs, or get_service_logs, leaving some ambiguity in tool selection.

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 contains no guidance on when to use this tool versus alternatives. Siblings like get_journal_logs and get_service_logs exist, but no exclusions or selection criteria are mentioned. The agent must infer usage context from the tool name alone, with no support from the description.

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

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