Skip to main content
Glama
localseodata

Local SEO Data

Official

keywords_for_site

Read-only

Retrieve keywords a domain ranks for in a specific location. Includes rank positions and search volume to analyze local SEO performance.

Instructions

Get keywords a domain currently ranks for. Returns keywords with rank positions and search volume. Costs 3 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to analyze (e.g. "example.com")
locationYesGeographic location (e.g. "Orchard Park, NY")
limitNoMax results. Default: 50, max: 1000

Implementation Reference

  • The handler for the 'keywords_for_site' tool. It calls /v1/keywords/for-site API with domain, location, and optional limit parameters, then formats the result.
    server.tool(
      "keywords_for_site",
      "Get keywords a domain currently ranks for. Returns keywords with rank positions and search volume. Costs 3 credits.",
      {
        domain: z.string().min(1).describe('Domain to analyze (e.g. "example.com")'),
        location: z.string().min(1).describe('Geographic location (e.g. "Orchard Park, NY")'),
        limit: z.number().int().min(1).max(1000).optional().describe("Max results. Default: 50, max: 1000"),
      },
      READ_ONLY,
      withErrorHandling(async ({ domain, location, limit }) => {
        const result = await callApi(
          "/v1/keywords/for-site",
          { domain, location, ...(limit && { limit }) },
          getAuth()
        );
        return { content: [{ type: "text" as const, text: formatResult(result.data, result) }] };
      })
    );
  • Zod schema defining the input parameters: domain (required string), location (required string), and limit (optional integer, 1-1000).
    {
      domain: z.string().min(1).describe('Domain to analyze (e.g. "example.com")'),
      location: z.string().min(1).describe('Geographic location (e.g. "Orchard Park, NY")'),
      limit: z.number().int().min(1).max(1000).optional().describe("Max results. Default: 50, max: 1000"),
    },
  • src/server.ts:42-42 (registration)
    Registration of all keyword tools (including keywords_for_site) on the MCP server.
    registerKeywordTools(server, getAuth);
  • src/server.ts:10-11 (registration)
    Import of the registerKeywordTools function from keywords.ts.
    import { registerKeywordTools } from "./tools/keywords.js";
    import { registerBacklinkTools } from "./tools/backlinks.js";
  • Helper wrapper that catches errors from the handler and returns 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 declare readOnlyHint=true and destructiveHint=false, so the description adds value by noting the credit cost. No contradiction, and the cost is a behavioral trait not covered by 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, no wasted words. Purpose and key behavioral note (credit cost) are front-loaded and essential.

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?

No output schema, so description should detail return structure; it only mentions 'keywords with rank positions and search volume' which is vague. Missing details on pagination, rate limits, or output format beyond the schema.

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 coverage is 100% with adequate parameter descriptions. The description does not add further meaning to parameters beyond what schema provides, maintaining the baseline.

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?

Clearly states the verb 'Get' and resource 'keywords a domain ranks for', and specifies return content (rank positions, search volume). Sufficiently distinguishes from siblings like keyword_suggestions or keyword_trends.

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 by describing what it does, but does not explicitly state when to use vs alternatives. The credit cost hint provides limited guidance but no direct comparison to sibling tools.

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