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
| Name | Required | Description | Default |
|---|---|---|---|
| brand | Yes | The brand name to check | |
| query | Yes | The exact query to check (e.g., 'What are the best SEO tools?') | |
| platform | Yes | The AI platform to check on |
Implementation Reference
- mcp-server/src/index.ts:710-759 (handler)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), }, ], }; } );