Skip to main content
Glama

Get service logs

get_service_logs
Read-only

Retrieve recent systemd service logs to diagnose issues, monitor service behavior, and troubleshoot problems on Linux systems.

Instructions

Get recent logs for a specific systemd service.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations declare readOnlyHint=true, which the description doesn't contradict. The description adds context by specifying 'recent logs' (implying recency) and 'systemd service' (scope), which aren't covered by annotations. However, it doesn't mention rate limits, authentication needs for remote hosts, or output format details, leaving some behavioral aspects unspecified.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying essential information.

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, 1 required), 100% schema coverage, annotations for safety, and an output schema (which handles return values), the description is reasonably complete. It covers the core purpose and scope but could improve by adding usage guidelines or more behavioral context to reach a perfect score.

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 each parameter well-documented in the schema. The description doesn't add any parameter-specific details beyond what's in the schema, such as explaining 'service_name' examples or 'host' SSH requirements. Baseline score of 3 is appropriate since the schema carries the full burden.

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 action ('Get') and resource ('recent logs for a specific systemd service'), making the purpose immediately apparent. It distinguishes from sibling tools like 'get_journal_logs' (general logs) and 'get_service_status' (status rather than logs), providing specific differentiation.

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

Usage Guidelines3/5

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

The description implies usage for retrieving service logs but doesn't explicitly state when to use this tool versus alternatives like 'get_journal_logs' or 'read_log_file'. No guidance is provided on prerequisites, exclusions, or specific scenarios where this tool is preferred over others.

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