Skip to main content
Glama

get_multi_tissue_eqtls

Retrieve multi-tissue eQTL meta-analysis results from GTEx data to identify gene expression associations across human tissues using GENCODE gene IDs.

Instructions

Get multi-tissue eQTL meta-analysis results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gencodeIdYesGENCODE gene ID (e.g., ENSG00000223972.5)
datasetIdNoGTEx dataset ID (default: gtex_v8)gtex_v8

Implementation Reference

  • The main handler function that implements the tool logic for get_multi_tissue_eqtls. It validates input, calls the API client, processes the multi-tissue eQTL meta-analysis results, and formats them into a structured Markdown response.
    async getMultiTissueEQTLs(args: any) {
      if (!args.geneId || typeof args.geneId !== 'string') {
        throw new Error('geneId parameter is required and must be a gene ID string');
      }
    
      const result = await this.apiClient.getMultiTissueEQTLs(
        args.geneId,
        args.variantId,
        args.datasetId || 'gtex_v8'
      );
    
      if (result.error) {
        return {
          content: [{
            type: "text",
            text: `Error retrieving multi-tissue eQTL data: ${result.error}`
          }],
          isError: true
        };
      }
    
      const metaResults = result.data || [];
      if (metaResults.length === 0) {
        return {
          content: [{
            type: "text",
            text: `No multi-tissue eQTL results found for gene: ${args.geneId}`
          }]
        };
      }
    
      let output = `**Multi-Tissue eQTL Meta-Analysis**\n`;
      output += `Gene: ${args.geneId}\n`;
      output += `Dataset: ${metaResults[0]?.datasetId}\n`;
      output += `Results: ${metaResults.length} gene-variant combinations\n\n`;
    
      metaResults.forEach((result, index) => {
        output += `### Result ${index + 1}: ${result.variantId}\n`;
        output += `**Meta p-value:** ${result.metaP.toExponential(2)}\n`;
        output += `**Gene:** ${result.gencodeId}\n\n`;
    
        if (result.tissues && Object.keys(result.tissues).length > 0) {
          // Sort tissues by m-value (posterior probability)
          const tissueEntries = Object.entries(result.tissues);
          tissueEntries.sort((a, b) => b[1].mValue - a[1].mValue);
    
          output += `**Tissue-Specific Results:**\n`;
          const topTissues = tissueEntries.slice(0, 10); // Show top 10 tissues
          
          topTissues.forEach(([tissueName, tissueData]) => {
            const tissueDisplayName = this.getTissueDisplayName(tissueName);
            output += `  **${tissueDisplayName}**:\n`;
            output += `    • m-value (posterior prob): ${tissueData.mValue.toFixed(4)}\n`;
            output += `    • p-value: ${tissueData.pValue.toExponential(2)}\n`;
            output += `    • NES: ${tissueData.nes.toFixed(3)}\n`;
            output += `    • Standard error: ${tissueData.se.toFixed(4)}\n`;
          });
    
          if (tissueEntries.length > 10) {
            output += `  ... and ${tissueEntries.length - 10} more tissues\n`;
          }
    
          // Summary statistics
          const mValues = tissueEntries.map(([, data]) => data.mValue);
          const nesValues = tissueEntries.map(([, data]) => data.nes);
          const significantTissues = tissueEntries.filter(([, data]) => data.mValue > 0.5);
    
          output += `\n**Summary:**\n`;
          output += `  • Tissues analyzed: ${tissueEntries.length}\n`;
          output += `  • Tissues with m-value > 0.5: ${significantTissues.length}\n`;
          output += `  • Max m-value: ${Math.max(...mValues).toFixed(4)}\n`;
          output += `  • Mean |NES|: ${(nesValues.map(n => Math.abs(n)).reduce((sum, n) => sum + n, 0) / nesValues.length).toFixed(3)}\n`;
        }
        output += '\n';
      });
    
      return {
        content: [{
          type: "text",
          text: output.trim()
        }]
      };
    }
  • Tool schema definition in the list of available tools, specifying the input schema with required gencodeId and optional datasetId.
    name: "get_multi_tissue_eqtls",
    description: "Get multi-tissue eQTL meta-analysis results", 
    inputSchema: {
      type: "object",
      properties: {
        gencodeId: {
          type: "string",
          description: "GENCODE gene ID (e.g., ENSG00000223972.5)"
        },
        datasetId: {
          type: "string",
          description: "GTEx dataset ID (default: gtex_v8)",
          default: "gtex_v8"
        }
      },
      required: ["gencodeId"]
    }
  • src/index.ts:693-697 (registration)
    Registration and dispatch logic in the main CallToolRequest handler that maps the tool name to the AssociationHandlers.getMultiTissueEQTLs method.
    if (name === "get_multi_tissue_eqtls") {
      return await associationHandlers.getMultiTissueEQTLs({
        geneId: args?.gencodeId,
        datasetId: args?.datasetId
      });
  • Supporting API client method that performs the HTTP request to the GTEx Portal API endpoint /association/metasoft to fetch raw multi-tissue eQTL meta-analysis data.
    async getMultiTissueEQTLs(
      gencodeId: string,
      variantId?: string,
      datasetId: string = 'gtex_v8'
    ): Promise<GTExApiResponse<MultiTissueEQTL[]>> {
      try {
        const queryParams = this.buildQueryParams({
          gencodeId,
          variantId,
          datasetId,
          page: 0,
          itemsPerPage: 250
        });
        const response = await this.axiosInstance.get(`/association/metasoft?${queryParams}`);
        return { 
          data: response.data.data,
          paging_info: response.data.paging_info
        };
      } catch (error) {
        return error as GTExApiResponse<MultiTissueEQTL[]>;
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does without behavioral details. It doesn't disclose whether this is a read-only operation, potential rate limits, authentication needs, data freshness, or what the output format looks like (especially critical without an output schema).

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'multi-tissue eQTL meta-analysis results' entail, their format, or how they differ from single-tissue results. Given the complexity implied by the tool name and lack of structured data, more context is needed.

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%, so the schema already documents both parameters thoroughly. The description adds no additional parameter context beyond what's in the schema, maintaining the baseline score of 3 for adequate but not enhanced parameter semantics.

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 action ('Get') and resource ('multi-tissue eQTL meta-analysis results'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from its closest sibling 'get_single_tissue_eqtls' beyond the 'multi-tissue' qualifier, which is implied but not contrasted.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_single_tissue_eqtls' or 'get_eqtl_genes'. The description lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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