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
| Name | Required | Description | Default |
|---|---|---|---|
| kingdom | Yes | Kingdom name (e.g., "Animalia", "Plantae", "Fungi", "Bacteria") | |
| rows | No | Number of results to return (default: 10) | |
| start | No | Starting index for pagination (default: 0) |
Implementation Reference
- src/tools.ts:324-340 (handler)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'], }, },
- src/tools.ts:86-103 (schema)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'], },
- src/itis-client.ts:167-175 (helper)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}"` } }); }