Skip to main content
Glama
localseodata

Local SEO Data

Official

brand_mentions

Read-only

Find online brand mentions with source, sentiment, and context. Monitor brand reputation across the web.

Instructions

Find online mentions of a brand across the web. Returns mention sources, sentiment, and context. Costs 3 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
business_nameYesBusiness or brand name to search for
limitNoMax mentions. Default: 20, max: 100

Implementation Reference

  • The handler function for the brand_mentions tool. Calls POST /v1/brand/mentions with business_name and optional limit, then formats the result.
      withErrorHandling(async ({ business_name, limit }) => {
        const result = await callApi(
          "/v1/brand/mentions",
          { business_name, ...(limit && { limit }) },
          getAuth()
        );
        return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
      })
    );
  • Input schema for brand_mentions: business_name (string, required) and limit (number, optional, max 100).
    {
      business_name: z.string().min(1).describe("Business or brand name to search for"),
      limit: z.number().int().min(1).max(100).optional().describe("Max mentions. Default: 20, max: 100"),
    },
  • Registration of the 'brand_mentions' tool on the MCP server via server.tool() inside registerCompetitiveTools.
    server.tool(
      "brand_mentions",
      "Find online mentions of a brand across the web. Returns mention sources, sentiment, and context. Costs 3 credits.",
      {
        business_name: z.string().min(1).describe("Business or brand name to search for"),
        limit: z.number().int().min(1).max(100).optional().describe("Max mentions. Default: 20, max: 100"),
      },
      READ_ONLY,
      withErrorHandling(async ({ business_name, limit }) => {
        const result = await callApi(
          "/v1/brand/mentions",
          { business_name, ...(limit && { limit }) },
          getAuth()
        );
        return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
      })
    );
  • src/server.ts:14-46 (registration)
    Import and registration call of registerCompetitiveTools which registers brand_mentions on the MCP server.
    import { registerCompetitiveTools } from "./tools/competitive.js";
    import { registerLocationTools } from "./tools/locations.js";
    import { registerAccountTools } from "./tools/account.js";
    
    export function createMcpServer(getAuth: () => string): McpServer {
      const server = new McpServer({
        name: "localseodata",
        version: "1.0.0",
        description: `LocalSEOData — Local SEO intelligence API.
    
    IMPORTANT — Credit budget awareness:
    1. ALWAYS call get_balance FIRST before starting any analysis. This is free (0 credits).
    2. Plan your tool usage based on the available balance. Each tool description includes its credit cost.
    3. Prefer cheaper tools when possible: local_pack (1 cr) over local_audit (50 cr) when a full audit isn't needed.
    4. For multi-step analyses, estimate total cost upfront and warn the user if it will exceed 50% of their balance.
    5. Composite tools (local_audit, citation_audit, geogrid_scan) are premium — confirm with the user before using them.
    6. Every successful tool call response includes credits_used and credits_remaining — monitor these as you work.
    7. If a tool returns an insufficient credits error, inform the user of their balance and the cost required.`,
      });
    
      registerAccountTools(server, getAuth);
      registerSerpTools(server, getAuth);
      registerBusinessTools(server, getAuth);
      registerReviewTools(server, getAuth);
      registerAuditTools(server, getAuth);
      registerGeogridTools(server, getAuth);
      registerReportTools(server, getAuth);
      registerIntelligenceTools(server, getAuth);
      registerKeywordTools(server, getAuth);
      registerBacklinkTools(server, getAuth);
      registerSiteTools(server, getAuth);
      registerAIVisibilityTools(server, getAuth);
      registerCompetitiveTools(server, getAuth);
  • The withErrorHandling helper wraps the tool handler to catch errors and return MCP-friendly error content.
    type ToolResult = { content: { type: "text"; text: string }[]; isError?: boolean };
    
    /** Wrap an MCP tool handler so thrown errors always surface 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,
          };
        }
      };
    }
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 the cost (3 credits) and output details (sources, sentiment, context), which are beyond annotations. However, it does not disclose any potential side effects or rate limits, and the openWorldHint is not explained.

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 concise at two sentences. The first sentence covers purpose and output, and the second adds cost. No redundant or irrelevant information, and it is front-loaded with the key action.

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?

Given the low complexity (2 parameters, no output schema, annotations present), the description covers the core behavior and cost. It lacks detailed output structure but is still sufficient for an agent to decide to invoke the tool. Minor gap: the return format is not detailed, but without an output schema, this is acceptable.

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?

The input schema has 100% description coverage for both parameters ('business_name' and 'limit'), so the schema itself provides sufficient meaning. The description adds no extra parameter-level context beyond the schema, leading to a baseline score of 3.

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's action ('Find online mentions of a brand') and the resource (online mentions). It specifies returned data (sources, sentiment, context). However, it does not explicitly differentiate from a sibling tool like 'ai_mentions', which may also find mentions, though the context may differ.

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

Usage Guidelines3/5

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

The description implies usage scenarios (finding brand mentions) but provides no explicit guidance on when not to use it or alternatives within the same server. The context of mentioning cost (3 credits) hints at a paid operation but does not substitute for usage boundaries.

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