Skip to main content
Glama

get_phylogenetic_info

Retrieve evolutionary relationships and phylogenetic data for proteins using a UniProt accession number to analyze protein origins and evolutionary history.

Instructions

Retrieve evolutionary relationships and phylogenetic data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accessionYesUniProt accession number

Implementation Reference

  • The handler function that implements the tool logic: validates input, fetches UniProtKB entry for the accession, extracts and formats phylogenetic information including organism details, lineage, evolutionary origin, and phylogenetic range comments.
    private async handleGetPhylogeneticInfo(args: any) { if (!isValidProteinInfoArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid phylogenetic info arguments'); } try { const response = await this.apiClient.get(`/uniprotkb/${args.accession}`, { params: { format: 'json' }, }); const protein = response.data; const phylogeneticInfo = { accession: protein.primaryAccession, organism: protein.organism, taxonomicLineage: protein.organism?.lineage || [], evolutionaryOrigin: protein.comments?.filter((c: any) => c.commentType === 'EVOLUTIONARY ORIGIN') || [], phylogeneticRange: protein.comments?.filter((c: any) => c.commentType === 'PHYLOGENETIC RANGE') || [], }; return { content: [ { type: 'text', text: JSON.stringify(phylogeneticInfo, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching phylogenetic info: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • src/index.ts:502-511 (registration)
    Tool registration in the ListTools response, including name, description, and input schema definition.
    name: 'get_phylogenetic_info', description: 'Retrieve evolutionary relationships and phylogenetic data', inputSchema: { type: 'object', properties: { accession: { type: 'string', description: 'UniProt accession number' }, }, required: ['accession'], }, },
  • src/index.ts:745-746 (registration)
    Dispatch/registration of the tool handler in the CallToolRequest switch statement.
    case 'get_phylogenetic_info': return this.handleGetPhylogeneticInfo(args);
  • Input validation type guard function used by get_phylogenetic_info and other similar tools to validate the accession parameter.
    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)) );

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