Skip to main content
Glama
knustx

ITIS MCP Server

by knustx

search_by_kingdom

Search the ITIS database for organisms within a specific taxonomic kingdom like Animalia or Plantae. Retrieve paginated results to find species by kingdom classification.

Instructions

Search for organisms within a specific kingdom in ITIS database.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kingdomYesKingdom name (e.g., "Animalia", "Plantae", "Fungi", "Bacteria")
rowsNoNumber of results to return (default: 10)
startNoStarting index for pagination (default: 0)

Implementation Reference

  • MCP tool handler for search_by_kingdom: extracts kingdom, rows, start from arguments, calls itisClient.searchByKingdom, formats and returns the search results as JSON.
    case 'search_by_kingdom': {
      const { kingdom, rows, start } = args as any;
      const result = await itisClient.searchByKingdom(kingdom, { rows, start });
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              kingdom,
              totalResults: result.response.numFound,
              start: result.response.start,
              results: result.response.docs,
            }, null, 2),
          },
        ],
      };
    }
  • src/tools.ts:83-104 (registration)
    Registration of the search_by_kingdom tool in the tools array, including name, description, and input schema. Used by the ListTools handler.
    {
      name: 'search_by_kingdom',
      description: 'Search for organisms within a specific kingdom in ITIS database.',
      inputSchema: {
        type: 'object',
        properties: {
          kingdom: {
            type: 'string',
            description: 'Kingdom name (e.g., "Animalia", "Plantae", "Fungi", "Bacteria")',
          },
          rows: {
            type: 'number',
            description: 'Number of results to return (default: 10)',
          },
          start: {
            type: 'number',
            description: 'Starting index for pagination (default: 0)',
          },
        },
        required: ['kingdom'],
      },
    },
  • Input schema definition for the search_by_kingdom tool, specifying parameters kingdom (required), rows, and start.
    inputSchema: {
      type: 'object',
      properties: {
        kingdom: {
          type: 'string',
          description: 'Kingdom name (e.g., "Animalia", "Plantae", "Fungi", "Bacteria")',
        },
        rows: {
          type: 'number',
          description: 'Number of results to return (default: 10)',
        },
        start: {
          type: 'number',
          description: 'Starting index for pagination (default: 0)',
        },
      },
      required: ['kingdom'],
    },
  • ITISClient helper method that performs the kingdom-specific search by adding a kingdom filter to the general ITIS search.
    async searchByKingdom(kingdom: string, options: Partial<ITISSearchOptions> = {}): Promise<ITISResponse> {
      return this.search({
        ...options,
        filters: {
          ...options.filters,
          kingdom: `"${kingdom}"`
        }
      });
    }

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