Skip to main content
Glama

caddy_reverse_proxy

Configure Caddy reverse proxy routes by defining a matching source and upstream targets. Use a stable id to update existing routes idempotently.

Instructions

Add a reverse proxy route. The most common operation — just specify where traffic comes from and where it goes. Example: from='api.local' to=['localhost:3000']. When id is OMITTED the route is appended to the server's routes array — calling the tool twice with the same args produces TWO duplicate routes (non-idempotent). When id is SUPPLIED the route is written via PATCH under that @id, so repeat calls REPLACE in place (idempotent). Strongly recommended: supply a stable id for any route managed from automation or production tooling. Note: @ids are config-global in Caddy (NOT route-scoped). If id collides with an @id used by a non-route object (TLS issuer, server, etc.) the call refuses with an error rather than clobbering it. Once an @id is registered to a route under one server, subsequent calls update that route in place regardless of the server argument.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoOptional stable @id for the route. When set, repeat calls REPLACE the route in place (idempotent). When omitted, the route is APPENDED — calling twice with identical args creates a duplicate route. @ids are config-global in Caddy: if this id is already used by a non-route object the call refuses rather than clobbering it.
toYesUpstream addresses (e.g., ['localhost:3000', 'localhost:3001'])
fromYesDomain, path, or domain/path to match (e.g., 'api.local', '/api/*', 'app.local/ws')
serverNoCaddy server name (default: srv0)srv0
Behavior5/5

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

The description thoroughly discloses behavioral traits beyond the annotations: it explains non-idempotent behavior when id is omitted, idempotent replacement when id is supplied, global @id collision refusal, and that the server argument is ignored once an @id is registered. This is far richer than the sparse annotations and significantly helps an agent predict runtime behavior.

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 moderately lengthy but every sentence serves a purpose: it states the core function, gives an example, explains idempotency conditions, warns about global ids, and notes a subtle server argument behavior. The structure is logical and front-loaded with the main purpose, making it easy to scan.

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?

Given the tool's complexity and the lack of an output schema, the description covers the essential behavioral context: how to add a route, what happens with or without an id, and edge cases like id collisions. It does not describe return values or error responses, but for a config-mutation tool this is a minor omission when the operational behavior is so well explained.

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?

The input schema already covers all parameters (100% coverage), but the description adds meaning by providing a concrete example for 'from' and 'to' and clarifying the nuanced behavior around 'id' (idempotency, global scope) and 'server' (ignored after initial registration). This goes beyond the schema descriptions, earning above the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Add a reverse proxy route' with a concrete example, making the tool's function unambiguous. However, it does not explicitly distinguish itself from sibling tools like caddy_add_route, instead relying on the phrase 'The most common operation' to imply it is the standard route addition tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides context that this is the 'most common operation' and shows a simple from/to example, implying it is for standard reverse proxy setups. It does not explicitly state when to use this tool versus alternatives such as caddy_add_route or when to prefer a different approach, leaving usage guidance implied rather than explicit.

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