get_birds_by_region
Retrieve bird species data by specifying a geographic region (e.g., Madagascar, Australia). Input a region to access detailed information on local bird distributions from AviBase MCP Server.
Instructions
Find birds by geographic region or range (e.g., Madagascar, Australia, Africa, etc.).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default: 50) | |
| region | Yes | Geographic region to search for in bird ranges |
Implementation Reference
- mcp-server.js:463-486 (handler)The main handler function that executes the tool logic: extracts 'region' and optional 'limit' from arguments, queries the '/range' API endpoint, and returns a formatted markdown text response listing birds found in the region.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:151-165 (schema)Input schema defining the expected parameters: required 'region' (string) and optional 'limit' (number with default 50).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:148-166 (registration)Tool registration in the listTools response: includes name, description, and input schema.{ 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)Dispatch registration in the CallToolRequestSchema handler switch statement, routing tool calls to the handler method.case 'get_birds_by_region': return await this.handleGetBirdsByRegion(args);