Skip to main content
Glama
knustx

ITIS MCP Server

by knustx

search_itis

Search the ITIS taxonomic database using SOLR queries to find species by scientific name, TSN, kingdom, or rank with customizable filters and pagination.

Instructions

Search ITIS database using SOLR queries. Supports general search with flexible query parameters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSOLR query string (e.g., "nameWInd:Homo*", "kingdom:Plantae", or "*:*" for all)
startNoStarting index for pagination (default: 0)
rowsNoNumber of results to return (default: 10, max: 100)
sortNoSort order (e.g., "nameWInd asc", "tsn desc")
fieldsNoSpecific fields to return (default: all available fields)
filtersNoAdditional filters as key-value pairs (e.g., {"kingdom": "Animalia", "rank": "Species"})

Implementation Reference

  • MCP tool handler for 'search_itis': calls ITISClient.search with input args and returns formatted JSON response with results.
    case 'search_itis': {
      const result = await itisClient.search(args as any);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              totalResults: result.response.numFound,
              start: result.response.start,
              results: result.response.docs,
            }, null, 2),
          },
        ],
      };
    }
  • Tool registration and input schema definition for 'search_itis'.
    {
      name: 'search_itis',
      description: 'Search ITIS database using SOLR queries. Supports general search with flexible query parameters.',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'SOLR query string (e.g., "nameWInd:Homo*", "kingdom:Plantae", or "*:*" for all)',
          },
          start: {
            type: 'number',
            description: 'Starting index for pagination (default: 0)',
          },
          rows: {
            type: 'number',
            description: 'Number of results to return (default: 10, max: 100)',
          },
          sort: {
            type: 'string',
            description: 'Sort order (e.g., "nameWInd asc", "tsn desc")',
          },
          fields: {
            type: 'array',
            items: { type: 'string' },
            description: 'Specific fields to return (default: all available fields)',
          },
          filters: {
            type: 'object',
            additionalProperties: { type: 'string' },
            description: 'Additional filters as key-value pairs (e.g., {"kingdom": "Animalia", "rank": "Species"})',
          },
        },
      },
    },
  • Core helper method ITISClient.search() that constructs SOLR query parameters and fetches data from ITIS API.
    async search(options: ITISSearchOptions = {}): Promise<ITISResponse> {
      const params = new URLSearchParams();
      
      // Default parameters
      params.append('wt', 'json');
      params.append('indent', 'true');
      
      // Query parameter
      if (options.query) {
        params.append('q', options.query);
      } else {
        params.append('q', '*:*');
      }
      
      // Pagination
      if (options.start !== undefined) {
        params.append('start', options.start.toString());
      }
      if (options.rows !== undefined) {
        params.append('rows', options.rows.toString());
      } else {
        params.append('rows', '10'); // Default to 10 rows
      }
      
      // Sorting
      if (options.sort) {
        params.append('sort', options.sort);
      }
      
      // Field selection
      if (options.fields && options.fields.length > 0) {
        params.append('fl', options.fields.join(','));
      }
      
      // Filters
      if (options.filters) {
        Object.entries(options.filters).forEach(([key, value]) => {
          params.append('fq', `${key}:${value}`);
        });
      }
      
      const url = `${this.baseUrl}?${params.toString()}`;
      
      try {
        const response = await fetch(url);
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
        
        const data = await response.json() as ITISResponse;
        return data;
      } catch (error) {
        throw new Error(`Failed to fetch ITIS data: ${error}`);
      }
    }
  • Type definition for search options matching the tool input schema.
    export interface ITISSearchOptions {
      query?: string;
      start?: number;
      rows?: number;
      sort?: string;
      fields?: string[];
      filters?: Record<string, string>;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'flexible query parameters' and 'general search,' but fails to describe critical behaviors: it doesn't specify if this is a read-only operation, what the output format looks like (especially without an output schema), potential rate limits, authentication needs, or error handling. For a search tool with 6 parameters and no annotations, this is a significant gap in transparency.

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 concise with two sentences that efficiently state the tool's function and key feature ('flexible query parameters'). There's no unnecessary repetition or fluff, and it's front-loaded with the core purpose. However, it could be slightly more structured by explicitly mentioning it's a general-purpose search compared to siblings.

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 (6 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It doesn't explain the return format, error conditions, or how results are structured, which is critical for a search tool. Without annotations or output schema, the agent lacks guidance on what to expect, making it inadequate for informed tool selection and invocation.

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?

The description adds minimal value beyond the input schema, which has 100% coverage with detailed parameter descriptions. It vaguely references 'flexible query parameters' but doesn't explain how parameters interact (e.g., that 'filters' might override parts of 'query') or provide usage examples beyond what's in the schema. Since schema coverage is high, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Search ITIS database using SOLR queries.' It specifies the verb ('Search'), resource ('ITIS database'), and method ('SOLR queries'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'search_by_scientific_name' or 'search_by_kingdom', which are more specific search methods.

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 minimal usage guidance with 'Supports general search with flexible query parameters,' implying this is a broad, flexible tool. However, it doesn't specify when to use this tool versus more targeted sibling tools (e.g., 'search_by_scientific_name' for exact matches or 'search_by_kingdom' for kingdom-based searches), nor does it mention exclusions or prerequisites. This lack of explicit comparison leaves the agent guessing about the best tool choice.

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/knustx/itis-mcp-server'

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