Skip to main content
Glama

caddy_config_set

Set Caddy config values at a JSON path using overwrite (PATCH), append (POST), or insert (PUT) for precise control over routes and server settings.

Instructions

Write config at a JSON path. Mode 'overwrite' (default) replaces existing values (PATCH) — safe and idempotent. Mode 'append' adds to arrays or creates keys (POST) — NOT idempotent: calling twice with the same route duplicates it. Mode 'insert' places at a specific array index (PUT) — useful for route ordering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo'overwrite' = PATCH (replace existing, default, idempotent), 'append' = POST (add to arrays / create keys, NOT idempotent), 'insert' = PUT (insert at array index)overwrite
pathYesConfig path to write to (e.g., 'apps/http/servers/srv0/routes')
valueYesThe JSON value to set at the path
Behavior5/5

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

The description goes far beyond the sparse annotations by detailing HTTP semantics (PATCH/POST/PUT), idempotency per mode, and side effects like route duplication on repeated 'append' calls. It also highlights the 'insert' mode's utility for ordering. This fully discloses behavioral traits and potential pitfalls.

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 (two sentences) and front-loaded with the core purpose before detailing modes. Each mode is explained with relevant consequences, and there is no redundant or filler content.

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?

The description covers the tool's behavior comprehensively: modes, idempotency, side effects, and ordering use-case. It doesn't mention return values, but the absence of an output schema makes that less critical. Given the complexity of the tool (three modes with different behaviors), this description is nearly complete.

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 100%, so the parameters are already well-documented. The description adds value by explaining the mode-specific behaviors (idempotency, side effects) that the schema enum descriptions only hint at. It does not add much for 'path' or 'value', but the schema already provides examples and definitions.

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 states the tool's purpose: 'Write config at a JSON path.' It specifies the resource (config), the action (write), and the path-based scope. This distinguishes it from sibling tools like caddy_config_get or caddy_config_delete.

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 clear context for when to use each mode: 'overwrite' for safe/idempotent replacement, 'append' for adding to arrays (with warning about duplication), and 'insert' for route ordering. It doesn't explicitly mention alternatives to the tool itself, but the mode guidance is strong and context-rich.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YawLabs/caddy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server