Create a navigation menu
create_menuCreate an empty WordPress navigation menu, optionally assign it to theme locations, and enable auto-add for new top-level pages.
Instructions
Create an empty navigation menu, optionally assigning it to one or more theme locations. Add entries afterwards with add_menu_item.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "create_menu"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Menu name shown in wp-admin. | |
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| auto_add | No | Automatically add new top-level pages to this menu. | |
| locations | No | Theme location slugs to assign it to, e.g. ["primary"]. See list_menus for what the theme registers. | |
| description | No | Longer descriptive text. |