Enable AI agents to generate components that fetch menus
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3542596. --> Reported by: [kunal.sachdev](https://www.drupal.org/user/3685163) Related to !11 !1470 !1472 >>> <h3 id="overview">Overview</h3> <p>Components can fetch menu from the CMS. AI agents should be aware of this capability so that, when users request features like creating a component to render the 'main' menu as a mega menu, the agents can automatically generate a component that fetches the 'main' menu data and renders it as a mega menu.</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>When fetching a menu, the following scenarios should be handled, in order of preference:</p> <ul> <li>If the jsonapi_menu_items module is installed: use it for fetching menu items.</li> <li>Else, if the linkset endpoint is enabled: use the linkset endpoint to fetch menu data.</li> <li>Else, if the user has permission to enable the linkset endpoint: prompt the user with guidance on enabling the linkset endpoint.</li> <li>Else, AI should respond with a message such as: sorry, I can&rsquo;t fetch the menu because no supported data source is available.&rdquo;</li> </ul> <h3 id="ui-changes">User interface changes</h3>
issue