Skip to main content
Glama

Read daemon logs

logs
Read-onlyIdempotent

Read recent TSLink daemon log entries to diagnose failures when status and doctor are insufficient, redacting credentials, login URLs, and email addresses.

Instructions

Read recent lines from the local TSLink daemon log. Use this when status and doctor did not explain a failure and the daemon's own account of what happened is needed; it opens the local log file read-only, returns a recent window rather than the whole file, and redacts credential material, Tailscale login and invitation URLs, and email addresses before returning anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lastNoMaximum number of lines to return, counted from the newest.
levelNoMinimum producer log level. Omitting it returns every level.
sinceNoDuration such as 15m, 6h or 2d bounding how far back to read (Go syntax, plus d for days); defaults to 1h and may not exceed 7d (168h). Widen it only after the default window came back empty.
sourceNoerr is the structured application log and is almost always the one wanted; out is the daemon's stdout.err

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileYes
countYes
levelNo
linesYes
sinceYesThe requested window as a duration.
sourceYes
matchedYesLines passing the level and time filters before the line and byte bounds; compare with count to see how much was cut.
redactedYesConstant true. Credential material, Tailscale login and invitation URLs, and email addresses are replaced before the lines are returned, so they are not byte-identical to the file on disk.
since_atYesAbsolute cutoff the window resolved to, in the daemon's clock.
truncatedYesTrue when lines is not the whole of what matched.
truncated_reasonNoWhich bound cut the answer: line_limit is the last argument, byte_limit is the response size ceiling.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses read-only file access, that the return is a bounded recent window rather than the full file, and that credentials, Tailscale login/invitation URLs, and email addresses are redacted before return. These are exactly the safety-relevant behaviors an agent needs and cannot get from structured fields.

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?

Two sentences, purpose front-loaded, then usage and behavior. Every clause carries information (read-only, windowing, redaction categories) with no filler or repetition of the title.

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 it still covers purpose, when-to-use, alternatives, and safety behavior. Nothing an agent needs in order to call this 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% and the schema is unusually rich (per-parameter guidance, defaults, enum meanings, the 'widen only after the default window came back empty' advice). The description adds no parameter-level detail, so the baseline of 3 applies even though the schema itself is excellent.

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 ('Read recent lines from the local TSLink daemon log') with a scope qualifier ('recent window rather than the whole file') that separates it from the many other diagnostic siblings. An agent can tell this apart from status, doctor, or access_log without opening any schema.

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?

Explicitly names the escalation condition ('Use this when status and doctor did not explain a failure') and the two alternative tools to try first. This is a clear when-to-use plus alternatives, leaving nothing to inference.

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