get_birds_by_region
Find bird species by geographic region using the AviBase dataset. Enter a region name to retrieve birds found in that area.
Instructions
Find birds by geographic region or range (e.g., Madagascar, Australia, Africa, etc.).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | Yes | Geographic region to search for in bird ranges | |
| limit | No | Maximum number of results to return (default: 50) |
Implementation Reference
- mcp-server.js:463-486 (handler)The handler function that executes the tool logic: destructures region and limit args, calls the /range API endpoint, and returns a formatted text response with bird data.async handleGetBirdsByRegion(args) { const { region, limit = 50 } = args; const endpoint = `/range?region=${encodeURIComponent(region)}&limit=${limit}`; const response = await this.makeAPIRequest(endpoint); return { content: [ { type: 'text', text: `# Birds of ${region} š **${response.pagination.totalItems}** bird records found in ${region} **Regional species:** ${response.data.slice(0, 15).map((bird, i) => `${i + 1}. **${bird.Scientific_name}** - Common name: ${bird.English_name_AviList || 'No common name'} - Family: ${bird.Family} - Conservation: ${bird.IUCN_Red_List_Category || 'Not assessed'}`).join('\n\n')} ${response.pagination.hasNext ? `\n*Note: Showing first ${response.data.length} of ${response.pagination.totalItems} total records for this region.*` : ''}`, }, ], }; }
- mcp-server.js:148-166 (schema)The input schema and metadata for the get_birds_by_region tool, registered in the ListTools response.{ name: 'get_birds_by_region', description: 'Find birds by geographic region or range (e.g., Madagascar, Australia, Africa, etc.).', inputSchema: { type: 'object', properties: { region: { type: 'string', description: 'Geographic region to search for in bird ranges', }, limit: { type: 'number', description: 'Maximum number of results to return (default: 50)', default: 50, }, }, required: ['region'], }, },
- mcp-server.js:300-301 (registration)The switch case registration that dispatches tool calls to the handleGetBirdsByRegion handler.case 'get_birds_by_region': return await this.handleGetBirdsByRegion(args);