Skip to main content
Glama
kshayk

AviBase MCP Server

by kshayk

get_conservation_status

Retrieve bird species data by IUCN Red List conservation status (e.g., CR, EN, VU) from the AviBase MCP Server. Define category and limit results for targeted conservation analysis.

Instructions

Get birds by IUCN Red List conservation status (CR=Critically Endangered, EN=Endangered, VU=Vulnerable, EX=Extinct, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesIUCN Red List category
limitNoMaximum number of results to return (default: 50)

Implementation Reference

  • The handler function that implements the tool logic: destructures args for category and limit, calls the API endpoint `/conservation/{category}`, maps IUCN codes to full names, and returns a formatted markdown text response listing matching bird species with details.
    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:128-147 (registration)
    The tool registration entry in the ListTools response, defining the tool name, description, and input schema with required 'category' (IUCN enum) and optional 'limit'.
    { 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'], }, },
  • Input schema definition for the tool, specifying parameters and validation rules including enum for conservation categories.
    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:297-298 (registration)
    Dispatch case in the CallToolRequestHandler switch statement that routes calls to the specific handler function.
    case 'get_conservation_status': return await this.handleGetConservationStatus(args);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kshayk/avibase-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server