wp_create_menu_item
Creates a new custom-link or post/page-backed menu item in a navigation menu. Use post_id for WordPress pages/posts so the menu item keeps proper object metadata.
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": {
"site_id": "<site_id>",
"menu_id": "<menu_id>"
},
"name": "wp_create_menu_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL for a custom-link menu item. Do not use with post_id. | |
| title | No | Display title for the new menu item. | |
| menu_id | Yes | The menu term ID (from wp_list_menus). | |
| post_id | No | Optional WordPress post/page ID for a post-backed menu item. | |
| site_id | Yes | The connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID. | |
| position | No | Optional 1-based menu position. | |
| parent_id | No | Optional parent menu item ID. |