Skip to main content
Glama

caddy_revert

Destructive

Restore previous Caddy config snapshots to undo changes. List, save, or apply snapshots to roll back after a bad config update.

Instructions

Manage config snapshots for rollback. Snapshots are auto-captured before caddy_load, and before a caddy_config_delete or caddy_config_set at the config root (any path that addresses the whole config), and before a caddy_config_by_id set or delete whose @id resolves to the root with no subpath (or a lone '...'); no other delete or set is snapshotted. Last 10. By default they live in memory only and are LOST when this server restarts -- set CADDY_MCP_SNAPSHOT_DIR to a writable directory to persist them across restarts (they contain full Caddy configs, so pick the location deliberately). Actions: 'list' shows snapshots with timestamps, 'save' manually captures the current config, 'apply' restores a snapshot (requires confirm=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoSnapshot index for 'apply' (0 = most recent, default)
actionYesAction to perform
confirmNoMust be true to actually apply a snapshot (safety)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A5/5.0
Behavior5/5

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

The annotations only declare destructiveHint=true, but the description adds crucial behavioral context: snapshots retain only the last 10, are memory-only by default and lost on restart, contain full Caddy configs, and apply requires confirm=true. This substantially exceeds what annotations alone communicate and helps the agent avoid destructive mistakes.

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 dense but every sentence earns its place, covering auto-capture rules, retention, persistence, safety, and the action enum. It front-loads the primary purpose before diving into edge-case behavior, making it scannable for an agent.

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 destructive tool with three parameters and no output schema, the description covers the full behavioral contract: what is snapshotted, retention limits, persistence options, safety confirmation, and how each action behaves. Nothing critical for correct invocation is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema already describes all three parameters, the description enriches them: it defines what each action does, states that index 0 means most recent, and clarifies that confirm=true is a mandatory safety gate for apply. This adds real decision-making value beyond the raw schema.

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 opens with a clear verb-resource pairing, 'Manage config snapshots for rollback,' and immediately distinguishes this tool from the config-mutation siblings by focusing on snapshot lifecycle. It then enumerates the exact actions (list, save, apply), removing any ambiguity about what the tool does.

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?

It explicitly states when snapshots are auto-captured, when they are not ('no other delete or set is snapshotted'), and how to manually invoke each action. It also gives an operational guideline for persistence via CADDY_MCP_SNAPSHOT_DIR, which is exactly the kind of conditional usage an agent needs.

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