Skip to main content
Glama
klipper-doctor-mcp

klipper-doctor-mcp

by kd-011

Diagnose a klippy.log

diagnose_log
Read-onlyIdempotent

Analyzes a klippy.log to explain why a Klipper print or session stopped or failed, and lints the included printer.cfg for configuration issues.

Instructions

Use when a Klipper print stopped, failed or shut down, or the printer shows an error. Reads a klippy.log and explains why the print or session died, plus lint the printer.cfg that Klipper wrote into the log. Give exactly one of text, path or moonraker. Read-only: it never touches the printer.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "diagnose_log"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoPath to a file on the machine running this server.
textNoThe file contents, pasted.
moonrakerNoFetch the file from Moonraker (needs MOONRAKER_URL in the server config).

Output Schema

NameRequiredDescriptionDefault
countsYes
reportYes
sourceYes
summaryYesOne line: how many errors, warnings and notes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior3/5

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

The safety profile is already declared by annotations (readOnlyHint=true, destructiveHint=false, idempotentHint=true), and the description mostly restates it with 'Read-only: it never touches the printer.' It does add scope beyond the annotations by disclosing that the tool also lints the embedded printer.cfg, but it says nothing about log-size limits, truncation, or how much of the log is examined.

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?

Three sentences, each doing distinct work: trigger condition, behavior/scope, input constraint plus safety. The usage trigger is front-loaded and nothing is redundant boilerplate.

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?

An output schema exists, so return values need no explanation, and the description covers trigger, inputs, exclusivity rule, and safety. The only gap is operational detail about log handling (size caps, partial logs), which matters for a diagnostic tool but is not addressed.

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 description coverage is 100%, so the baseline would be 3, but the description adds a real constraint the schema does not encode: 'Give exactly one of text, path or moonraker.' There is no oneOf/anyOf in the schema, so this mutual-exclusivity rule is genuinely new information that prevents an invalid multi-parameter call.

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 names a concrete verb and resource: it 'Reads a klippy.log and explains why the print or session died' and additionally 'lint[s] the printer.cfg that Klipper wrote into the log.' That dual scope is specific enough to separate it from a plain log reader, and the input modes (text/path/moonraker) are stated outright.

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?

The opening clause is an explicit trigger: 'Use when a Klipper print stopped, failed or shut down, or the printer shows an error.' That is strong when-to-use guidance. What is missing is routing against the sibling `lint_config`, which arguably overlaps with the config-linting half of this tool — no explicit when-not or alternative is given.

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