How to fetch
- If a HasData tool is connected whose name contains
google_serp_ai_mode, call it. Read its schema.qis required. Do not run a shell command when the tool exists. - If no HasData tool is connected, ask the user to press Connect on the HasData connector. Do not install software and do not ask for an API key.
- Use
hasdata google-ai-modeonly when the connector cannot be connected and the binary is already on PATH.
Pass gl, hl, and location when the user names a country, language, or city. Do not invent uule.
A follow-up in the same AI Mode thread uses continuable and subsequentRequestToken from the previous AI Mode response. Do not start a new query when the user is continuing that thread.
Return the answer and the cited links from the tool. Do not add sources the tool did not cite.
The AI Overview box on a normal Google page is a different tool. It needs a token from the full results page and is hasdata-ai-overview. Do not call AI Mode to fake an AI Overview.