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
| Name | Required | Description | Default |
|---|---|---|---|
| countryId | No | Filter 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) }] }; }, ); - src/server.ts:174-177 (handler)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) }] }; }, - src/server.ts:171-173 (schema)Input schema definition for 'list_regions' tool using Zod: optional countryId string.
{ countryId: z.string().optional().describe('Filter by country UUID'), },