Skip to main content
Glama

switch_file_redirects

DestructiveIdempotent

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

Input Schema

NameRequiredDescriptionDefault
siteIdYesThe site ID (from `list_sites`).
enabledYesFalse to stop the file rules, true to apply them again.
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.
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.4/5.0
Behavior5/5

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

Goes well beyond the destructive/idempotent annotations by explaining the exact blast radius (only file rules, user rules unaffected), the duration (until re-enabled or next deploy), propagation time (~5 minutes), and a specific error (`NoFileRules`). It also adds a confirmation safeguard for the destructive direction.

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-loads the action and scope, then adds duration, propagation, error behavior, and confirmation guidance. Dense but mostly purposeful; a few clauses could be tightened, but there is no significant waste.

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 toggle with no output schema, the description supplies enough context to call it safely: effect scope, reversibility, timing, error handling, and confirmation requirement are all covered.

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 all parameters including `enabled`, `partition`, and `conversation_id` are already documented in the input schema. The description reinforces the enabled/disabled semantics but does not add parameter-level meaning beyond the schema.

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: switching the live deploy's `_redirects` rules off or back on without a deploy. The scoping phrase 'User rules keep applying either way' makes clear this is not the same as editing or setting redirect rules.

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 usage example ('when a deployed file sends visitors to the wrong place') and requires confirmation before switching off. However, it does not explicitly route the agent to `edit_redirects` or `set_redirects` when actual rule changes are needed.

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.