createMenuItem
Add a new navigation link to an existing menu. Specify parent menu, display text, URL, and position; use master ID 0 for top-level or parent item ID for nested placement.
Instructions
Create a menu item - Create a new menuitem record. Writes live data.
Use when: adding a nav link to an existing menu. Parent menu_id must exist. For nested items pass master_id=<parent menu_item_id>; for top-level pass 0. menu_order determines display position (lower = earlier).
Required: menu_id, menu_name, menu_link, master_id, menu_order.
Enums: menu_active: 0=Inactive, 1=Active.
Parameter interactions:
menu_id- parent menu container (fromcreateMenuorlistMenus)master_id-0for top-level items; for nested items, the ID of the parent menu itemmenu_order- display position within the parent menu (integer, lower = earlier)menu_target:_blank(new tab) or_self(same window)
See also: updateMenuItem (modify existing).
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>",
"menu_name": "<menu_name>",
"menu_link": "<menu_link>",
"master_id": "<master_id>",
"menu_order": "<menu_order>"
},
"name": "createMenuItem"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| menu_id | Yes | Parent menu ID | |
| master_id | Yes | 0 for top-level, parent item ID for sub-items | |
| menu_icon | No | ||
| menu_link | Yes | URL or path | |
| menu_name | Yes | Display text — the visible menu link label. Supports `[widget=Name]` shortcodes. | |
| menu_class | No | ||
| menu_order | Yes | ||
| menu_active | No | ||
| menu_target | No |