Skip to main content
Glama
localseodata

Local SEO Data

Official

local_audit

Read-only

Assess local pack position, organic rankings, profile completeness, review velocity, and competitors to receive actionable recommendations for improving local search visibility.

Instructions

Run a comprehensive local SEO audit. Checks local pack position, organic rankings, profile completeness, review velocity, and competitors. Returns actionable recommendations. Costs 50 credits. This runs as an async job and may take 15-45 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
business_nameYesBusiness name
locationYesCity and state

Implementation Reference

  • src/server.ts:38-38 (registration)
    registerAuditTools is called in createMcpServer, which registers all audit tools including 'local_audit'
    registerAuditTools(server, getAuth);
  • The 'local_audit' tool handler: submits an audit job POST /v1/audit/local, optionally polls for async completion, and returns formatted results
    export function registerAuditTools(server: McpServer, getAuth: () => string) {
      server.tool(
        "local_audit",
        "Run a comprehensive local SEO audit. Checks local pack position, organic rankings, profile completeness, review velocity, and competitors. Returns actionable recommendations. Costs 50 credits. This runs as an async job and may take 15-45 seconds.",
        {
          business_name: z.string().describe("Business name"),
          location: z.string().describe("City and state"),
        },
        READ_ONLY,
        withErrorHandling(async ({ business_name, location }) => {
          // Submit the job
          const submitResult = await callApi(
            "/v1/audit/local",
            { business_name, location },
            getAuth(),
            30_000
          );
          const submitData = submitResult.data as Record<string, unknown>;
    
          // If cached result returned directly (no job_id), return immediately
          if (!submitData.job_id) {
            return { content: [{ type: "text" as const, text: formatResult(submitResult.data, submitResult) }] };
          }
    
          // Poll for completion
          const pollUrl = submitData.poll_url as string;
          const result = await pollAsyncJob(pollUrl, getAuth());
          return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
        })
      );
  • Schema definition for local_audit: requires business_name (string) and location (string), with read-only hints
    "local_audit",
    "Run a comprehensive local SEO audit. Checks local pack position, organic rankings, profile completeness, review velocity, and competitors. Returns actionable recommendations. Costs 50 credits. This runs as an async job and may take 15-45 seconds.",
    {
      business_name: z.string().describe("Business name"),
      location: z.string().describe("City and state"),
    },
    READ_ONLY,
  • pollAsyncJob helper function used by the local_audit handler to poll an async job URL until completion or timeout (3 minutes)
    async function pollAsyncJob(
      pollUrl: string,
      auth: string,
      maxWaitMs: number = 180_000
    ): Promise<{ data: unknown; credits_used: number; credits_remaining: number; cached: boolean }> {
      const start = Date.now();
      let delay = 2000;
    
      while (Date.now() - start < maxWaitMs) {
        await new Promise((r) => setTimeout(r, delay));
        const result = await callApiGet(pollUrl, auth);
        const data = result.data as Record<string, unknown>;
    
        if (data.status === "complete") {
          return result;
        }
        if (data.status === "failed") {
          throw new Error((data.error as string) || "Audit job failed");
        }
        // Still pending/running — increase delay up to 4s
        delay = Math.min(delay * 1.3, 4000);
      }
    
      throw new Error("Audit timed out after 3 minutes. The job may still be processing — try polling the status URL.");
    }
  • withErrorHandling wrapper used in the local_audit handler to catch and surface errors 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,
          };
        }
      };
    }
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds important behavioral traits: costs 50 credits, runs as an async job, and may take 15-45 seconds. This is valuable information beyond annotations.

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 two sentences: the first states the core purpose and components, the second adds critical usage details (credit cost, async, duration). No redundancy or filler words.

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?

Despite good coverage of purpose and behavioral aspects, the description lacks details on the output format or what 'actionable recommendations' specifically look like. With no output schema, the description should clarify the return structure, which is missing. The openWorldHint annotation is noted but not explained in the description.

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 description coverage is 100%, so the schema already documents both parameters. The description does not add significant new meaning beyond what the schema provides; it only implies location is 'City and state' which matches the schema. Baseline 3 is appropriate.

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 runs a comprehensive local SEO audit, listing specific checks (local pack position, organic rankings, profile completeness, review velocity, competitors) and states it returns actionable recommendations. This distinguishes it from sibling tools like citation_audit or reputation_audit.

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 provides some context (credit cost, async nature, duration) but does not explicitly tell the agent when to use this tool versus alternatives. No direct comparison with sibling tools or conditions for when not to use it.

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