Skip to main content
Glama

get_system_logs

Fetch recent system logs from journald or syslog to diagnose issues, with optional filtering by service unit and host.

Instructions

Retrieve system logs from journald or /var/log/syslog.

Args: lines: Number of recent log lines to retrieve (default 100). unit: Optional systemd service name to filter logs (e.g., "nginx", "sshd"). host_name: Named host from SSH_HOSTS config; uses default host if omitted.

Returns: Recent system log entries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo
linesNo
host_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

The description adds useful context beyond the name: it specifies the log sources (journald or /var/log/syslog), the config-based host selection (SSH_HOSTS), and the optional unit filter. However, it does not disclose behavior such as error handling, whether it requires an existing SSH connection, or how 'or' between journald and syslog is resolved. With no annotations, this leaves some gaps.

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 compact four-sentence docstring with an Args/Returns structure. No filler words; each sentence adds 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?

For a retrieval tool with optional parameters and an output schema, this description is largely sufficient. It covers source, parameters, and return type. However, it omits prerequisites (e.g., whether a connection must be open) and error behavior, which slightly reduces its completeness.

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 coverage is 0%, so the description carries full responsibility. It explains all three parameters: lines (count, default 100), unit (service name filter), and host_name (SSH_HOSTS named host, default fallback). This exceeds what the schema provides.

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 opens with a clear verb ('Retrieve') and specific resources ('system logs from journald or /var/log/syslog'). This distinguishes it from siblings like tail_log and analyze_log_errors, which have different scopes.

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?

No guidance is provided on when to choose this tool over tail_log, analyze_log_errors, or get_system_overview. The description focuses only on mechanics and does not state use cases or exclusions.

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/zhouxiangjing/mcp-ssh'

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