Create Menu
Creates a new, empty classic menu, and optionally shows it in a theme location straight away (replacing whatever menu was there, which is kept). Menu names must be unique; a name already in use is refused with the existing menu's ID. On a block theme classic menus are not displayed, so use mosmcp/navigation-list instead there. Next, add items with mosmcp/menu-add-item.
Also known as: new menu, make a menu, add a menu, create navigation menu, create footer menu.
| Property | Value |
|---|---|
| Ability slug | mosmcp/menu-create |
| Wire tool name | mosmcp__menu-create |
| Category | Menus & Navigation (mosmcp-menus) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | edit_theme_options |
| Minimum default role | Administrator (Shop manager too when WooCommerce is active) |
| Annotations | readOnly: false · destructive: false · idempotent: false · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | Yes | — | Menu name, for example "Main Menu". |
| location | string | — | Optional. Theme location to show the menu in, by slug or label as mosmcp/menu-list reports them. | |
| description | string | — | ||
| auto_add_pages | boolean | false |
Add every newly published top-level page to this menu automatically. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| menu | object | Yes | |
| menu.menu_id | integer | Yes | Menu ID, accepted wherever a menu is asked for. |
| menu.name | string | Yes | |
| menu.slug | string | ||
| menu.description | string | ||
| menu.item_count | integer | Published items in the menu. | |
| menu.locations | string[] | Theme locations this menu is assigned to. Empty means the theme does not display it anywhere. | |
| menu.auto_add_pages | boolean | Whether WordPress adds every newly published top-level page to this menu automatically. | |
| location | string | Location the menu was assigned to, empty when none. | |
| replaced_menu_id | integer | Menu that location showed before, 0 when none. That menu still exists. | |
| replaced_menu_name | string | ||
| warnings | object[] | Non-fatal issues encountered while running. | |
| warnings[].code | string | ||
| warnings[].message | string | ||
| warnings[].context | string | ||
| notes | string[] |
| << Previous | Next >> |
|---|---|
| Assign Menu to Location | Delete Menu |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.