Skip to main content
Glama

switch_file_redirects

DestructiveIdempotent

Turn a live deploy's _redirects file rules off or back on without redeploying, so you can stop incorrect file redirects while user rules keep applying.

Instructions

Switch the live deploy's _redirects rules off, or back on, without a deploy, for example when a deployed file sends visitors to the wrong place. User rules keep applying either way. The switch lasts until it is turned back on or the next deploy goes live. Visitors get the change within about 5 minutes. Answers NoFileRules when the live deploy has no _redirects. Confirm with the user before switching the file rules off.

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>",
      "enabled": "<enabled>"
    },
    "name": "switch_file_redirects"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteIdYesThe site ID (from `list_sites`).
enabledYesFalse to stop the file rules, true to apply them again.
partitionNoData partition the site lives in. Omit to use the user's home partition.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the idempotentHint/destructiveHint annotations: it discloses the switch's lifetime (until re-enabled or the next deploy), propagation delay (~5 minutes), that user rules are unaffected, and the `NoFileRules` response when the deploy has no `_redirects`. This is unusually rich operational context for a destructive toggle.

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 action and scope, then the caveat, then timing and error behavior. Dense but each sentence carries distinct information; the phrasing is slightly run-on but not padded.

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?

No output schema exists, yet the description covers the failure mode (`NoFileRules`), latency, persistence window, and the safety confirmation — everything an agent needs to invoke this destructive toggle correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so siteId, enabled, and partition are already documented in the schema. The description's 'off, or back on' phrasing loosely maps to `enabled` but adds no new syntax or format detail; baseline 3 applies.

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 (switch off/on) and resource (the live deploy's `_redirects` file rules) and scopes it as 'without a deploy.' It also separates file rules from user rules ('User rules keep applying either way'), which is exactly the distinction an agent needs against siblings like edit_redirects or set_redirects.

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 a concrete trigger ('when a deployed file sends visitors to the wrong place') and an explicit safety instruction ('Confirm with the user before switching the file rules off'). It does not name an alternative tool for editing persistent rules, so routing is implied rather than spelled out.

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