Skip to main content
Glama

get_hierarchy

Retrieve the complete taxonomic hierarchy for a specified Taxonomic Serial Number (TSN) from the Integrated Taxonomic Information System database.

Instructions

Get the complete taxonomic hierarchy for a given TSN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsnYesTaxonomic Serial Number (TSN) to get hierarchy for

Implementation Reference

  • The MCP tool handler for 'get_hierarchy'. Extracts 'tsn' argument, invokes ITISClient.getHierarchy(tsn), and formats the response as JSON text content.
    case 'get_hierarchy': { const { tsn } = args as any; const result = await itisClient.getHierarchy(tsn); return { content: [ { type: 'text', text: JSON.stringify({ tsn, hierarchy: result.response.docs, }, null, 2), }, ], }; }
  • src/tools.ts:127-140 (registration)
    Tool registration definition including name, description, and input schema for 'get_hierarchy' in the tools array used by ListToolsRequestHandler.
    { name: 'get_hierarchy', description: 'Get the complete taxonomic hierarchy for a given TSN.', inputSchema: { type: 'object', properties: { tsn: { type: 'string', description: 'Taxonomic Serial Number (TSN) to get hierarchy for', }, }, required: ['tsn'], }, },
  • Core helper method in ITISClient that implements getHierarchy by performing a targeted SOLR search for the TSN with hierarchy-relevant fields.
    async getHierarchy(tsn: string): Promise<ITISResponse> { return this.search({ query: `tsn:${tsn}`, fields: ['tsn', 'nameWInd', 'kingdom', 'phylum', 'class', 'order', 'family', 'genus', 'species', 'rank', 'phyloSort'] }); }

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