Skip to main content
Glama

wp_set_menu_items

Set a menu's items. items = JSON array of objects: {title, url?, type?:custom|page|post, object_id?, parent_index?}. Build DROPDOWNS with parent_index (0-based index into this list of the parent item). type='page' with object_id links to a page. replace (default true) clears existing items first. Writes-gated, Xyle Connector v0.6.0+.

Input Schema

NameRequiredDescriptionDefault
itemsYesJSON array of {title, url?, type?, object_id?, parent_index?}
menu_idYesThe menu id (from wp_create_menu / wp_list_menus)
replaceNoClear existing items first (default true)
site_idYesThe WordPress site ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Adds real context the annotations don't carry: the tool is writes-gated (requires writes to be enabled) and requires Xyle Connector v0.6.0+. It also discloses that replace defaults to true and clears existing items first, which is important behavioral information for a write tool. It does not describe the response or error behavior.

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?

Front-loaded with the core action, then the JSON shape, then the dropdown mechanics and the replace default. Dense but each fragment carries information; the only cost is slight shorthand ("DROPDOWNS", "Writes-gated") that assumes product familiarity.

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

Completeness4/5

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

Covers the mutation semantics, the nested items format, the write gate, and the minimum connector version. With no output schema, it stops short of describing what a successful/partial set returns, which is a minor gap for a bulk-write tool.

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 baseline is 3, but the description goes beyond the terse schema text by explaining parent_index (0-based index into this list) for building dropdowns, the custom|page|post type values, and that type='page' pairs with object_id. That is meaningful extra semantics over the schema's one-line summaries.

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 ("Set a menu's items") and immediately scopes it as the items within an existing menu, distinguishing it from wp_create_menu and wp_assign_menu_location. An agent can identify the operation without opening the schema.

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

Usage Guidelines3/5

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

Usage is only implied: it tells you how to build dropdowns and what replace does, but never states when this tool should be chosen over siblings or what prerequisites apply (beyond the write gate). The workflow hint (menu_id comes from wp_create_menu / wp_list_menus) lives in the schema, not the description.

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