Skip to main content
Glama
localseodata

Local SEO Data

Official

local_authority

Read-only

Calculate a Local Authority Score (0-100) for your business based on rankings, reviews, profile completeness, and citations. Get a breakdown and percentile ranking to identify improvement areas.

Instructions

Calculate a Local Authority Score (0-100) based on rankings, reviews, profile completeness, and citations. Includes a breakdown of each component and a percentile ranking. Costs 10 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
business_nameYesBusiness name
locationYesCity and state
keywordNoKeyword to evaluate authority for (defaults to business name)

Implementation Reference

  • The registerIntelligenceTools function registers the 'local_authority' tool on the MCP server. Lines 13-29 define the tool: name 'local_authority', description about calculating a Local Authority Score (0-100), schema with business_name (required string), location (required string), and keyword (optional string). The handler calls the API endpoint '/v1/score/local-authority' with the input parameters and returns the result.
    export function registerIntelligenceTools(server: McpServer, getAuth: () => string) {
      server.tool(
        "local_authority",
        "Calculate a Local Authority Score (0-100) based on rankings, reviews, profile completeness, and citations. Includes a breakdown of each component and a percentile ranking. Costs 10 credits.",
        {
          business_name: z.string().describe("Business name"),
          location: z.string().describe("City and state"),
          keyword: z.string().optional().describe("Keyword to evaluate authority for (defaults to business name)"),
        },
        READ_ONLY,
        withErrorHandling(async ({ business_name, location, keyword }) => {
          const result = await callApi(
            "/v1/score/local-authority",
            { business_name, location, ...(keyword && { keyword }) },
            getAuth()
          );
          return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
        })
  • Zod schema for the 'local_authority' tool inputs: business_name (required string), location (required string), keyword (optional string, defaults to business name).
    {
      business_name: z.string().describe("Business name"),
      location: z.string().describe("City and state"),
      keyword: z.string().optional().describe("Keyword to evaluate authority for (defaults to business name)"),
    },
  • src/server.ts:41-51 (registration)
    Registration of the intelligence tools (including 'local_authority') via registerIntelligenceTools(server, getAuth) in the MCP server setup.
      registerIntelligenceTools(server, getAuth);
      registerKeywordTools(server, getAuth);
      registerBacklinkTools(server, getAuth);
      registerSiteTools(server, getAuth);
      registerAIVisibilityTools(server, getAuth);
      registerCompetitiveTools(server, getAuth);
      registerLocationTools(server, getAuth);
      registerDiagnosticTools(server, getAuth);
    
      return server;
    }
  • The callApi helper function that sends a POST request to API_BASE_URL + path (here '/v1/score/local-authority') with JSON body and Authorization header, returning the response data and metadata.
    export async function callApi(
      path: string,
      body: Record<string, unknown>,
      authHeader: string,
      timeoutMs = 60_000
    ): Promise<{ data: unknown; credits_used: number; credits_remaining: number; cached: boolean }> {
      const url = `${env.API_BASE_URL}${path}`;
    
      console.log(`[api] POST ${url} (timeout: ${timeoutMs / 1000}s, auth: ${authHeader ? `${authHeader.slice(0, 15)}...` : "MISSING"})`);
    
      const response = await fetch(url, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
  • The withErrorHandling wrapper that catches errors thrown by the tool handler and formats 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 provide readOnlyHint=true, destructiveHint=false. Description adds credit cost (10 credits) and output breakdown, enhancing behavioral context 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?

Two sentences: first covers purpose and output structure, second states cost. No redundancy, front-loaded with key info.

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

Completeness5/5

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

Given 100% schema coverage, no output schema but description explains output components. Sufficient for a calculation tool with moderate complexity.

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?

All 3 parameters have descriptions in schema (100% coverage). Description adds context about score components but does not enrich parameter meaning beyond schema.

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?

Clear verb 'Calculate', specific resource 'Local Authority Score', and details outputs (breakdown, percentile ranking). Distinguishes from sibling local tools by focusing on a composite score.

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?

Implies usage for computing authority score but lacks explicit when-to-use, when-not, or alternatives among many sibling tools like local_audit or local_finder.

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