Tools Catalog / WordPress tools / wp_add_nav_menu_item

wp_add_nav_menu_item tool reference for StifLi Flex MCP

Write
Group MenusCapability edit_theme_options

adds an item to a menu. It supports `post_type`, `custom`, and `taxonomy` item types.

Description

adds an item to a menu. It supports `post_type`, `custom`, and `taxonomy` item types.

What it is for

  • Adding links to pages, posts, categories, or external URLs.

Example use case

adding a landing page to the menu.

Sample prompt

Add the About Us page to menu ID 6 and place it near the top.

Sample response

{
  "tool": "wp_add_nav_menu_item",
  "status": "ok",
  "updated": true
}

What does wp_add_nav_menu_item do?

adds an item to a menu. It supports `post_type`, `custom`, and `taxonomy` item types.

Does wp_add_nav_menu_item modify site data?

Yes. It is a write operation and can create, update, or delete data depending on arguments.

Which capability is commonly required?

It usually runs under controls compatible with edit_theme_options and the active MCP profile.

How should wp_add_nav_menu_item be used safely?

Enable write confirmations, test in staging first, and keep changelog/rollback enabled.