Skip to main content
Glama

add_redirect

Add an HTTP redirect rule to a site.

Requires: API key with write scope.

Args: slug: Site identifier source_path: Path to redirect, must start with "/" (e.g. "/old-page") target_url: Destination URL redirect_type: 301 (permanent, default) or 302 (temporary)

Returns: {"id", "source_path", "target_url", "redirect_type"}

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": {
      "slug": "<slug>",
      "source_path": "<source_path>",
      "target_url": "<target_url>"
    },
    "name": "add_redirect"
  }
}

Input Schema

NameRequiredDescriptionDefault
slugYes
target_urlYes
source_pathYes
redirect_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the transparency burden. It discloses the auth requirement (write scope), constrains source_path to start with '/', explains redirect_type options and default, and shows the return shape. It doesn't mention potential conflicts or error behavior, but the provided context is solid for a simple add operation.

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 concise and well-structured: a one-line summary, a prerequisite line, a compact args list, and a return shape line. Every sentence provides useful information without redundancy.

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?

The tool has four parameters, no output schema, and no annotations, but the description covers the required parameters, the default redirect type, the return structure, and an auth prerequisite. It could be more complete by stating behavior when the source_path already has a redirect, but for a simple creation tool it is largely complete.

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

Parameters5/5

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

The schema has no descriptions, but the description's 'Args' section adds rich meaning: slug is identified as a site identifier, source_path is shown with a leading '/' and an example, target_url is described as the destination, and redirect_type is explained with values and default. This fully compensates for the 0% schema description coverage.

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?

The description clearly states a specific action: 'Add an HTTP redirect rule to a site.' It identifies the resource (site) and the operation (add HTTP redirect), which distinguishes it from sibling tools like delete_redirect and list_redirects.

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 notes a prerequisite ('Requires: API key with write scope') and outlines parameters, but it does not explicitly state when to use this tool over alternatives (e.g., delete_redirect, list_redirects). The intended usage is implied by the action verb, but no explicit when/when-not guidance is provided.

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.