Skip to main content
Glama

edit_redirects

Destructive

Apply a batch of adds, updates and deletes to a site's user redirect rules, in order, as one change: all of them or none. Use this, or set_redirects, for bulk work rather than many single calls. Rule ids come from list_redirects and start with r_. File rules can't be changed here: an operation naming a file rule's line answers FileRule, with the line and the operation's index. Pass the version from list_redirects to refuse the batch if the rules changed since (StaleVersion, with the latest version). One invalid rule refuses the batch with InvalidRules, listing each error by the operation's index. Redirects apply only on the organization's own custom domains (CustomDomainRequired otherwise). Visitors get the change within about 5 minutes.

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": {
      "siteId": "<siteId>",
      "operations": "<operations>",
      "llm_model": "<llm_model>"
    },
    "name": "edit_redirects"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteIdYesThe site ID (from `list_sites`).
versionNoThe `version` the rules were read at, from `list_redirects`. Omit to apply the batch to whatever the latest list is.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.
partitionNoData partition the site lives in. Omit to use the user's home partition.
operationsYesApplied in order, each to the list the ones before it left.
conversation_idNoPass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only supply destructiveHint=true, but the description goes much further: full atomicity semantics, in-order application against the evolving list, version-based optimistic concurrency, named failure modes (FileRule, StaleVersion, InvalidRules, CustomDomainRequired) with the accompanying payloads, and a ~5 minute propagation latency. This is exactly the context an agent needs before committing a destructive batch.

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 the core action and the atomicity guarantee, then layering exclusions and error contracts in rough priority order with no filler sentences. It is a single dense paragraph and would scan faster as short clauses or a bulleted error list, but every sentence carries distinct information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, atomic batch mutation with no output schema, the description covers concurrency control, partial-failure reporting, prerequisite domain configuration, and propagation timing, and refers to list_redirects/list_sites for the inputs it cannot see. An agent has enough to construct a correct call and interpret every documented failure.

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 baseline is 3; the description earns above baseline by explaining provenance and lifecycle for `version` (read it from `list_redirects`, omit to use latest), the `r_` prefix and source of rule `id` (from `list_redirects`), and that `index` in error responses refers to the operation's position. It adds no clarification for `llm_model`, `partition`, or `conversation_id`, which are left to schema text.

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 and resource ("Apply a batch of adds, updates and deletes to a site's user redirect rules") plus two key modifiers: applied "in order" and "as one change: all of them or none". The "user redirect rules" qualifier distinguishes it from the file-rule siblings, and the batching scope separates it from add_redirect/delete_redirect.

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?

Explicitly routes bulk work here or to `set_redirects` instead of many single calls, and states a hard exclusion: "File rules can't be changed here" (pointing at switch_file_redirects behaviorally, though not by name). It does not say when to pick `set_redirects` over this tool, so the two bulk options are presented as interchangeable rather than differentiated.

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.