Skip to main content
Glama

Recover/Diagnose Stack

clawops_workflow_recover
Read-onlyIdempotent

Diagnose an unhealthy stack when it stops working. Runs status, gateway, agent, and systemd checks, then returns a structured report with remediation steps.

Instructions

Diagnostic workflow for an unhealthy stack. Internally: status check → gateway logs → agent logs → systemd service status → produces a structured diagnostic report with suggested remediation.

Use when: the user reports any "not working" symptom and you don't know where to start. Best entry point for troubleshooting.

Do NOT use when: the user has already identified the problem and asks for a specific fix.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stackNameNoWhich stack to diagnose. Omitted = the default stack in ~/.clawops/config.json

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.1.3
    • addedInput schema / properties / stackName / description
      Added value: +"Which stack to diagnose. Omitted = the default stack in ~/.clawops/config.json"
  2. First observedv2.1.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is established. The description adds meaningful behavioral detail by listing the internal steps and the output format, showing that the tool reads logs and service status rather than mutating state. It does not explain partial-failure behavior or permission requirements, but this is not a major gap given the annotations.

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 description is compact and front-loaded: the core purpose and internal workflow come first, followed by crisp use and do-not-use conditions. Every sentence contributes; there is no filler or redundant restating of the tool name.

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 tool with one optional parameter and no output schema, the description covers the essential context: when to trigger it, what steps it performs, what it returns, and when to avoid it. The only remaining parameter detail is already captured by the schema.

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 schema covers 100% of the parameter documentation: stackName is described as 'Which stack to diagnose' with a clear default behavior. The description adds no parameter-specific detail beyond the context of diagnosing a stack, so the baseline of 3 is appropriate.

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 identifies the tool as a diagnostic workflow for an unhealthy stack and details its internal pipeline: status check, gateway logs, agent logs, systemd service status, then a structured diagnostic report with remediation. This multi-step framing distinguishes it from simpler sibling tools like clawops_status or clawops_logs_tail, so the agent knows this is a diagnostic entry point, not a single-status command.

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 description gives explicit 'Use when' and 'Do NOT use when' conditions: it is the best entry point when a 'not working' symptom is reported without a known cause, and it should not be used when a specific fix is already requested. It stops just short of naming the alternative sibling tools that would handle those specific cases, so it provides clear context but not complete routing.

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