Skip to main content
Glama

wp_set_page_slug

Idempotent

Change a page's permalink slug (the URL segment). This is the ONLY way to change a permalink: the slug lives on the post row (post_name), NOT in the Elementor builder data, so wp_patch_page and wp_update_page cannot touch it and no metadata edit makes WordPress regenerate it. Requires writes enabled, and Xyle Connector v0.5.0+ on plugin-connected sites. Note WordPress appends -2 on a collision — the response reports the slug it actually applied.

Input Schema

NameRequiredDescriptionDefault
slugYesLowercase letters, digits and hyphens, e.g. 'urologist-digital-marketing'
post_idYesThe page/post ID
site_idYesThe WordPress site ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With annotations covering safety (readOnlyHint false, idempotent, non-destructive), the description still adds substantive context: write-mode prerequisite, minimum connector version, and the collision behavior where WordPress appends '-2' and the response reports the slug actually applied. That last point is real behavioral disclosure an agent needs.

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?

Front-loads the action and scope, then the sibling-exclusion rationale, then prerequisites and the collision caveat. No filler sentences; each clause carries distinct information.

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?

Prerequisites, alternative-tool exclusions, and the collision/response behavior are all covered, which is sufficient for a 3-param, no-output-schema mutation. The description even compensates for the absent output schema by stating what the response reports.

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

Parameters4/5

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

Schema coverage is 100%, so the three parameters are already documented, including the slug format example. The description adds genuine semantic value by locating the slug on the post row (post_name) rather than Elementor data, which explains why post_id is the correct target — but it adds no format or edge-case detail 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 ('Change a page's permalink slug') and immediately defines the resource for agents unfamiliar with WordPress ('the URL segment'). It also distinguishes itself from wp_patch_page and wp_update_page by explaining the slug lives on post_name, not in builder data.

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?

Explicitly claims exclusivity ('the ONLY way to change a permalink') and names the sibling tools that cannot do it, plus states prerequisites: writes enabled and Xyle Connector v0.5.0+ on plugin-connected sites. An agent has everything needed to choose this over alternatives.

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.

Resources