Skip to main content
Glama

write_refactor

Rename or move a page and rewrite links that point to it, keeping references valid when link refactoring is enabled.

Instructions

Rename or move a page and rewrite the links that point to it (needs link refactoring on; preview with read_refactor_preview).

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": {
      "page": "<page>",
      "version": "<version>"
    },
    "name": "write_refactor"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageYesPage id or path
slugNoNew slug (rename)
titleNoNew title (rename)
parentNoNew parent id or path (move); "/" for the top level
versionYesversion from your last read of the page
positionNo
rewriteLinksNoDefault true

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4/5.0
Behavior3/5

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

The annotations already declare non-destructive and closed-world behavior. The description adds useful context that links are rewritten and that link refactoring must be enabled, but it does not explain failure behavior, permissions, or what happens when refactoring is disabled.

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 definition is a single, front-loaded sentence with no wasted wording. The core action, prerequisite, and preview alternative are all easy to scan.

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 mutation tool with full annotation coverage and a rich input schema, the description covers the essential action, prerequisite, and preview path. It is slightly incomplete in not distinguishing this tool from other page-move or page-update siblings, but it is sufficient to call 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 high at 86%, so the input schema already documents page, slug, title, parent, version, position, and rewriteLinks. The description only broadly maps rename and move to those parameters and adds no extra syntax, defaults, or constraints 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?

The description states a specific verb and resource: rename or move a page and rewrite inbound links. It also names the preview sibling, so the agent can distinguish this write operation from its read-only counterpart.

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 points to read_refactor_preview for previewing and states the prerequisite that link refactoring must be enabled. It does not clarify when to use this instead of a simpler move or rename sibling such as write_move, leaving some ambiguity.

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