Skip to main content
Glama

Reorder menu items

reorder_menu_items

Reorder WordPress menu items in bulk, setting order and parent nesting at once to avoid error-prone individual updates.

Instructions

Set the order and nesting of several menu items at once, which is far less error-prone than updating them one by one.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesThe desired arrangement.
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.
Behavior3/5

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

Annotations already cover the read-only and destructive hints (readOnlyHint=false, destructiveHint=false), so the description carries a lighter burden. It adds the concepts of 'order' and 'nesting' which clarify the scope of the mutation. However, it does not explain side effects (e.g., what happens to items not listed, whether the operation is atomic, or how invalid parent/order values are handled). The description provides minimal additional behavioral context beyond the annotations.

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 sentence that states the core function and a key benefit. It is front-loaded with the action and avoids redundancy. Every word contributes to understanding the purpose. No unnecessary details or filler, making it appropriately concise.

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

Completeness2/5

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

The description is incomplete for a mutation tool. It does not mention any return value or success indication. More critically, the tool operates on menu items but lacks a menu identifier parameter. There is no clarification on whether this reorders items within a specific menu or across all menus, nor whether it replaces the entire order or only affects the provided items. This ambiguity is significant and could lead to incorrect usage. The description does not address these gaps, so it is not complete enough for an agent to confidently invoke it.

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 description coverage is 100%, so the baseline is 3. The tool description does not add any parameter-level detail; it only refers to the overall action. The schema properties like menu_order ('Position; lower comes first') and parent ('Parent item ID, or 0 for top level') are adequately described, but the items array description ('The desired arrangement.') is vague. The description does not compensate for this vagueness, nor does it clarify the relationship between the items and the menu context. Thus, it stays at baseline.

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: 'Set the order and nesting of several menu items at once'. It specifies the resource (menu items) and the operation (reorder/nest), and explicitly contrasts with 'updating them one by one', which distinguishes it from the sibling tool update_menu_item. This leaves no doubt about what the tool does and how it differs from alternatives.

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 description implies when to use this tool: when you need to set order and nesting for multiple items at once, as it is 'far less error-prone than updating them one by one'. This indirectly points to the alternative (likely update_menu_item for single items), but doesn't explicitly name it or state when not to use it. The guidance is clear enough for most cases but lacks an explicit conditional rule.

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

Install Server

Other Tools

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/alokemajumder/wpxmcp'

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