mcp_add_menu_item
Add a custom link, page, post, or taxonomy term to a WordPress menu by supplying the menu ID, title, and either a URL or object details.
Instructions
Add an item to a menu. A custom link needs url; a page/post or term item needs object_type post_type/taxonomy plus object and object_id of an existing object. Only the given fields are sent; the plugin defaults the rest (object_type custom, parent 0, appended at the end). target, classes, xfn, attr_title, description and status are set afterwards with mcp_update_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": {
"site": "<site>",
"menu_id": "<menu_id>",
"title": "<title>"
},
"name": "mcp_add_menu_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Link URL (custom links only) | |
| site | Yes | Site id (see list_sites) | |
| title | Yes | Menu item label | |
| object | No | Post type or taxonomy slug of the linked object (page, post, category, product_cat, ...) | |
| parent | No | Parent menu item ID (an item of the same menu; 0 = top level) | |
| menu_id | Yes | Menu ID | |
| position | No | Menu order position | |
| object_id | No | ID of the linked post or term | |
| object_type | No | Item type: custom (link with url), post_type (page, post, CPT) or taxonomy (category, product_cat, ...). Plugin default: custom |