Skip to main content
Glama
crosspad-mcp-server

crosspad-mcp-server

Official
by CrossPad

Explain a crash

crosspad_diagnose_crash
Read-onlyIdempotent

Diagnose CrossPad panics in one call: retrieve reset reason, panic registers, source-decoded backtrace, heap state, and surrounding console lines from a log, console handle, or device.

Instructions

[ESP HW] Diagnose a CrossPad panic in one call: reset reason, panic registers, decoded backtrace, heap after the restart and the console lines around it. The backtrace is decoded to source lines against the ELF of the build actually flashed, and the surrounding console lines come as a link. Point it at a log file, an open console handle or a device (it listens briefly). Read the frames from the bottom up: the deepest CrossPad frame, not the LVGL ones above it, is where to look. Tells PANIC/WDT/BROWNOUT faults apart from ordinary restarts.

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": "crosspad_diagnose_crash"
  }
}

Input Schema

NameRequiredDescriptionDefault
elfNoOverride the ELF; by default the one matching the firmware's own SHA is used
decodeNoSet false to skip addr2line and just report the raw frames
deviceNoListen on this board's console for a moment
secondsNodevice mode: how long to listen
log_fileNoA captured console log to decode
context_linesNo
console_handleNoUse an already-open console (con_N) — it has the history

Output Schema

NameRequiredDescriptionDefault
tsNo
docsNo
nextNo
errorNo
foundNo
noticeNo
reportNo
successYes
backtraceNo
likely_causeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv11.0.0

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already declare this a safe, read-only, idempotent operation, and the description still adds real behavioral context: it listens briefly in device mode (i.e. it consumes wall-clock time), it decodes against the ELF of the actually flashed build, and it returns console context as a link rather than inline. It does not describe what happens when no fault is present or when decoding fails, which keeps it off a 5.

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 out-of-band outcome ('diagnose in one call') is front-loaded, the evidence it gathers follows, then the input modes, then the one non-obvious reading instruction (bottom-up, skip the LVGL frames). Every sentence carries a distinct fact, with no restatement of the name or the schema.

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 seven-parameter, zero-required diagnostic tool with an output schema, the definition covers what the agent must decide: which parameter mode to use, what the decode dependency is, and how to read the frames. Return shape is delegated to the output schema, so nothing material 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 already 86%, so the baseline is 3, but the description adds meaning the schema does not: the log-file, console-handle, and device parameters are presented as mutually alternative ways to supply the same evidence, and the elf override is explained as a match against the firmware's own SHA. That alternative-mode framing is the kind of semantic an agent cannot reliably infer from seven flat properties.

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 specific verb and resource ('Diagnose a CrossPad panic') and enumerates exactly what it returns: reset reason, panic registers, decoded backtrace, post-restart heap, and surrounding console lines. The closing sentence ('Tells PANIC/WDT/BROWNOUT faults apart from ordinary restarts') sharpens the scope enough that an agent can separate it from general tools like crosspad_analyze without consulting schemas.

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?

It gives concrete entry conditions by naming the three acceptable input sources (a log file, an open console handle, or a device it listens to briefly) and implicitly excludes ordinary restarts from its remit. What it lacks is an explicit exclusion or a named sibling to use instead when the target is not a fault at all, so it stops short of a 5.

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