get_region_info
Retrieve detailed information about eBird regions including boundaries, hierarchical structure, and formatted names to support bird observation data analysis.
Instructions
Get information about a region including name, bounds, and parent hierarchy.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region_code | Yes | Country, subnational1, subnational2, or location code | |
| region_name_format | No | Name format | full |
| delim | No | Delimiter for name elements | , |
Implementation Reference
- src/index.ts:539-545 (handler)Handler function that fetches region information via makeRequest and returns it as a JSON-formatted text content block.async (args) => { const result = await makeRequest(`/ref/region/info/${args.region_code}`, { regionNameFormat: args.region_name_format, delim: args.delim, }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:534-538 (schema)Zod schema defining input parameters for the get_region_info tool: region_code (required), region_name_format (optional enum), delim (optional string).{ region_code: z.string().describe("Country, subnational1, subnational2, or location code"), region_name_format: z.enum(["detailed", "detailednoqual", "full", "namequal", "nameonly", "revdetailed"]).default("full").describe("Name format"), delim: z.string().default(", ").describe("Delimiter for name elements"), },
- src/index.ts:532-546 (registration)Registration of the get_region_info tool using server.tool, including name, description, schema, and handler function."get_region_info", "Get information about a region including name, bounds, and parent hierarchy.", { region_code: z.string().describe("Country, subnational1, subnational2, or location code"), region_name_format: z.enum(["detailed", "detailednoqual", "full", "namequal", "nameonly", "revdetailed"]).default("full").describe("Name format"), delim: z.string().default(", ").describe("Delimiter for name elements"), }, async (args) => { const result = await makeRequest(`/ref/region/info/${args.region_code}`, { regionNameFormat: args.region_name_format, delim: args.delim, }); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } );