Skip to main content
Glama

get_taxonomy_info

Retrieve detailed taxonomic information for organisms using UniProt accession numbers to identify species classification and relationships.

Instructions

Detailed taxonomic information for organisms

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number

Implementation Reference

  • The handler function for 'get_taxonomy_info' that validates input, fetches protein data from UniProt API, extracts taxonomy details (organism, taxonomy ID, names, lineage), and returns formatted JSON.
    private async handleGetTaxonomyInfo(args: any) {
      if (!isValidProteinInfoArgs(args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Invalid taxonomy info arguments');
      }
    
      try {
        const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, {
          params: { format: 'json' },
        });
    
        const protein = response.data;
        const taxonomyInfo = {
          accession: protein.primaryAccession,
          organism: protein.organism,
          taxonomyId: protein.organism?.taxonId,
          scientificName: protein.organism?.scientificName,
          commonName: protein.organism?.commonName,
          lineage: protein.organism?.lineage || [],
          taxonomicDivision: protein.organism?.lineage?.[0] || 'Unknown',
        };
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(taxonomyInfo, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error fetching taxonomy info: ${error instanceof Error ? error.message : 'Unknown error'}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema definition for the 'get_taxonomy_info' tool, specifying the required 'accession' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        accession: { type: 'string', description: 'UniProt accession number' },
      },
      required: ['accession'],
  • src/index.ts:784-785 (registration)
    Registration/dispatch in the CallToolRequestHandler switch statement that calls the handler for 'get_taxonomy_info'.
    case 'get_taxonomy_info':
      return this.handleGetTaxonomyInfo(args);
  • src/index.ts:709-719 (registration)
    Tool registration in ListToolsRequestHandler, defining name, description, and input schema for 'get_taxonomy_info'.
    {
      name: 'get_taxonomy_info',
      description: 'Detailed taxonomic information for organisms',
      inputSchema: {
        type: 'object',
        properties: {
          accession: { type: 'string', description: 'UniProt accession number' },
        },
        required: ['accession'],
      },
    },
  • Validation helper function used by 'get_taxonomy_info' handler to check input arguments.
    const isValidProteinInfoArgs = (
      args: any
    ): args is { accession: string; format?: string } => {
      return (
        typeof args === 'object' &&
        args !== null &&
        typeof args.accession === 'string' &&
        args.accession.length > 0 &&
        (args.format === undefined || ['json', 'tsv', 'fasta', 'xml'].includes(args.format))
      );
    };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool provides 'detailed taxonomic information' but doesn't describe what that includes (e.g., lineage, ranks, sources), whether it's a read-only operation, potential rate limits, or error handling. The description is too vague to inform the agent adequately about behavioral traits beyond the basic purpose.

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 a single, efficient sentence: 'Detailed taxonomic information for organisms'. It's front-loaded with the core purpose and avoids unnecessary words. However, it could be more structured by including key details like the resource type or usage context, but it earns its place by being clear and concise.

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 of a tool with one parameter but no annotations or output schema, the description is incomplete. It doesn't explain what 'detailed taxonomic information' entails, how it's returned, or any behavioral aspects. For a tool that likely returns structured data, the description should provide more context to compensate for the lack of output schema and annotations.

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 input schema has 100% description coverage, with the parameter 'accession' clearly documented as a 'UniProt accession number'. The description doesn't add any meaning beyond this, as it doesn't explain parameter usage or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the schema handles the parameter documentation effectively.

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

Purpose3/5

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

The description 'Detailed taxonomic information for organisms' states what the tool does but is vague about the specific resource and scope. It mentions 'taxonomic information' but doesn't specify that it retrieves this for proteins via UniProt accession numbers, unlike siblings like 'get_phylogenetic_info' or 'search_by_taxonomy' which might overlap in purpose. It distinguishes minimally by focusing on 'detailed' information but lacks explicit differentiation.

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 no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites like needing a UniProt accession, nor does it compare to siblings such as 'get_phylogenetic_info' or 'search_by_taxonomy', which might offer similar or related data. Usage is implied only by the parameter, but no explicit context or exclusions are stated.

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/Augmented-Nature/UniProt-MCP-Server'

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