Skip to main content
Glama

Get server logs

get_logs
Read-only

Read the latest log tails from a server: one entry per log file that a project's processes have written (each long-running process appends to .server4agent/.log in its project folder). Read live from the server at the moment you call. If the server does not answer in time (starting, restarting, or paused), you get the tails saved earlier with stale: true and a note saying how old they are. An app keeps the same log file across restarts. Pass project_id to get only that project's logs. Use this to debug a crashing app or check what a background process is doing.

Input Schema

NameRequiredDescriptionDefault
linesNoMax tail lines per file (default 200, max 1000).
server_idYesThe server's id, as returned by create_server or list_servers.
project_idNoOptional. Only log files from this project's workspace folder.

Output Schema

NameRequiredDescriptionDefault
noteNoWhy the tails are stale and how old they are. null when they are live.
filesYesOne entry per log file.
staleYesfalse when the tails were read from the server at this call. true when it could not be read, so they are the copy saved at updated_at, which can be days old.
updated_atNoWhen the log tails were read. null when the server has reported none yet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/non-destructive annotations, it discloses that reads are live at call time, that a non-responsive server yields cached tails with stale: true and an age note, and that logs persist across restarts. This is exactly the failure-mode context an agent needs that annotations cannot convey.

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?

Front-loads the core action and return shape before the caveats about staleness and usage. Dense with information and largely waste-free, though the parenthetical path detail could be trimmed.

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?

With an output schema present, the description need not explain return values, and annotations cover the safety profile. It nonetheless covers the one thing structured fields cannot: degraded/stale behavior when the server is unavailable. Nothing needed to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the field-level meaning is already documented, but the description adds purpose-level semantics for project_id (narrowing to one project's workspace logs) and clarifies the entry-per-log-file return shape. It adds modest value above the schema baseline.

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 (read) and resource (latest log tails from a server), and precisely defines the unit of return: one entry per log file written by a project's processes. The log file path convention (.server4agent/<name>.log) further concretizes what is being read, distinguishing it from generic file-reading siblings.

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

Usage Guidelines4/5

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

Gives explicit use cases: debug a crashing app or check what a background process is doing, and explains the project_id narrowing behavior. It does not explicitly name alternative siblings (exec, read_file) or state when not to use it, so it stops short of full routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.