Skip to main content
Glama

Remove a menu item

wp_delete_menu_item
Destructive

Remove one item from a navigation menu by its item_id; the linked post or page itself is not touched. Sub-items of the removed item are not removed: they keep it as their parent, and WordPress usually shows them at the menu's top level. Returns deleted and item_id. An id that is not a menu item is refused, so a repeated call changes nothing. Needs edit_theme_options. Permanent: the item is deleted, not trashed, and no undo point is recorded. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
item_idYesMenu item id, as wp_get_menu returns it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / item_id / description
      Added value: +"Menu item id, as wp_get_menu returns it."
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the operation is permanent (deleted, not trashed, no undo point), the required capability edit_theme_options, what happens to sub-items (retained as children, usually surfaced at top level), the return payload (deleted and item_id), and the error behavior for non-menu-item ids. The 'repeated call changes nothing' remark is about the refused retry rather than a claim of true idempotency, so it does not contradict idempotentHint=false.

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 verb, resource and the key non-destructive-to-content caveat are front-loaded, and each following sentence carries a distinct fact (sub-item behavior, return value, error case, permission, permanence). No filler or restatement of the name.

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 one-parameter destructive mutation with no output schema, everything an agent needs is present: the confirmation of permanence, the capability required, the side effect on child items, the refusal behavior, and the returned fields. Nothing material is left for the agent to infer.

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%, so the single item_id parameter and its wp_get_menu provenance are already documented. The description adds only behavioral meaning (an id that is not a menu item is refused) rather than new syntactic guidance, so the baseline 3 applies.

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 ('Remove one item from a navigation menu by its item_id') and immediately bounds the scope with 'the linked post or page itself is not touched', which separates it from wp_delete_post and wp_delete_widget. An agent can pick this tool without opening any schema.

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?

The 'not touched' clause and the orphaned-sub-item note give clear situational context, and the invalid-id refusal tells the agent how repeats behave. It stops short of explicitly naming an alternative (e.g. edit the menu via wp_get_menu first), so it is clear context rather than full routing guidance.

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