Skip to main content
Glama

Routing rules

routing
DestructiveIdempotent

For reading use routing_read, which is read-only and needs no approval: "get", "check" here are deprecated (still works). The project's routing.json, applied by the platform in front of the app (in preview now; production gets it with the code when published). action "get": the file and whether it is in force. action "check": what a visitor with no password gets at path (env, default preview; or host, another address under the site domain such as an old slug's), asked from outside through the routing, since http_get and http_request skip it; with username and password, whether that sign-in gets in. action "set": replace the whole file with routing (an object; {} removes every rule). Keys: redirects, rewrites (to a path, optionally on another service from services.json), headers (response headers), cors, auth (username + password for paths; the password is hashed and never shown; omit it to keep an existing rule's, or on a new rule to let the owner choose it in the portal, which is better than choosing one for them), allow_ips, allow_countries (ISO codes, from Cloudflare), error_pages (status or "4xx"/"5xx" → a path the app serves, shown to browsers). Sources are paths with :name for one segment and :name* for the rest. Example: {"redirects":[{"source":"/old/:path*","destination":"/new/:path*","permanent":true}], "rewrites":[{"source":"/api/:path*","destination":"/:path*","service":"api"}], "headers":[{"source":"/assets/:path*","headers":{"Cache-Control":"public, max-age=31536000, immutable"}}], "cors":[{"source":"/api/:path*","origins":["https://example.com"],"methods":["GET","POST"],"headers":["Content-Type"]}], "auth":[{"source":"/admin/:path*","username":"admin","password":"at least 8 characters"}], "allow_ips":["203.0.113.0/24"],"allow_countries":["DE","NL"],"error_pages":{"404":"/404.html","5xx":"/500.html"}}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>",
      "action": "<action>"
    },
    "name": "routing"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNocheck: default preview.
hostNocheck: ask another address under the platform's site domain instead, e.g. the old <slug>.lazyfrog.app after a slug rename: a redirect says where it goes, with path and query.
pathNocheck: the path to ask for, e.g. "/staff".
actionYes
projectYesProject slug or id.
routingNoset: the whole routing.json.
passwordNocheck: a test password you set yourself; never ask the owner for theirs. It isn't kept.
usernameNocheck: try a sign-in with this username and password through the public address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, it discloses that set replaces the whole file and that {} removes every rule, explains preview versus production application, describes password hashing and omission behavior, and clarifies how check differs from direct HTTP tools. This is unusually rich behavioral context for a destructive mutation tool.

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

Conciseness3/5

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

The description contains useful detail but is a dense single paragraph that opens with deprecation guidance instead of the tool's purpose. The long example earns its place, but the prose is not well structured and some statements are awkward or redundant.

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 complex routing tool with eight parameters, a nested object, and no output schema, the description covers actions, routing structure, deployment context, and check behavior well. It stops short of documenting error behavior or approval requirements for destructive set operations.

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 already high at 88%, but the description still adds substantial meaning, especially for the routing object, its supported keys, source patterns, and the example payload. It also clarifies the check semantics for host, path, username, and password.

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 definition makes clear that this tool operates on the project's routing.json and supports get, check, and set actions. It explicitly distinguishes itself from routing_read, but the opening deprecation sentence muddies the primary purpose rather than front-loading it.

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?

It explicitly directs reading use to routing_read and explains that check is needed because http_get and http_request bypass the routing layer. The deprecation of get/check while still describing them in detail leaves some ambiguity, and it does not explicitly state approval or authorization requirements for set.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources