Skip to main content
Glama
sharozdawa

ai-visibility-mcp

check_single_query

Monitor brand mentions for specific queries on AI platforms like ChatGPT, Perplexity, Claude, and Gemini to track visibility, sentiment, and competitor presence.

Instructions

Check if a brand is mentioned for a specific query on a specific AI platform. Returns mention status, position, context snippet, sentiment, and competitor mentions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
brandYesThe brand name to check
queryYesThe exact query to check (e.g., 'What are the best SEO tools?')
platformYesThe AI platform to check on

Implementation Reference

  • The registration and handler implementation for the check_single_query tool. It uses Zod for input validation and returns a simulated result for a given brand, query, and AI platform.
    server.tool(
      "check_single_query",
      "Check if a brand is mentioned for a specific query on a specific AI platform. Returns mention status, position, context snippet, sentiment, and competitor mentions.",
      {
        brand: z.string().describe("The brand name to check"),
        query: z
          .string()
          .describe(
            "The exact query to check (e.g., 'What are the best SEO tools?')"
          ),
        platform: z
          .enum(["chatgpt", "perplexity", "claude", "gemini"])
          .describe("The AI platform to check on"),
      },
      async ({ brand, query, platform }) => {
        const timeBucket = Math.floor(Date.now() / 3600000);
        const rng = seededRandom(`${brand}-${query}-${platform}-${timeBucket}`);
    
        // Infer keywords from query
        const queryWords = query
          .toLowerCase()
          .split(/\s+/)
          .filter((w: string) => w.length > 3);
        const result = simulateCheck(brand, query, platform, queryWords, rng);
    
        const platformInfo = PLATFORMS.find((p) => p.id === platform)!;
    
        const output = {
          brand,
          query,
          platform: platformInfo.name,
          mentioned: result.mentioned,
          position: result.position,
          context: result.context,
          sentiment: result.sentiment,
          competitorsFound: result.competitors,
          checkedAt: new Date().toISOString(),
          note: "Result is simulated for demonstration. Connect real AI platform APIs for production data.",
        };
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(output, null, 2),
            },
          ],
        };
      }
    );
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions what the tool returns, it doesn't describe important behavioral aspects like rate limits, authentication requirements, error conditions, whether it makes external API calls, or how fresh the data is. The description provides basic output information but lacks operational context.

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?

The description is perfectly concise - a single sentence that efficiently communicates the tool's purpose and return values. Every word earns its place with no redundancy or unnecessary elaboration.

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?

For a tool with 3 parameters and no output schema, the description provides basic purpose and return information but lacks important context. Without annotations and with no output schema, the description should ideally explain more about the return structure, error handling, and operational constraints to be truly complete.

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?

With 100% schema description coverage, the input schema already fully documents all three parameters. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it mentions the parameters generically but provides no additional context about format constraints, examples beyond the schema, or edge cases.

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 specific action ('Check if a brand is mentioned'), the resource ('for a specific query on a specific AI platform'), and distinguishes it from siblings by specifying it's a single-query check rather than broader visibility analysis. It explicitly mentions the return values which further clarifies the purpose.

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 the sibling tools like check_brand_visibility, compare_brands, or get_visibility_score. It doesn't mention prerequisites, limitations, or alternative scenarios where other tools might be more appropriate.

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/sharozdawa/ai-visibility'

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