Skip to main content
Glama

set_config_value

Destructive

Write a Caddy config subtree at a path, preview the change with dry-run, and undo by restoring the prior subtree.

Instructions

[WRITE][risk=medium] Set a caddy config subtree (e.g. a route's upstreams); reversible — the prior subtree is fetched first and the undo restores it.

Caddy applies the change immediately. On traefik/haproxy this raises the support matrix's teaching error. Pass dry_run=True to preview.

Refuses the 'admin' subtree: that configures the admin API this tool speaks to, so disabling or moving it would end the connection the undo needs. Change the admin block in caddy's own config file and reload locally. The refusal applies under dry_run too — a preview whose real call would be refused must report that, not a green 'wouldSet'.

Args: path: Slash-separated config path (from search_config / list_routes, e.g. apps/http/servers/srv0/routes/0/handle/0/upstreams). value: The JSON value to write at that path. insert: Insert into an array at that index instead of replacing. This is what re-creating a deleted array element requires — Caddy rejects a create at an index past the (now shorter) array. dry_run: If True, preview without changing. target: Proxy target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
pathYes
valueYes
insertNo
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • addedInput schema / properties / insert
      Added value: +{
      +  "default": false,
      +  "title": "Insert",
      +  "type": "boolean"
      +}
  2. First observedv0.6.0

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds the annotations (readOnlyHint=false, idempotentHint=false, destructiveHint=true): it discloses reversibility mechanics (prior subtree fetched, undo restores), immediate application, medium risk, the admin-subtree refusal with its rationale, and that the refusal also applies under dry_run. This is unusually rich behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with [WRITE][risk] tags and behavior before the Args block, and every sentence carries information. It is on the verbose side for a config setter, but no sentence is filler.

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?

With no output schema, the description supplies most of what an agent needs, including hints about the return shape ('a green wouldSet'), refusal reporting, and preview behavior. Minor gap: it doesn't fully describe the success/response payload, but annotations plus prose cover the essentials.

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?

Schema coverage is 0%, so the description carries the full burden and does so: it documents path format with an example, the insert flag's array-index semantics (including why it's needed when re-creating a deleted element), dry_run preview, and target omission defaulting. All five params gain meaning beyond the bare 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?

States a specific verb+resource ('Set a caddy config subtree') and scopes it with an example (a route's upstreams), plus the [WRITE][risk=medium] tag. An agent can immediately distinguish this from get_config_value, delete_config_path, and config_snapshot.

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?

Gives clear context: use for setting subtrees, preview via dry_run=True, unsupported on traefik/haproxy (teaches via matrix error), and points to search_config/list_routes for sourcing the path. It does not explicitly compare itself against delete_config_path or the undo_* siblings, so routing guidance is strong but not exhaustive.

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