wp_get_menus: list navigation menus
Lists the navigation menus defined on the site.
Arguments
None.
Permissions
mcp:read and wp:content:read, plus the edit_theme_options capability.
Menus are theme territory, so even reading them needs a higher bar than reading posts. A user who can edit content cannot necessarily see the menu structure.
What it returns
An items list, each menu carrying id, name and slug.
Establish which menu before touching anything
A typical site has several — a main menu, a footer menu, sometimes a mobile or utility menu — and their names are not always a reliable guide to where they appear.
This tool gives you the IDs. Every other menu tool needs one, and using the wrong one edits a menu nobody expected to change.
List the menus, then show me the items in the main one. Do not change anything.
It does not report theme locations
The response carries the menu's identity and nothing about where it is displayed. A menu named "Main" may or may not be assigned to the theme's primary location, and an unassigned menu appears nowhere at all.
That is a real gap: you can edit a menu perfectly and see no change on the site because it is not the one being rendered. If a menu edit appears to have no effect, check the assignment in Appearance → Menus.
Multilingual sites
With Polylang, each language typically has its own menu assigned to the same theme location. They appear here as separate menus, often with similar names.
Confirm which language's menu you have before editing, and plan to make the equivalent change in each. Editing one does not touch the others.
Using it well
At the start of any navigation work:
List the menus with their IDs and slugs.
Then, for the one you mean:
Show me every item in menu 3 with its ID, title, URL, parent and order.
Those two calls give you the full picture, and the second is what makes a safe edit possible. See wp_get_menu_items.
What it does not do
- No item counts. You cannot tell a large menu from an empty one without listing its items.
- No creation. There is no tool to create or delete a menu itself — only its items. Creating a menu is a WordPress admin task.
- No location assignment. Also admin-only.
That second point is worth noting: the tools can fill and reorder a menu, but the menu must already exist.
Common problems
| Symptom | Cause |
|---|---|
pom_ai_mcp_forbidden |
The acting user lacks edit_theme_options |
| Several similar names | Multilingual site, one menu per language |
| An empty list | No menus are defined on this site |
| Edits have no visible effect | The menu is not assigned to a theme location |