Skip to main content
Glama

ssh_log_tail

Read-only

Read the last lines of log files over SSH, even huge ones. Supports multiple paths and globs, with optional sudo for restricted files.

Instructions

Returns the last lines of one or more log files, whatever their size — nothing is shipped here to be trimmed locally. Globs are expanded by the server's find rather than a shell, so a name holding a space or a newline stays one path. To look for something instead of reading the end, use ssh_log_search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesOne path, a list, or a glob in the file name: "/var/log/*.log". Expanded by the server's find, not a shell — a name with a space or a newline stays one name. A glob in the directory part is refused.
sudoNoRead as root. Straight away for places a plain user cannot read (/root, /var/lib/docker); otherwise retry with true when the answer names what it could not read. Default: false
linesNoHow many lines from the end. Default: 100
profileYesMachine name.
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds meaningful behavioral context beyond that: files are never trimmed locally, globs are expanded by the server's find rather than a shell, and names with spaces or newlines remain single paths. This helps an agent understand remote behavior without contradicting the annotation.

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 tight and front-loaded with the core action, followed by one crucial behavioral nuance and a sibling routing sentence. No sentence is wasted; the glob detail earns its place because it changes how paths are interpreted.

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

Completeness5/5

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

For a read-only tail tool with a fully detailed schema, no output schema, and no complex side effects, the description covers purpose, edge cases, and the relevant alternative tool. Nothing an agent needs to select and invoke it correctly is missing.

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 schema already documents all four parameters. The description adds no new parameter-level meaning beyond what the path schema already states about glob expansion and non-shell handling, so the baseline of 3 is appropriate.

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?

States a specific verb and resource: 'Returns the last lines of one or more log files'. Explicitly distinguishes itself from ssh_log_search by saying the search tool is for finding something instead of reading the end.

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

Usage Guidelines5/5

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

Gives clear context for when to use the tool (reading the end of log files) and explicitly names the alternative ssh_log_search when the need is to look for something rather than tail. Also clarifies glob expansion behavior that changes how paths should be supplied.

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

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