Skip to main content
Glama

wp_add_menu_item

Add a page or custom link to a WordPress navigation menu. Specify menu, target, title, and parent; use dry run to preview changes before applying.

Instructions

Add one item to a navigation menu (a site page, or a custom link).

menu is a menu id, or its EXACT name or slug (from wp_list_menus) - a reference matching 0 or 2+ menus is refused and lists the available menus. Pass exactly one target: page_id (from wp_find_page / wp_get_content) for a page on the site, or url for a custom link. parent is the id of the menu item to nest under (0 = top level); position is the item's menu_order (omit to append at the end). DEFAULTS TO dry_run=true (returns a preview; writes nothing). Pass dry_run=false to apply - the add is verified by reading the menu back. Requires the REST transport. Prod writes require allow_prod=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo
menuYes
titleYes
parentNo
dry_runNo
installYes
page_idNo
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?

No annotations are provided, but the description fully discloses key behaviors: dry_run default prevents writes, verification is done by reading the menu back, prod writes require allow_prod=true, and ambiguous menu references are refused. This gives the agent a reliable mental model of 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and well-structured, with each sentence adding meaningful detail. It avoids repetitive or vague phrasing and uses clear separations for target, nesting, and safety flags.

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?

The description covers the core action, safety defaults, verification mechanism, and parameter relationships. It does not describe the output/return format, but that is not required by the instructions. The only notable gap is the lack of explicit semantics for 'install' and 'title', which keeps it slightly below a perfect score.

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?

With zero schema-level descriptions, the tool description compensates well by explaining most parameters: menu (id/name/slug and exact match), page_id vs url, parent, position, dry_run, and allow_prod. However, 'install' and 'title' are not explicitly defined, though 'title' is implied by the action and 'install' is likely a shared context parameter.

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 tool's purpose with the verb 'Add' and specifies the resource: a navigation menu item. It distinguishes itself from sibling tools like wp_update_menu_item and wp_remove_menu_item by focusing solely on adding a new 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?

The description gives strong usage guidance by explaining when the tool writes (dry_run=false) and when it only previews (default dry_run=true), as well as the prod safety requirement. It could be slightly more explicit in contrasting with update/remove tools, but the intent is clear.

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