Skip to main content
Glama

Get service logs

get_service_logs
Read-only

Troubleshoot Linux service issues by retrieving recent systemd logs. Specify the service name and line count to view output from local or remote hosts.

Instructions

Get recent logs for a specific systemd service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoRemote host to connect to via SSH
linesNoNumber of log lines to retrieve.
service_nameYesName of the systemd service

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

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

  1. Changed1 schema field changedv1.6.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

The readOnlyHint annotation already communicates that this is a safe read operation, and the description adds minimal scope detail ('specific systemd service', 'recent'). No contradiction exists, but the description does not disclose additional behavioral nuances such as SSH-based remote execution or line-count limits beyond 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.

Conciseness5/5

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

The description is a single, compact sentence that states the core purpose immediately. Every word adds value, and there is no redundant or extraneous content.

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 presence of a full input schema, an output schema, and readOnly annotations, the description is largely sufficient for an agent to invoke the tool correctly. It falls slightly short by not clarifying how this tool differs from closely related logging siblings, which is relevant context for correct selection.

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 parameters are already well documented. The description does not add extra semantic value beyond what the schema provides, making the baseline score of 3 appropriate.

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 identifies the operation ('Get recent logs') and the resource ('specific systemd service'), so an agent can understand what the tool does. However, it does not explicitly distinguish this from sibling tools like get_journal_logs, which may also retrieve 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 gives no guidance on when to choose this tool over alternatives such as get_journal_logs or read_log_file. There are no explicit use-case conditions, exclusions, or cross-references to siblings.

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