Skip to main content
Glama

list_regions

Retrieve administrative regions for any country, with optional filtering by country ID to narrow results.

Instructions

List administrative regions, optionally filtered by country.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countryIdNoFilter by country UUID

Implementation Reference

  • src/server.ts:168-178 (registration)
    Registration of the 'list_regions' tool via server.tool(), defining its name, description, input schema (optional countryId), and handler callback.
    server.tool(
      'list_regions',
      'List administrative regions, optionally filtered by country.',
      {
        countryId: z.string().optional().describe('Filter by country UUID'),
      },
      async (params) => {
        const result = await client.regions.list(params);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Handler function that executes the tool logic: calls client.regions.list(params) and returns JSON-stringified result.
    async (params) => {
      const result = await client.regions.list(params);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    },
  • Input schema definition for 'list_regions' tool using Zod: optional countryId string.
    {
      countryId: z.string().optional().describe('Filter by country UUID'),
    },
Behavior3/5

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

With no annotations, the description indicates a read-only list operation, which is accurate. However, it does not disclose potential issues like pagination or data volume.

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?

Extremely concise and well-structured; a single sentence conveys essential information without waste.

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?

While sufficient for a simple list tool, the description lacks information about the output format and does not help distinguish from sibling tools, making it less complete in context.

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 a clear parameter description. The description adds 'optionally filtered by country', but this does not significantly enhance understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists administrative regions with optional country filtering. However, it does not differentiate from the sibling tool 'get_country_regions', which may serve a similar purpose.

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 on when to use this tool versus alternatives like 'get_region' or 'get_country_regions'. The description only states functionality without 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/930m310n/geomelon-mcp'

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