Skip to main content
Glama

get_brain_expression

Retrieve brain region expression data for proteins to analyze tissue-specific protein distribution using Human Protein Atlas information.

Instructions

Get brain region expression data for a protein

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
geneYesGene symbol
formatNoOutput format (default: json)

Implementation Reference

  • The main handler function for the 'get_brain_expression' tool. Validates input using isValidGeneArgs, fetches brain expression data via fetchBrainExpression, and returns formatted JSON response or error.
    private async handleGetBrainExpression(args: any) { if (!isValidGeneArgs(args)) { throw new McpError(ErrorCode.InvalidParams, 'Invalid gene arguments'); } try { const result = await this.fetchBrainExpression(args.gene); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching brain expression: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], isError: true, }; } }
  • src/index.ts:522-533 (registration)
    Tool registration in the listTools response, including name, description, and input schema definition.
    { name: 'get_brain_expression', description: 'Get brain region expression data for a protein', inputSchema: { type: 'object', properties: { gene: { type: 'string', description: 'Gene symbol' }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, }, required: ['gene'], }, },
  • Input schema defining parameters for the get_brain_expression tool: required 'gene' string and optional 'format'.
    inputSchema: { type: 'object', properties: { gene: { type: 'string', description: 'Gene symbol' }, format: { type: 'string', enum: ['json', 'tsv'], description: 'Output format (default: json)' }, }, required: ['gene'], },
  • Helper method that performs the API query to Human Protein Atlas with specific columns for brain tissue expression data.
    private async fetchBrainExpression(gene: string): Promise<any> { const columns = ['g', 'eg', 'rnabrs', 'rnabrd', 'rnabrss', 'brain_RNA_amygdala', 'brain_RNA_cerebellum', 'brain_RNA_cerebral_cortex', 'brain_RNA_hippocampal_formation', 'brain_RNA_hypothalamus']; return this.searchProteins(gene, 'json', columns, 1); }
  • Input validation helper function used by get_brain_expression and similar tools to validate gene and optional format arguments.
    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)) ); };

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