Skip to main content
Glama

get_logs

Fetch the tail of a detached local ComfyUI server's captured log output. Pass an explicit port to read the correct instance's log file, particularly after a crash.

Instructions

Return the tail of the LOCAL background ComfyUI's captured log file.

Wraps comfy logs --tail <tail> — reads comfy-cli's persisted stdout/stderr file, the only way to see a detached server's output. Returns {lines, path, truncated}.

Args: port: force WHICH log file is read. Pass it whenever more than one ComfyUI/port has run here, and always after a crash — no running process is left to infer the port from, so an unqualified call can hand back a different instance's log.

A newer comfy-cli also reports source (explicit_port/recorded are trustworthy, anything else is a guess) and port_mismatch (served file is a different port than the running server). If either signals doubt, don't trust the lines — retry with an explicit port.

No log file yet returns {"error": "no_log_file", ...} as DATA, not a raised error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo
tailNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations provided, the description fully discloses behavior: it wraps 'comfy logs --tail <tail>', reads a persisted stdout/stderr file, returns a structured object {lines, path, truncated}, returns errors as data (not raised exceptions), and reports trust signals (source, port_mismatch). This is rich, transparent disclosure that goes beyond any annotation would offer.

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?

The description is well-structured: a lead sentence stating purpose, followed by operational details, parameter guidance, and edge-case handling. It is a bit long but every sentence adds value—no filler. The port disambiguation and trust-signal warnings are essential. Structure is logical and front-loaded.

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?

The description covers the return object, error handling (returns data not raised error), port disambiguation, and trust signals. The only minor omission is an explicit explanation of the tail parameter and what 'truncated' means, but overall it is sufficient for a tool with no annotations or output schema. It gives an agent everything needed to call it correctly in most scenarios.

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?

The description thoroughly explains the port parameter, including its purpose and when to pass it. However, the tail parameter is only mentioned via the wrapped command ('--tail <tail>') without a clear definition of what it controls (number of lines). Given 0% schema coverage, this is a partial gap—port is well covered, tail is not explicitly defined.

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 tool's function: 'Return the tail of the LOCAL background ComfyUI's captured log file.' It also distinguishes it from siblings by noting it's 'the only way to see a detached server's output,' which sets it apart from any other log-related tool. The verb 'return' and resource 'log file' are specific and unambiguous.

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?

Provides explicit usage guidance for the port parameter: 'Pass it whenever more than one ComfyUI/port has run here, and always after a crash.' It also advises retrying with an explicit port when trust signals (source, port_mismatch) indicate doubt. While it doesn't name alternative tools, the guidance for correct invocation is clear and actionable.

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