Skip to main content
Glama

wp_change_slug

Rename a URL slug with preview and verification, warning if the old URL will break for pages. Supports dry-run to test before applying.

Instructions

Rename one page/post's URL slug (the old URL usually starts 404ing - read on).

CHECK old_url_redirects IN THE RESULT. WordPress only 301s the old URL for published POSTS; for PAGES (hierarchical, and what most site URLs are) it does not, so the old URL 404s until a redirect is added elsewhere. Both the preview and the result say which case this is, with a warning when the old URL will break.

post_id comes from wp_find_page / wp_get_content. new_slug is sanitized to WP-safe form (lowercase, a-z 0-9 and hyphens; anything else becomes a hyphen) - a value with nothing usable left is refused rather than sent. If the slug is already taken, WP stores a uniquified one (about -> about-2): that still succeeds and comes back with uniquified: true and the ACTUAL slug, so check it. DEFAULTS TO dry_run=true (returns a preview with the current slug; writes nothing). Pass dry_run=false to apply - the rename is verified by reading the post back. Requires the REST transport. Prod writes require allow_prod=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
installYes
post_idYes
new_slugYes
allow_prodNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.4.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure — and it excels. It discloses mutation side effects (old URL 404 behavior), the uniquification behavior for duplicate slugs (still succeeds with `uniquified: true`), sanitization rules, the safe default (dry_run=true), and verification via read-back. No annotation contradiction.

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?

The description is long (11 sentences) but dense with critical operational information for a side-effectful mutation tool. Key warnings are front-loaded (old URL 404s) and emphasized via ALL-CAPS markers (CHECK, DEFAULTS TO). Minor redundancy: sentence 4 partially restates the warning already given in sentences 2-3.

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 complex mutation tool with no output schema, no annotations, 5 parameters, and 0% schema coverage, the description is remarkably complete. It covers side effects, result fields to inspect, parameter semantics, defaults, environment constraints, and verification. Nothing critical is missing for correct invocation.

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?

Schema description coverage is 0%, so the description fully compensates. It explains dry_run's default and effect, where post_id comes from, new_slug's sanitization and refusal behavior, and allow_prod's requirement. Only `install` is left implicit, but it is a common identifier pattern across sibling tools.

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 opening sentence states a specific verb ('Rename'), a precise resource ('one page/post's URL slug'), and immediately flags the key side effect (old URL 404s). This clearly differentiates it from siblings like wp_edit_page (content editing) and wp_find_page (lookup). No ambiguity about what this tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Extremely explicit. It tells the agent to check `old_url_redirects` in the result, explains exactly when the old URL 404s (pages vs. posts), names the source of `post_id` (wp_find_page / wp_get_content), flags the dry_run default, and states environment prerequisites (REST transport, allow_prod for prod). Little is left to inference.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ad02/wp-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server