Skip to main content
Glama

Create a menu

wp_create_menu

Creates an empty WordPress navigation menu and returns its ID, so you can then add items with a separate tool. Names already used by another menu are refused.

Instructions

Create an empty navigation menu. Returns created and menu_id. A name another menu already has is refused by WordPress. Items are added by wp_add_menu_item; assigning the menu to a theme location is not part of this tool. Needs edit_theme_options.

Input Schema

NameRequiredDescriptionDefault
nameYesMenu name. WordPress sanitises it like a term name (HTML is filtered); backslashes are kept.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses the required capability (edit_theme_options), the WordPress duplicate-name rejection behaviour, and the return shape ('Returns created and menu_id') in the absence of an output schema. The annotations only say this is a non-idempotent, non-destructive write; the description supplies the operational context an agent needs.

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?

Four short sentences, front-loaded with the action and return value, then boundaries, then the auth requirement. Every sentence carries distinct information; nothing is padded.

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?

With no output schema, the description fills the gap by naming the response fields, and it covers auth, error behaviour, and sibling boundaries for a single-parameter mutation tool. Nothing needed to invoke it correctly is missing.

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% and already documents sanitisation, so the baseline is 3. The description adds a validity constraint not present in the schema — that a name already used by another menu is refused — which is meaningful for constructing a call, though it repeats nothing about backslash/HTML handling.

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 ('Create an empty navigation menu') and immediately disambiguates from siblings: item creation belongs to wp_add_menu_item, theme-location assignment is out of scope. An agent can distinguish this from wp_list_menus, wp_get_menu and wp_add_menu_item without opening a schema.

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

Usage Guidelines5/5

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

Explicitly names the alternative tool for adding items (wp_add_menu_item) and an exclusion (theme location assignment is not part of this tool). It leaves no ambiguity about when to call this versus its neighbours.

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

Deploy Server

Other Tools