Skip to main content
Glama
localseodata

Local SEO Data

Official

ai_keyword_data

Read-only

Get AI search volume and trends for keywords to understand visibility in ChatGPT and other LLMs.

Instructions

Get AI search volume and trends for keywords — how often they're searched in ChatGPT and other LLMs. Costs 1 credit per 50 keywords.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordsYesKeywords to get AI volume for (e.g. ["plumber near me", "emergency plumber"])
locationNoLocation for results (e.g. "Miami, FL"). Default: US

Implementation Reference

  • The handler for the ai_keyword_data tool. It calls the /v1/ai/keyword-data API endpoint with keywords and optional location, then formats the result.
    server.tool(
      "ai_keyword_data",
      "Get AI search volume and trends for keywords — how often they're searched in ChatGPT and other LLMs. Costs 1 credit per 50 keywords.",
      {
        keywords: z.array(z.string().min(1)).min(1).max(100).describe('Keywords to get AI volume for (e.g. ["plumber near me", "emergency plumber"])'),
        location: z.string().optional().describe('Location for results (e.g. "Miami, FL"). Default: US'),
      },
      READ_ONLY,
      withErrorHandling(async ({ keywords, location }) => {
        const result = await callApi(
          "/v1/ai/keyword-data",
          { keywords, ...(location && { location }) },
          getAuth()
        );
        return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
      })
    );
  • Zod schema for ai_keyword_data: keywords (array of strings, 1-100) and optional location string.
    {
      keywords: z.array(z.string().min(1)).min(1).max(100).describe('Keywords to get AI volume for (e.g. ["plumber near me", "emergency plumber"])'),
      location: z.string().optional().describe('Location for results (e.g. "Miami, FL"). Default: US'),
    },
  • Registration of ai_keyword_data tool via server.tool() in registerAIVisibilityTools function.
    server.tool(
      "ai_keyword_data",
      "Get AI search volume and trends for keywords — how often they're searched in ChatGPT and other LLMs. Costs 1 credit per 50 keywords.",
      {
        keywords: z.array(z.string().min(1)).min(1).max(100).describe('Keywords to get AI volume for (e.g. ["plumber near me", "emergency plumber"])'),
        location: z.string().optional().describe('Location for results (e.g. "Miami, FL"). Default: US'),
      },
      READ_ONLY,
      withErrorHandling(async ({ keywords, location }) => {
        const result = await callApi(
          "/v1/ai/keyword-data",
          { keywords, ...(location && { location }) },
          getAuth()
        );
        return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
      })
    );
  • src/server.ts:45-45 (registration)
    registerAIVisibilityTools is called here in createMcpServer to register all AI visibility tools including ai_keyword_data.
    registerAIVisibilityTools(server, getAuth);
  • withErrorHandling wrapper used by the ai_keyword_data handler to catch and surface errors as MCP content.
    export function withErrorHandling<T>(
      fn: (args: T) => Promise<ToolResult>
    ): (args: T) => Promise<ToolResult> {
      return async (args) => {
        try {
          return await fn(args);
        } catch (err) {
          const message = err instanceof Error ? err.message : String(err);
          console.error(`[mcp] Tool error: ${message}`);
          return {
            content: [{ type: "text" as const, text: `Error: ${message}` }],
            isError: true,
          };
        }
      };
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only and non-destructive behavior. The description adds value by noting the credit cost and clarifying data sources (ChatGPT and other LLMs), but does not disclose rate limits, error handling, or result format. This is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: first clearly states purpose, second adds key cost info. No filler, highly efficient. Front-loaded with the primary action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description lacks details on return format and data structure, which is important since there is no output schema. It explains what is retrieved (volume and trends) but not how it is presented. Cost info is a plus, but completeness is average.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so parameters are well-documented. The description adds the credit cost model attached to the keywords parameter, providing useful pricing context beyond the schema. Example usage in schema further aids understanding.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves AI search volume and trends for keywords, specifying it covers ChatGPT and other LLMs. It differentiates from siblings like 'search_volume' and 'keyword_trends' by focusing on AI-specific metrics, though it shares the word 'trends' with a sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_volume' or 'keyword_trends'. It mentions a cost factor (1 credit per 50 keywords) but does not specify contextual triggers or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/localseodata/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server