Menu Toolswordpress_update_menu_item

wordpress_update_menu_item

Update a WordPress menu item (title, url, parent, position, classes, etc.).

wordpress_update_menu_item

Update a menu item.

Parameters

9 parameters, 1 required.

NameTypeRequiredWhat it is
item_idnumberyesMenu item ID
titlestringnoMenu item title
urlstringnoCustom URL (for custom links)
parentnumbernoParent menu item ID
positionnumbernoPosition in menu
targetstringnoLink target
classesstringnoCSS classes
attr_titlestringnoTitle attribute
descriptionstringnoItem description

Example call

The smallest valid call, with the required parameters only:

{
  "name": "wordpress_update_menu_item",
  "arguments": {
    "item_id": 123
  }
}

Response

{
  "success": true,
  "updated": true,
  "item_id": 1001
}

What it changes

It writes to the site. Respira takes a snapshot before the write, and the change can be undone from that snapshot for 90 days. Calling it twice with the same arguments leaves the site in the same state as calling it once. On a connection set to read-only it is refused with respira_scope_denied.

How long it takes

A typical call takes about 2.1 seconds. 19 in 20 finish within 4.1 seconds. Measured on real sites over the last week, so it includes the site's own hosting.

Availability

Works on any WordPress site, whichever page builder it uses. Available since Respira 1.0.0.

Example Prompts

  • "Rename menu item 1001 to 'Start Here'"
  • "Move menu item 1005 under menu item 1002"
  • "Update the URL of menu item 1001 to /home"