search_by_rank
Find organisms in the ITIS database by specifying taxonomic rank such as Species, Genus, or Family to retrieve relevant biological classifications.
Instructions
Search for organisms by their taxonomic rank in ITIS database.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rank | Yes | Taxonomic rank (e.g., "Species", "Genus", "Family", "Order", "Class", "Phylum", "Kingdom") | |
| rows | No | Number of results to return (default: 10) | |
| start | No | Starting index for pagination (default: 0) |
Implementation Reference
- src/itis-client.ts:177-185 (handler)Core implementation of search by taxonomic rank: calls base search method with filter rank:"${rank}"async searchByTaxonomicRank(rank: string, options: Partial<ITISSearchOptions> = {}): Promise<ITISResponse> { return this.search({ ...options, filters: { ...options.filters, rank: `"${rank}"` } }); }
- src/tools.ts:342-358 (handler)MCP CallToolRequestSchema handler case for 'search_by_rank': extracts parameters, calls ITISClient method, returns formatted JSON responsecase 'search_by_rank': { const { rank, rows, start } = args as any; const result = await itisClient.searchByTaxonomicRank(rank, { rows, start }); return { content: [ { type: 'text', text: JSON.stringify({ rank, totalResults: result.response.numFound, start: result.response.start, results: result.response.docs, }, null, 2), }, ], }; }
- src/tools.ts:105-126 (schema)Input schema and metadata for the search_by_rank tool, included in the exported tools array{ name: 'search_by_rank', description: 'Search for organisms by their taxonomic rank in ITIS database.', inputSchema: { type: 'object', properties: { rank: { type: 'string', description: 'Taxonomic rank (e.g., "Species", "Genus", "Family", "Order", "Class", "Phylum", "Kingdom")', }, rows: { type: 'number', description: 'Number of results to return (default: 10)', }, start: { type: 'number', description: 'Starting index for pagination (default: 0)', }, }, required: ['rank'], }, },
- src/index.ts:22-22 (registration)Call to setupToolHandlers which registers ListToolsRequest and CallToolRequest handlers, making search_by_rank available via the tools array and switch dispatchersetupToolHandlers(server, itisClient);