Skip to main content
Glama

get_protein_info

Retrieve detailed protein data including expression, localization, and pathology information from the Human Protein Atlas using gene symbols.

Instructions

Get detailed information for a specific protein by gene symbol

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geneYesGene symbol (e.g., BRCA1, TP53)
formatNoOutput format (default: json)

Implementation Reference

  • Main handler function for 'get_protein_info' tool that validates input, fetches protein data, and returns JSON response or error.
    private async handleGetProteinInfo(args: any) { if (!isValidGeneArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid gene arguments'); } try { const result = await this.fetchProteinData(args.gene, args.format || 'json'); return { content: [ { type: 'text', text: typeof result === 'object' ? JSON.stringify(result, null, 2) : String(result), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching protein info: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • Input validation type guard 'isValidGeneArgs' used by the handler to check gene symbol and format parameters.
    const isValidGeneArgs = ( args: any ): args is { gene: string; format?: string } => { return ( typeof args === 'object' && args !== null && typeof args.gene === 'string' && args.gene.length > 0 && (args.format === undefined || ['json', 'tsv', 'xml', 'trig'].includes(args.format)) ); };
  • src/index.ts:459-470 (registration)
    Tool registration in ListToolsRequestSchema handler, including name, description, and input schema definition.
    { name: 'get_protein_info', description: 'Get detailed information for a specific protein by gene symbol', inputSchema: { type: 'object', properties: { gene: { type: 'string', description: 'Gene symbol (e.g., BRCA1, TP53)' }, format: { type: 'string', enum: ['json', 'tsv', 'xml', 'trig'], description: 'Output format (default: json)' }, }, required: ['gene'], }, },
  • src/index.ts:671-672 (registration)
    Dispatch registration in CallToolRequestSchema switch statement routing to the handler.
    case 'get_protein_info': return this.handleGetProteinInfo(args);
  • Core helper method called by handler to fetch protein data via API search.
    private async fetchProteinData(gene: string, format: string = 'json'): Promise<any> { // Use searchProteins method which properly handles columns parameter return this.searchProteins(gene, format, undefined, 1); }

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/ProteinAtlas-MCP-Server'

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