Skip to main content
Glama

Add Menu Item

wp_add_menu_item

Add an item to a WordPress navigation menu. Supports links to posts, pages, categories, custom URLs, and more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL for custom links (required when type="custom")
typeYesItem type: "post_type" for posts/pages, "taxonomy" for categories/tags, "custom" for URL
titleYesMenu item display title
objectNoObject type: "post", "page", "category", "post_tag" (required for post_type/taxonomy types)
parentNoParent menu item ID for dropdown/sub-menu (0 = top level)
targetNoLink target ("_blank" opens in new tab)
menu_idYesMenu ID to add the item to
site_idNoSite ID to target (optional if you have only one connected site)
object_idNoID of the post/page/term to link to (required for post_type/taxonomy types)
menu_orderNoPosition in menu (0-based)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare write (readOnlyHint=false), non-idempotent, non-destructive, and open-world behavior. The description adds which link types can be created, which is modest value, but says nothing about permissions, ordering side effects, or what happens on failure.

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?

Two tight sentences with the action front-loaded and zero filler. Nothing redundant or padded for a tool whose parameters are fully described elsewhere.

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?

No output schema exists, and the description does not explain what is returned (e.g., new item ID) or how the item interacts with menu_order/parent. With 10 parameters and mutation semantics, it leaves the agent to rely on schema and annotations alone.

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 all ten parameters including the two enums are already documented with descriptions. The description's mention of post/page/category/custom URLs broadly mirrors the "type" enum rather than adding syntax or constraints beyond it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb ("Add") plus resource ("item to a WordPress navigation menu") make the operation immediately clear. It distinguishes itself reasonably from siblings like wp_update_menu and wp_list_menu_items, though it does not explicitly name a contrast.

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?

No guidance on when to use this versus wp_update_menu, wp_list_menu_items, or how to obtain the menu_id it requires. The agent must infer prerequisites and preconditions entirely from the schema.

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