Skip to main content
Glama
localseodata

Local SEO Data

Official

ai_visibility

Read-only

Analyze your domain's citation frequency across AI platforms for up to 10 keywords. See where AI models reference your site to improve visibility.

Instructions

Measure a domain's visibility across AI platforms for up to 10 keywords. Shows how often and where AI models cite your site. Costs 10 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to analyze (e.g. "example.com")
keywordsYesKeywords to check visibility for
locationNoLocation for results (e.g. "Austin, TX"). Default: US
platformsNoPlatforms to query. Default: all

Implementation Reference

  • The 'ai_visibility' tool handler: calls /v1/ai/visibility API with domain, keywords, location, and platforms parameters. Returns formatted result with credit usage.
    server.tool(
      "ai_visibility",
      "Measure a domain's visibility across AI platforms for up to 10 keywords. Shows how often and where AI models cite your site. Costs 10 credits.",
      {
        domain: z.string().min(1).describe('Domain to analyze (e.g. "example.com")'),
        keywords: z.array(z.string().min(1)).min(1).max(10).describe("Keywords to check visibility for"),
        location: z.string().optional().describe('Location for results (e.g. "Austin, TX"). Default: US'),
        platforms: z.array(z.enum(["chat_gpt", "google"])).optional().describe("Platforms to query. Default: all"),
      },
      READ_ONLY,
      withErrorHandling(async ({ domain, keywords, location, platforms }) => {
        const result = await callApi(
          "/v1/ai/visibility",
          { domain, keywords, ...(location && { location }), ...(platforms && { platforms }) },
          getAuth()
        );
        return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
      })
    );
  • Input schema for 'ai_visibility': requires domain (string), keywords (array of strings, 1-10), optional location (string), optional platforms (enum chat_gpt|google).
    server.tool(
      "ai_visibility",
      "Measure a domain's visibility across AI platforms for up to 10 keywords. Shows how often and where AI models cite your site. Costs 10 credits.",
      {
        domain: z.string().min(1).describe('Domain to analyze (e.g. "example.com")'),
        keywords: z.array(z.string().min(1)).min(1).max(10).describe("Keywords to check visibility for"),
        location: z.string().optional().describe('Location for results (e.g. "Austin, TX"). Default: US'),
        platforms: z.array(z.enum(["chat_gpt", "google"])).optional().describe("Platforms to query. Default: all"),
      },
  • src/server.ts:13-13 (registration)
    Import of registerAIVisibilityTools from the ai-visibility.ts module.
    import { registerAIVisibilityTools } from "./tools/ai-visibility.js";
  • src/server.ts:45-45 (registration)
    Registration call: registerAIVisibilityTools(server, getAuth) which registers the 'ai_visibility' tool on the MCP server.
    registerAIVisibilityTools(server, getAuth);
  • withErrorHandling helper wraps the handler to catch errors and return them as MCP error 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,
          };
        }
      };
    }
Behavior4/5

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

Annotations already declare readOnlyHint and destructiveHint. The description adds behavioral details: cost (10 credits), up to 10 keyword limit, and output specifics (how often/where cited). This supplements annotations without contradiction.

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, front-loaded with the verb 'Measure', no redundant information. Every sentence adds value: action, scope, output, cost. Ideal conciseness for tool selection.

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

Completeness4/5

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

With no output schema, the description adequately explains the tool's purpose, limits, cost, and output nature. Missing details on return format or error cases, but sufficiently complete for a straightforward read tool.

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

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. The description reiterates the keyword limit (up to 10) but does not add new semantic details beyond the schema descriptions for domain, location, or platforms.

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

Purpose5/5

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

The description clearly states the tool measures domain visibility across AI platforms for up to 10 keywords, specifying how often and where AI models cite the site. It distinguishes itself from siblings by focusing on visibility measurement with clear limits and cost.

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 ai_mentions or ai_keyword_data. It does not mention exclusions or prerequisites, leaving the agent without context for tool selection.

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