ai_overview
Check if Google displays an AI Overview for a keyword in a specific location, and extract the summary text and cited sources.
Instructions
Check whether Google shows an AI Overview for a keyword and extract the summary text and cited sources. Costs 1 credit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | Search keyword (e.g. "best plumber near me") | |
| location | Yes | City and state (e.g. "Orchard Park, NY") |
Implementation Reference
- src/tools/serp.ts:107-110 (handler)The handler function for the ai_overview tool. Calls the /v1/serp/ai-overview API endpoint with keyword and location, then formats the result.
withErrorHandling(async ({ keyword, location }) => { const result = await callApi("/v1/serp/ai-overview", { keyword, location }, getAuth()); return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] }; }) - src/tools/serp.ts:102-105 (schema)Input schema for ai_overview: keyword (string) and location (string), both required.
{ keyword: z.string().describe('Search keyword (e.g. "best plumber near me")'), location: z.string().describe('City and state (e.g. "Orchard Park, NY")'), }, - src/tools/serp.ts:99-111 (registration)The tool registration for 'ai_overview' using server.tool() with description 'Check whether Google shows an AI Overview...', read-only hint, and the async handler.
server.tool( "ai_overview", "Check whether Google shows an AI Overview for a keyword and extract the summary text and cited sources. Costs 1 credit.", { keyword: z.string().describe('Search keyword (e.g. "best plumber near me")'), location: z.string().describe('City and state (e.g. "Orchard Park, NY")'), }, READ_ONLY, withErrorHandling(async ({ keyword, location }) => { const result = await callApi("/v1/serp/ai-overview", { keyword, location }, getAuth()); return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] }; }) ); - src/server.ts:34-35 (registration)Registration of all SERP tools (including ai_overview) on the MCP server via registerSerpTools().
registerAccountTools(server, getAuth); registerSerpTools(server, getAuth);