Skip to main content
Glama

Update a menu item

update_menu_item

Update a WordPress menu item's label, URL, target, CSS classes, description, or position. Move it to another menu or change its nesting level.

Instructions

Change a menu item's label, target, nesting or position.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe menu item ID.
urlNoNew target URL.
menusNoMove the item to a different menu.
titleNoNew link label.
parentNoSet to 0 to move it back to the top level.
targetNo_blank opens in a new tab.
classesNoReplaces the item's CSS classes.
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
menu_orderNoNew position; lower numbers come first.
descriptionNoItem description, shown by themes that support it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / id / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / menu_order / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / menu_order / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / menus / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / menus / minimum
      Added value: +-9007199254740991
    • addedInput schema / properties / parent / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / parent / minimum
      Added value: +-9007199254740991
  2. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

The description aligns with annotations (readOnlyHint=false, destructiveHint=false) and adds no contradiction. However, it also adds no extra behavioral context such as authentication needs, rate limits, or how partial updates work. Since annotations already carry the safety profile, the description contributes minimal additional insight.

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 a single, efficient sentence that front-loads the core purpose and lists the key modifiable fields. There is zero redundancy and every word serves a function, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is minimally adequate for a simple mutation tool, but it leaves out details such as whether only provided fields are updated, the effect of setting parent to 0, or expected return behavior. With 10 optional parameters and no output schema, a bit more contextual guidance would improve completeness, though the schema covers parameter semantics.

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 100% with each parameter described in the input schema. The tool description itself adds no parameter-specific meaning beyond the schema, so it doesn't compensate for any missing documentation. The baseline of 3 is appropriate.

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 verb 'change' applied to 'a menu item' and enumerates the specific aspects (label, target, nesting, position). This distinguishes it from siblings like add_menu_item (creation), delete_menu_item (deletion), and reorder_menu_items (ordering only), leaving no ambiguity about its role.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, conditions that favor update_menu_item over add_menu_item, or when not to use it. The usage is implied but never stated.

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

Deploy Server

Other Tools