get_conservation_status
Retrieve bird species by IUCN Red List conservation status categories such as Critically Endangered, Endangered, or Vulnerable to support biodiversity research and conservation planning.
Instructions
Get birds by IUCN Red List conservation status (CR=Critically Endangered, EN=Endangered, VU=Vulnerable, EX=Extinct, etc.).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | IUCN Red List category | |
| limit | No | Maximum number of results to return (default: 50) |
Implementation Reference
- mcp-server.js:427-461 (handler)The main handler function that implements the core logic for the 'get_conservation_status' tool. It makes an API request to fetch birds by IUCN category, maps category codes to full names, and formats a markdown response listing species with common names, families, and range info.async handleGetConservationStatus(args) { const { category, limit = 50 } = args; const endpoint = `/conservation/${category}?limit=${limit}`; const response = await this.makeAPIRequest(endpoint); const categoryNames = { 'CR': 'Critically Endangered', 'EN': 'Endangered', 'VU': 'Vulnerable', 'NT': 'Near Threatened', 'LC': 'Least Concern', 'DD': 'Data Deficient', 'EX': 'Extinct', 'EW': 'Extinct in the Wild' }; return { content: [ { type: 'text', text: `# ${categoryNames[category] || category} Species šØ **${response.pagination.totalItems}** species with IUCN status: **${category}** **Species list:** ${response.data.map((bird, i) => `${i + 1}. **${bird.Scientific_name}** - Common name: ${bird.English_name_AviList || 'No common name'} - Family: ${bird.Family} - Range: ${bird.Range ? bird.Range.substring(0, 100) + '...' : 'No range data'}`).join('\n\n')} ${response.pagination.hasNext ? `\n*Note: Showing first ${response.data.length} of ${response.pagination.totalItems} total species.*` : ''}`, }, ], }; }
- mcp-server.js:131-146 (schema)Input schema for the tool defining the required 'category' parameter (IUCN enum) and optional 'limit' for result count.inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'IUCN Red List category', enum: ['CR', 'EN', 'VU', 'NT', 'LC', 'DD', 'EX', 'EW'], }, limit: { type: 'number', description: 'Maximum number of results to return (default: 50)', default: 50, }, }, required: ['category'], },
- mcp-server.js:128-147 (registration)Tool registration entry returned by ListToolsRequestHandler, including name, description, and input schema.{ name: 'get_conservation_status', description: 'Get birds by IUCN Red List conservation status (CR=Critically Endangered, EN=Endangered, VU=Vulnerable, EX=Extinct, etc.).', inputSchema: { type: 'object', properties: { category: { type: 'string', description: 'IUCN Red List category', enum: ['CR', 'EN', 'VU', 'NT', 'LC', 'DD', 'EX', 'EW'], }, limit: { type: 'number', description: 'Maximum number of results to return (default: 50)', default: 50, }, }, required: ['category'], }, },