Skip to main content
Glama

wp_update_menu_item

Update an existing WordPress menu item by renaming, moving, re-nesting, or retargeting it. Preview changes with dry-run before applying.

Instructions

Change one existing menu item: rename it, move it, re-nest it, or retarget it.

item_id is the menu ITEM id (from wp_list_menus -> the menu's items), not a page id. Only the arguments you pass are changed - omit the rest and they are left alone; passing none at all is refused rather than reported as a no-op success. position is the item's menu_order (0 = first) and parent the id of the item to nest under (0 = top level); url retargets a custom link (use wp_remove_menu_item

  • wp_add_menu_item to repoint an item at a different page). DEFAULTS TO dry_run=true (returns a preview of the exact fields; writes nothing). Pass dry_run=false to apply. Requires the REST transport. Prod writes require allow_prod=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
titleNo
parentNo
dry_runNo
installYes
item_idYes
positionNo
allow_prodNo

Schema Changelog

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

  1. First observedv1.4.0

TDQS

A4.6/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. It discloses the dry_run default with its preview behavior, the need for allow_prod for production writes, the REST transport requirement, and the outcome of passing no parameters. These are significant behavioral details that help the agent anticipate side effects.

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 organized into three clear sentences with inline code formatting for parameters. While it is somewhat dense, it avoids unnecessary verbosity and presents all critical information in a scannable way.

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 mutation tool, it covers important context: the dry-run safety default, production-write flag, transport requirement, and parameter-specific notes (position, parent, url). It also clarifies the item_id distinction. No output schema exists, but the description indicates what dry-run returns (a preview), which is sufficient.

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?

The description explains several parameters that lack schema descriptions: item_id (clarifying it is the menu item id, not page id), position (menu_order, 0=first), parent (nesting under an item id), url (retargets a custom link), dry_run, and allow_prod. However, 'install' and 'title' are not explicitly explained, though their names are suggestive. Overall, it compensates well for the 0% schema coverage but not completely.

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 the action ('Change one existing menu item') and enumerates specific transformations (rename, move, re-nest, retarget), which distinguishes it from sibling tools like wp_add_menu_item and wp_remove_menu_item.

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 provides helpful guidance on when to use the tool (for existing items), explains behavior when no parameters are passed ('refused rather than reported as a no-op success'), and outlines prerequisites like the REST transport and allow_prod requirement. However, it does not explicitly contrast with add/remove tools, though the 'existing item' phrasing implies the distinction.

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