Skip to main content
Glama

mcp_update_menu_item

Update a WordPress menu item by sending only fields to change while preserving all other settings; linked object changes require deleting and adding a new item.

Instructions

Partially update a menu item: only the given fields are sent and changed, every other stored field (type, linked object, url, ...) is kept (cvrt-mcp-endpoints 1.14.2+). The linked object (type/object/object_id) cannot be changed here: delete the item and add a new one. The response lists the changed fields.

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>",
      "item_id": "<item_id>"
    },
    "name": "mcp_update_menu_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoLink URL. Only allowed on custom links; a page/term item answers 400 url_not_custom
xfnNoLink relationship (XFN rel values), space-separated, e.g. "nofollow noopener"
siteYesSite id (see list_sites)
titleNoMenu item label (empty string = follow the linked page's title)
parentNoParent menu item ID (an item of the same menu; 0 = top level)
statusNopublish = visible, draft = hidden from the menu
targetNoLink target: "_blank" opens in a new tab, "" in the same tab
classesNoCSS classes, space- or comma-separated (replaces the stored list; empty string clears)
item_idYesMenu item ID
positionNoMenu order position
attr_titleNoTitle attribute (tooltip) of the link
descriptionNoItem description (shown by themes that render menu descriptions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv3.14.0
    • addedInput schema / properties / attr_title
      Added value: +{
      +  "description": "Title attribute (tooltip) of the link",
      +  "type": "string"
      +}
    • addedInput schema / properties / classes
      Added value: +{
      +  "description": "CSS classes, space- or comma-separated (replaces the stored list; empty string clears)",
      +  "type": "string"
      +}
    • addedInput schema / properties / description
      Added value: +{
      +  "description": "Item description (shown by themes that render menu descriptions)",
      +  "type": "string"
      +}
    • changedInput schema / properties / item_id / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / parent / description
      Previous value: -"Parent menu item ID"New value: +"Parent menu item ID (an item of the same menu; 0 = top level)"
    • changedInput schema / properties / parent / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / position / description
      Previous value: -"Position in menu"New value: +"Menu order position"
    • changedInput schema / properties / position / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / status
      Added value: +{
      +  "description": "publish = visible, draft = hidden from the menu",
      +  "enum": [
      +    "publish",
      +    "draft"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / target
      Added value: +{
      +  "description": "Link target: \"_blank\" opens in a new tab, \"\" in the same tab",
      +  "enum": [
      +    "",
      +    "_blank"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / title / description
      Previous value: -"Menu item title"New value: +"Menu item label (empty string = follow the linked page's title)"
    • changedInput schema / properties / url / description
      Previous value: -"URL for custom links"New value: +"Link URL. Only allowed on custom links; a page/term item answers 400 url_not_custom"
    • addedInput schema / properties / xfn
      Added value: +{
      +  "description": "Link relationship (XFN rel values), space-separated, e.g. \"nofollow noopener\"",
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv3.4.0
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "item_id"
      -]New value: +[
      +  "site",
      +  "item_id"
      +]
  3. First observedv2.0.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden and does well: it discloses that the operation is a true partial patch (unsent fields preserved), states a version precondition (cvrt-mcp-endpoints 1.14.2+), names an immutability boundary on linked object fields, and tells the agent the response lists the changed fields. It stops short of permission requirements, failure modes for invalid parent/position, or reversibility.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, each load-bearing: patch semantics first, the hard restriction second, the return value third. Nothing is redundant and the most important constraint is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter mutation tool with no annotations and no output schema, the definition covers the essentials: patch behavior, the one forbidden change, the version gate, and what the response contains. Remaining gaps (permissions, error conditions such as invalid parent or cross-menu parent) are modest against a fully described schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, including enum docs for status and target, so the schema already does the parameter work. The description adds only the global partial-update semantics (unsent fields kept) and the linked-object immutability rule, not per-parameter meaning. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource with an explicit scope qualifier: 'Partially update a menu item: only the given fields are sent and changed, every other stored field ... is kept.' This distinguishes it from a whole-object menu update and from add/delete item operations without the agent needing to open any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear when-not rule with a concrete alternative: the linked object (type/object/object_id) cannot be changed here, so 'delete the item and add a new one.' That is actionable routing guidance rather than inference. It does not explicitly name sibling tools such as mcp_update_menu vs mcp_add_menu_item, so it falls just short of full alternative enumeration.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools