Skip to main content
Glama
kshayk

AviBase MCP Server

by kshayk

search_birds

Identify birds by scientific or common name with fuzzy or exact matching support. Retrieve results efficiently from the AviBase MCP Server to explore taxonomic and conservation data.

Instructions

Search for birds by scientific or common name with fuzzy matching support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exactNoWhether to use exact matching (default: false for fuzzy search)
limitNoMaximum number of results to return (default: 20)
queryYesSearch term (bird name to search for)

Implementation Reference

  • The primary handler function implementing the search_birds tool. It destructures input args, constructs the API endpoint for searching birds, fetches data using makeAPIRequest, maps and formats the results into a structured list, and returns a formatted markdown text response.
    async handleSearchBirds(args) { const { query, exact = false, limit = 20 } = args; const endpoint = `/search?q=${encodeURIComponent(query)}&exact=${exact}&limit=${limit}`; const response = await this.makeAPIRequest(endpoint); const results = response.data.map(bird => ({ scientific_name: bird.Scientific_name, common_name: bird.English_name_AviList || 'No common name', family: bird.Family, order: bird.Order, conservation_status: bird.IUCN_Red_List_Category || 'Not assessed', authority: bird.Authority, })); return { content: [ { type: 'text', text: `# Search Results for "${query}" Found **${response.pagination.totalItems}** birds matching "${query}" (showing ${results.length}): ${results.map((bird, i) => `${i + 1}. **${bird.scientific_name}** - Common name: ${bird.common_name} - Family: ${bird.family} - Order: ${bird.order} - Conservation: ${bird.conservation_status} - Authority: ${bird.authority || 'Unknown'}`).join('\n\n')} ${response.pagination.hasNext ? `\n*Note: ${response.pagination.totalItems - results.length} more results available. Use a higher limit to see more.*` : ''}`, }, ], }; }
  • Input schema for the search_birds tool defining the expected parameters: query (required string), exact (optional boolean for exact matching), and limit (optional number for result count).
    inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search term (bird name to search for)', }, exact: { type: 'boolean', description: 'Whether to use exact matching (default: false for fuzzy search)', default: false, }, limit: { type: 'number', description: 'Maximum number of results to return (default: 20)', default: 20, }, }, required: ['query'], },
  • mcp-server.js:80-103 (registration)
    Registration of the search_birds tool within the ListToolsRequestHandler response, specifying name, description, and input schema.
    { name: 'search_birds', description: 'Search for birds by scientific or common name with fuzzy matching support.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search term (bird name to search for)', }, exact: { type: 'boolean', description: 'Whether to use exact matching (default: false for fuzzy search)', default: false, }, limit: { type: 'number', description: 'Maximum number of results to return (default: 20)', default: 20, }, }, required: ['query'], }, },
  • mcp-server.js:291-292 (registration)
    Dispatch registration in the CallToolRequestHandler switch statement that maps the 'search_birds' tool name to its handler function.
    case 'search_birds': return await this.handleSearchBirds(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