Skip to main content
Glama
kshayk

AviBase MCP Server

by kshayk

search_birds

Find bird species by scientific or common name using fuzzy matching to identify avian data from the AviBase dataset.

Instructions

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

Input Schema

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

Implementation Reference

  • The main handler function that implements the search_birds tool logic. It constructs an API endpoint based on query parameters, fetches data from the bird API, maps the response to a simplified format, and returns a formatted markdown text response listing the matching birds with details.
    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.*` : ''}`, }, ], }; }
  • The input schema definition for the search_birds tool, specifying the expected parameters: query (string, required), exact (boolean, optional), and limit (number, optional). This is returned by the listTools handler.
    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)
    The switch case in the CallToolRequestSchema handler that registers and dispatches calls to the search_birds tool by invoking the handleSearchBirds method.
    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