Skip to main content
Glama

get_gene_info

Retrieve detailed gene information including expression and variant data from the GTEx Portal across 54 human tissue types using gene ID or symbol.

Instructions

Get detailed information about a specific gene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gencodeIdNoGENCODE gene ID (e.g., ENSG00000223972.5)
geneSymbolNoGene symbol (alternative to gencodeId)

Implementation Reference

  • The core handler function in ReferenceHandlers class that fetches detailed gene information (location, annotation, description) from GTEx API for given gene IDs and formats as structured markdown output.
    async getGeneInfo(args: any) { if (!args.geneIds || !Array.isArray(args.geneIds) || args.geneIds.length === 0) { throw new Error('geneIds parameter is required and must be a non-empty array of gene IDs'); } if (args.geneIds.length > 50) { return { content: [{ type: "text", text: "Maximum 50 genes can be processed at once. Please reduce the number of genes." }] }; } const result = await this.apiClient.getGenes( args.geneIds, args.gencodeVersion || 'v26', args.genomeBuild || 'GRCh38/hg38' ); if (result.error) { return { content: [{ type: "text", text: `Error retrieving gene information: ${result.error}` }], isError: true }; } const genes = result.data || []; if (genes.length === 0) { return { content: [{ type: "text", text: `No genes found for the specified IDs: ${args.geneIds.join(', ')}` }] }; } let output = `**Gene Information (${genes.length} genes)**\n`; output += `Genome: ${genes[0]?.genomeBuild}, GENCODE: ${genes[0]?.gencodeVersion}\n\n`; genes.forEach((gene, index) => { output += `### ${index + 1}. ${gene.geneSymbol} (${gene.gencodeId})\n`; output += `**Genomic Location:**\n`; output += ` • Chromosome: ${gene.chromosome}\n`; output += ` • Position: ${gene.start.toLocaleString()} - ${gene.end.toLocaleString()}\n`; output += ` • Strand: ${gene.strand}\n`; output += ` • Length: ${(gene.end - gene.start + 1).toLocaleString()} bp\n`; output += ` • TSS: ${gene.tss.toLocaleString()}\n\n`; output += `**Gene Annotation:**\n`; output += ` • Type: ${gene.geneType}\n`; output += ` • Status: ${gene.geneStatus}\n`; output += ` • Source: ${gene.dataSource}\n`; if (gene.entrezGeneId) { output += ` • Entrez Gene ID: ${gene.entrezGeneId}\n`; } if (gene.description) { output += `\n**Description:**\n${gene.description}\n`; } output += '\n'; }); return { content: [{ type: "text", text: output.trim() }] }; }
  • Input schema definition for the get_gene_info tool, defining parameters gencodeId (primary) and geneSymbol (alternative). No required fields specified in schema but handled in code.
    { name: "get_gene_info", description: "Get detailed information about a specific gene", inputSchema: { type: "object", properties: { gencodeId: { type: "string", description: "GENCODE gene ID (e.g., ENSG00000223972.5)" }, geneSymbol: { type: "string", description: "Gene symbol (alternative to gencodeId)" } } } },
  • src/index.ts:722-726 (registration)
    Dispatch logic in the main CallToolRequestHandler that maps 'get_gene_info' tool calls to referenceHandlers.getGeneInfo, converting input args to geneIds array.
    if (name === "get_gene_info") { return await referenceHandlers.getGeneInfo({ geneIds: args?.gencodeId ? [args.gencodeId] : (args?.geneSymbol ? [args.geneSymbol] : []) }); }

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

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