Get Navigation Menus is a WordPress ability from Page Builder: Pagelayer – Drag and Drop website builder — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get Navigation Menus

Read-only

List every WordPress nav menu with its full item tree, term ID, and which theme locations it's assigned to.

Requires the Pagelayer plugin on WordPress 6.9+ (or another source of wp_register_ability()) for the Abilities API — registration is skipped entirely via a function_exists() guard when it isn't available, and ability categories similarly require wp_register_ability_category(). Most abilities require the 'edit_posts' capability; update-global-styles, create-menu, and delete-menu require 'manage_options'. search-images additionally needs a Pexels API key configured on the Pagelayer AI Agents settings page, and get-library-sections/import-library-section call Pagelayer's own hosted library API. Four near-duplicate abilities (get-widget, get-widgets-summary, edit-layout, navigator) are registered in source with mcp_public:false — fully callable over the REST Abilities API but intentionally left out of the advertised MCP tool list as duplicates of get-widget-schema, list-widgets, update-page, and get-page respectively — and are excluded from this listing.

What it does

Returns every registered WordPress nav menu, or one if a name/slug/term id is passed via menu, with its menu_id, name, slug, item_count, assigned theme locations, and a nested items tree — each item's id, title, url, linked object, and any Pagelayer per-item settings such as mega-menu configuration read from its _pagelayer_content meta. Also lists the theme's registered menu locations and what's currently assigned to each. The menu_id this returns is exactly what belongs in the pl_wp_menu (Primary Menu) widget's nav_list attribute, since that widget has no item list of its own.

See it in action

You ask your AI assistant

"List all navigation menus on this site and show me what's assigned to the primary location."

Inputs

Name Type Required Description
menu string No Optional name, slug or term id to return just one menu.

Returns

An object with menus (array of {menu_id, name, slug, item_count, locations, items}), locations (array of {slug, label, assigned_menu_id}), and a note.

Permission

Requires the 'edit_posts' capability.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.