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
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'overwrite' = PATCH (replace existing, default, idempotent), 'append' = POST (add to arrays / create keys, NOT idempotent), 'insert' = PUT (insert at array index) | overwrite |
| path | Yes | Config path to write to (e.g., 'apps/http/servers/srv0/routes') | |
| value | Yes | The JSON value to set at the path |