Skip to main content
Glama

caddy_load

DestructiveIdempotent

Replace the entire Caddy configuration atomically with a JSON object or Caddyfile string. Requires confirm=true to discard the running config; a snapshot is saved for rollback via caddy_revert.

Instructions

Replace the entire Caddy configuration atomically. Accepts a JSON config object, or a Caddyfile string with format='caddyfile'. This is the safest way to make large config changes. Runs on CADDY_LOAD_TIMEOUT (55 s by default), like every config change; a load that times out is not retried and may still apply, so re-read the config before loading again. Requires confirm=true: this DISCARDS the entire running config, including servers and routes not present in the supplied config. The prior config is snapshotted first and can be restored with caddy_revert.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configYesFull config — JSON object or Caddyfile text string
formatNoConfig format: 'json' (default) or 'caddyfile'json
confirmNoMust be true to replace the running configuration (safety)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.2.0

TDQS

A4.4/5.0
Behavior5/5

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

Despite strong annotations (destructiveHint=true, idempotentHint=true), the description adds substantial extra context: atomic replacement, disposal of the entire running config, snapshot and revert via caddy_revert, and the non-retry/may-still-apply behavior on timeout. It explicitly states confirm=true is required and clarifies the destructive impact. This goes far beyond the annotations and is directly actionable.

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 three sentences, progressively delivering the core action, safety/timeout details, and the confirm requirement. It is front-loaded with the primary purpose and contains no filler. Every clause contributes critical information, making it highly concise and well-structured.

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?

For a destructive, full-config replacement tool, the description covers the essential elements: action, accepted formats, timeout behavior, confirm requirement, and revert path. It omits explicit output/return information, but there is no output schema, and the caution to re-read config implies the operation's effects may not be immediately visible. This is sufficient for an agent to invoke it correctly.

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?

Schema coverage is 100% with descriptions for all three parameters. The description mostly mirrors the schema for config and format, and for confirm it reiterates the safety requirement without adding new parameter-level meaning. The added value lies in behavioral context (timeout, discard) rather than parameter semantics, so baseline 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 begins with a specific action: 'Replace the entire Caddy configuration atomically.' It clearly identifies the resource (entire Caddy configuration) and the verb (replace). The mention of atomicity and acceptance of JSON or Caddyfile distinguishes it from sibling tools like caddy_config_set (incremental changes) and caddy_add_route (route-specific).

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 states it is 'the safest way to make large config changes,' giving clear context for when to use it. However, it does not explicitly mention alternatives or exclusion criteria (e.g., 'for incremental changes, use caddy_config_set'). It does provide related caution about timeout and re-reading config, which supports proper usage.

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