Skip to main content
Glama
kshayk

AviBase MCP Server

by kshayk

custom_bird_query

Query bird data with multiple filters for advanced analysis, including taxonomic classifications and conservation statuses from the AviBase dataset.

Instructions

Perform complex queries with multiple filters for advanced bird data analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filtersYesObject containing field-value pairs for filtering
limitNoMaximum number of results to return (default: 50)

Implementation Reference

  • The handler function that executes the custom_bird_query tool. It extracts filters and limit from args, makes a POST request to the '/custom' API endpoint with the parameters, formats a descriptive response with results summary and list of matching birds.
      async handleCustomBirdQuery(args) {
        const { filters, limit = 50 } = args;
        const endpoint = `/custom`;
        const response = await this.makeAPIRequest(endpoint, {
          method: 'POST',
          body: JSON.stringify({ filters, limit }),
        });
    
        const filterDescription = Object.entries(filters)
          .map(([key, value]) => `${key}: ${Array.isArray(value) ? value.join(', ') : value}`)
          .join(', ');
    
        return {
          content: [
            {
              type: 'text',
              text: `# Custom Query Results
    
    🎯 **Query Filters:** ${filterDescription}
    📊 **Results:** ${response.pagination.totalItems} birds found
    
    ${response.data.map((bird, i) => `${i + 1}. **${bird.Scientific_name}**
       - Common name: ${bird.English_name_AviList || 'No common name'}
       - Family: ${bird.Family}
       - Order: ${bird.Order}
       - Conservation: ${bird.IUCN_Red_List_Category || 'Not assessed'}
       - Range: ${bird.Range ? bird.Range.substring(0, 80) + '...' : 'No range data'}`).join('\n\n')}
    
    ${response.pagination.hasNext ? `\n*Note: Showing first ${response.data.length} of ${response.pagination.totalItems} total matching records.*` : ''}`,
            },
          ],
        };
      }
  • Input schema definition for the custom_bird_query tool, specifying filters object with possible fields like Family, Order, etc., and optional limit.
    inputSchema: {
      type: 'object',
      properties: {
        filters: {
          type: 'object',
          description: 'Object containing field-value pairs for filtering',
          properties: {
            Family: { type: 'string' },
            Order: { type: 'string' },
            IUCN_Red_List_Category: { 
              type: 'array',
              items: { type: 'string' }
            },
            Taxon_rank: { type: 'string' },
          },
        },
        limit: {
          type: 'number',
          description: 'Maximum number of results to return (default: 50)',
          default: 50,
        },
      },
      required: ['filters'],
    },
  • mcp-server.js:231-258 (registration)
    Tool registration in the ListTools response, defining name, description, and inputSchema for custom_bird_query.
    {
      name: 'custom_bird_query',
      description: 'Perform complex queries with multiple filters for advanced bird data analysis.',
      inputSchema: {
        type: 'object',
        properties: {
          filters: {
            type: 'object',
            description: 'Object containing field-value pairs for filtering',
            properties: {
              Family: { type: 'string' },
              Order: { type: 'string' },
              IUCN_Red_List_Category: { 
                type: 'array',
                items: { type: 'string' }
              },
              Taxon_rank: { type: 'string' },
            },
          },
          limit: {
            type: 'number',
            description: 'Maximum number of results to return (default: 50)',
            default: 50,
          },
        },
        required: ['filters'],
      },
    },
  • mcp-server.js:315-316 (registration)
    Dispatch case in the CallToolRequest handler switch statement that routes custom_bird_query calls to the handleCustomBirdQuery method.
    case 'custom_bird_query':
      return await this.handleCustomBirdQuery(args);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'complex queries' and 'advanced analysis,' but lacks details on permissions, rate limits, response format, or error handling. This is inadequate for a tool with nested parameters and no output schema, leaving key operational traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that conveys the core function without unnecessary words. It is front-loaded with the main action ('Perform complex queries'), making it easy to parse, though it could be slightly more structured for clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (nested objects, no output schema) and lack of annotations, the description is incomplete. It doesn't explain what 'advanced analysis' entails, how results are returned, or any behavioral constraints, leaving significant gaps for effective tool use in context with siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the two parameters ('filters' and 'limit'). The description adds no additional meaning beyond implying 'multiple filters,' which is already clear from the schema. This meets the baseline for high coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool performs 'complex queries with multiple filters for advanced bird data analysis,' which indicates a querying function but is somewhat vague. It specifies the resource ('bird data') and mentions filtering, but doesn't clearly differentiate from sibling tools like 'search_birds' or 'get_birds_by_taxonomy,' leaving ambiguity about its unique role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'search_birds' and 'get_birds_by_taxonomy,' it fails to specify scenarios, prerequisites, or exclusions, offering only a general statement about 'advanced analysis' without practical context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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