Skip to main content
Glama
localseodata

Local SEO Data

Official

backlink_summary

Read-only

Get a backlink profile summary for any domain, including total backlinks, referring domains, spam score, and a breakdown of backlink types.

Instructions

Get backlink profile summary for a domain. Returns total backlinks, referring domains, spam score, and backlink type breakdown. Costs 5 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to analyze (e.g. "example.com")

Implementation Reference

  • The handler function for backlink_summary tool. Calls /v1/backlinks/summary API with the provided domain and formats the result.
    withErrorHandling(async ({ domain }) => {
      const result = await callApi("/v1/backlinks/summary", { domain }, getAuth());
      return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
    })
  • Zod schema for backlink_summary: requires a single 'domain' string parameter.
    {
      domain: z.string().min(1).describe('Domain to analyze (e.g. "example.com")'),
    },
  • Registration of 'backlink_summary' via server.tool() inside registerBacklinkTools().
    export function registerBacklinkTools(server: McpServer, getAuth: () => string) {
      server.tool(
        "backlink_summary",
        "Get backlink profile summary for a domain. Returns total backlinks, referring domains, spam score, and backlink type breakdown. Costs 5 credits.",
        {
          domain: z.string().min(1).describe('Domain to analyze (e.g. "example.com")'),
        },
        READ_ONLY,
        withErrorHandling(async ({ domain }) => {
          const result = await callApi("/v1/backlinks/summary", { domain }, getAuth());
          return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
        })
      );
  • src/server.ts:43-43 (registration)
    Server registration call that wires up registerBacklinkTools into the MCP server.
    registerBacklinkTools(server, getAuth);
  • formatResult helper used by the handler to format the API response into a text string.
    export function formatResult(
      data: unknown,
      meta: { credits_used: number; credits_remaining: number; cached: boolean }
    ): string {
      const metaLine = `[${meta.credits_used} credit${meta.credits_used !== 1 ? "s" : ""} used | ${meta.credits_remaining} remaining${meta.cached ? " | cached" : ""}]`;
      return `${metaLine}\n\n${JSON.stringify(data, null, 2)}`;
    }
    
    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,
          };
        }
      };
    }
Behavior4/5

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

Annotations already mark it as read-only and non-destructive. The description adds the credit cost (5 credits), which is behavioral information beyond annotations. No contradictions.

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, no fluff, front-loaded with action and key outputs. Every word earns its place.

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?

Tool is simple with one parameter and annotations present. Description lists returned fields adequately. Slightly incomplete due to lack of response structure details, but sufficient for a straightforward tool.

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?

Single parameter 'domain' is fully described in the schema with an example. The description does not add further semantic detail beyond what the schema provides, but does not need to due to full coverage.

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?

Description clearly states the tool's purpose: retrieving a backlink profile summary for a domain. It lists specific returned metrics (total backlinks, referring domains, spam score, type breakdown), distinguishing it from related tools like backlink_gap.

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?

No explicit guidance on when to use this tool vs. alternatives such as backlink_gap or competitor_gap. The description does not mention use cases, prerequisites, or situations where the tool is not 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/localseodata/mcp-server'

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