Update Navigation Menu
wp_update_menuRename a WordPress menu or change its assigned theme locations. Provide menu ID, optional new name, and/or new location list to update.
Instructions
Rename a menu and/or change its theme-location assignments. Requires admin.
Args:
menu_id (number): Menu to update.
name (string): Optional new name.
locations (string[]): Optional new location list (replaces existing).
response_format (enum): markdown | json.
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": {
"menu_id": "<menu_id>"
},
"name": "wp_update_menu"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New menu name. | |
| menu_id | Yes | Menu ID to update. | |
| locations | No | Replace the menu's theme-location assignments. | |
| response_format | No | Output format: 'markdown' for human-readable, 'json' for machine-readable. | markdown |