Skip to main content
Glama

get_gene_info

Retrieve detailed gene information including expression data and associations from the GTEx Portal for genomics research and analysis.

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

  • Main handler function for get_gene_info tool. Validates input geneIds array (up to 50), calls apiClient.getGenes(), processes results into formatted markdown output with genomic locations, annotations, and descriptions for each gene.
    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()
        }]
      };
    }
  • src/index.ts:722-726 (registration)
    Tool dispatch/registration in the main CallToolRequestSchema handler. Routes 'get_gene_info' calls to referenceHandlers.getGeneInfo, mapping input args.gencodeId or geneSymbol to geneIds array.
    if (name === "get_gene_info") {
      return await referenceHandlers.getGeneInfo({
        geneIds: args?.gencodeId ? [args.gencodeId] : (args?.geneSymbol ? [args.geneSymbol] : [])
      });
    }
  • Tool schema definition in ListToolsRequestSchema response. Specifies name, description, and inputSchema accepting optional gencodeId or geneSymbol (no required fields listed, but handler expects one).
      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)"
          }
        }
      }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves 'detailed information' but doesn't specify what that includes (e.g., genomic coordinates, functional annotations), whether it's a read-only operation, or any limitations like rate limits or authentication needs, leaving significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that directly states the tool's purpose without unnecessary words. It efficiently conveys the core function, earning full marks for conciseness and structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of gene information retrieval, lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'detailed information' entails, potential response formats, or how to handle ambiguous inputs, making it insufficient for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with clear documentation of 'gencodeId' and 'geneSymbol' parameters. The description adds no additional parameter semantics beyond what the schema provides, such as usage examples or constraints, so it meets the baseline for adequate but unenhanced coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('detailed information about a specific gene'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_gene_expression' or 'search_genes', which could provide overlapping or related information about genes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'search_genes' (for broader queries) and 'get_gene_expression' (for expression data), the agent must infer usage context without explicit direction, leading to potential confusion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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