Skip to main content
Glama

get_protein_info

Retrieve detailed protein information from the Human Protein Atlas by entering a gene symbol. Obtain data on expression, subcellular localization, and pathology in multiple output formats.

Instructions

Get detailed information for a specific protein by gene symbol

Input Schema

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

Implementation Reference

  • The primary handler function for the 'get_protein_info' tool. It validates the input arguments, fetches protein data for the given gene symbol using the helper fetchProteinData, formats the result as JSON text, and returns it in the MCP response format. Handles errors gracefully.
    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 schema defining the parameters for the get_protein_info tool: requires 'gene' string, optional 'format' enum.
    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:460-470 (registration)
    Tool registration in the MCP tools list, including name, description, and input schema.
    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 the switch statement of the CallToolRequestHandler, routing calls to the handler.
    case 'get_protein_info': return this.handleGetProteinInfo(args);
  • Helper function that fetches basic protein data by gene using the general searchProteins method with default columns and maxResults=1.
    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