Skip to main content
Glama
shufl9dka

yandex-searchapi-mcp

by shufl9dka

wordstat_get_regions_distribution

Analyze keyword popularity across regions to identify where a phrase is searched most often.

Instructions

Get regional distribution for a keyword: where users search this phrase more often.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
phraseYesKeyword/phrase to analyze in Wordstat.
regionNoDistribution granularity. Default is REGION_ALL.
devicesNoOptional device filter: all/desktop/phone/tablet.

Implementation Reference

  • The handler function for 'wordstat_get_regions_distribution' tool. It calls the Yandex API at /v2/wordstat/regions with the phrase, region (default REGION_ALL), and optional devices filter, then returns the results in structuredContent.
      async ({ phrase, region, devices }) => {
        return withToolErrorHandling(async () => {
          const response = await client.post<Record<string, unknown>>("/v2/wordstat/regions", {
            phrase,
            region: region ?? "REGION_ALL",
            ...(devices !== undefined ? { devices } : {}),
          });
    
          const structuredContent = {
            results: response.results,
          };
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(structuredContent, null, 2),
              },
            ],
            structuredContent,
          };
        });
      },
    );
  • Registration and input schema for 'wordstat_get_regions_distribution'. Defines the tool metadata (description) and inputSchema with phrase (required string), region (optional WordstatRegionSchema enum), and devices (optional array of WordstatDeviceSchema).
    server.registerTool(
      "wordstat_get_regions_distribution",
      {
        description:
          "Get regional distribution for a keyword: where users search this phrase more often.",
        inputSchema: {
          phrase: z.string().min(1).max(400).describe("Keyword/phrase to analyze in Wordstat."),
          region: WordstatRegionSchema.optional().describe(
            "Distribution granularity. Default is REGION_ALL.",
          ),
          devices: z
            .array(WordstatDeviceSchema)
            .max(3)
            .optional()
            .describe("Optional device filter: all/desktop/phone/tablet."),
        },
      },
  • The tool is registered via server.registerTool("wordstat_get_regions_distribution", ...) inside the registerYandexSearchTools function, which is called from src/index.ts line 19.
    server.registerTool(
      "wordstat_get_regions_distribution",
      {
        description:
          "Get regional distribution for a keyword: where users search this phrase more often.",
        inputSchema: {
          phrase: z.string().min(1).max(400).describe("Keyword/phrase to analyze in Wordstat."),
          region: WordstatRegionSchema.optional().describe(
            "Distribution granularity. Default is REGION_ALL.",
          ),
          devices: z
            .array(WordstatDeviceSchema)
            .max(3)
            .optional()
            .describe("Optional device filter: all/desktop/phone/tablet."),
        },
      },
      async ({ phrase, region, devices }) => {
        return withToolErrorHandling(async () => {
          const response = await client.post<Record<string, unknown>>("/v2/wordstat/regions", {
            phrase,
            region: region ?? "REGION_ALL",
            ...(devices !== undefined ? { devices } : {}),
          });
    
          const structuredContent = {
            results: response.results,
          };
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(structuredContent, null, 2),
              },
            ],
            structuredContent,
          };
        });
      },
    );
Behavior2/5

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

With no annotations available, the description carries full responsibility for disclosing behavioral traits. It does not mention whether the operation is read-only, what the output format is, or if any side effects exist. The 11-word description adds minimal detail beyond the tool's name.

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 a single, front-loaded sentence that gets straight to the point. No extraneous words or filler. Every word earns its place in defining the tool's purpose.

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?

The description lacks explanation of the return value (no output schema provided) and does not clarify how the distribution is represented (e.g., percentages, counts). For a tool with three parameters and no output schema, more context is needed for complete understanding.

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%, meaning all three parameters have descriptions in the input schema. The tool description adds no additional semantic information beyond what the schema already provides. Per guidelines, baseline is 3 when coverage is high.

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 uses a specific verb ('Get') and resource ('regional distribution') and explains the purpose ('where users search this phrase more often'). It clearly distinguishes from sibling tools like wordstat_get_dynamics (time trends) and wordstat_get_top (top queries) by focusing on geographic distribution.

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 guidance is provided on when to use this tool versus alternatives such as wordstat_get_regions_tree or wordstat_get_dynamics. The description does not mention prerequisites, exclusions, or typical use cases, leaving the agent to infer context.

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/shufl9dka/yandex-searchapi-mcp'

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