Skip to main content
Glama

get_sqtl_results

Retrieve splicing quantitative trait locus (sQTL) results for specific genes from GTEx data to identify genetic variants influencing alternative splicing patterns.

Instructions

Get splicing QTL (sQTL) results for a gene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gencodeIdYesGENCODE gene ID (e.g., ENSG00000223972.5)
tissueSiteDetailIdNoTissue site detail ID (optional, for tissue-specific results)
datasetIdNoGTEx dataset ID (default: gtex_v8)gtex_v8

Implementation Reference

  • Main handler function that executes the get_sqtl_results tool. Calls GTEx API for sQTL genes (sGenes) by tissue, processes results, sorts by q-value, groups by tissue, and formats a detailed Markdown summary of top sGenes with statistics.
    async getSQTLGenes(args: any) {
      const result = await this.apiClient.getSQTLGenes(
        args.tissueIds,
        args.datasetId || 'gtex_v8'
      );
    
      if (result.error) {
        return {
          content: [{
            type: "text",
            text: `Error retrieving sQTL genes: ${result.error}`
          }],
          isError: true
        };
      }
    
      const sqtlGenes = result.data || [];
      if (sqtlGenes.length === 0) {
        return {
          content: [{
            type: "text",
            text: `No sQTL genes found${args.tissueIds ? ` for tissues: ${args.tissueIds.join(', ')}` : ''}`
          }]
        };
      }
    
      // Group by tissue
      const tissueGroups: { [key: string]: any[] } = {};
      sqtlGenes.forEach(gene => {
        if (!tissueGroups[gene.tissueSiteDetailId]) {
          tissueGroups[gene.tissueSiteDetailId] = [];
        }
        tissueGroups[gene.tissueSiteDetailId].push(gene);
      });
    
      let output = `**sQTL Genes (${sqtlGenes.length} results)**\n`;
      output += `Dataset: ${sqtlGenes[0]?.datasetId}\n`;
      output += `Tissues: ${Object.keys(tissueGroups).length}\n\n`;
    
      Object.entries(tissueGroups).forEach(([tissueId, genes]) => {
        const tissueDisplayName = this.getTissueDisplayName(tissueId);
        output += `### ${tissueDisplayName} (${genes.length} sGenes)\n`;
    
        // Sort by significance
        const sortedGenes = genes.sort((a, b) => a.qValue - b.qValue);
        
        const topCount = Math.min(10, sortedGenes.length);
        sortedGenes.slice(0, topCount).forEach((gene, index) => {
          output += `${(index + 1).toString().padStart(2)}. **${gene.geneSymbol}** (${gene.gencodeId})\n`;
          output += `    • Phenotype: ${gene.phenotypeId}\n`;
          output += `    • p-value: ${gene.pValue.toExponential(2)}\n`;
          output += `    • q-value: ${gene.qValue.toFixed(4)}\n`;
          output += `    • Empirical p-value: ${gene.empiricalPValue.toExponential(2)}\n`;
          output += `    • # Phenotypes tested: ${gene.nPhenotypes}\n`;
          output += `    • p-value threshold: ${gene.pValueThreshold.toExponential(2)}\n`;
        });
    
        if (sortedGenes.length > topCount) {
          output += `    ... and ${sortedGenes.length - topCount} more sGenes\n`;
        }
    
        // Tissue summary
        const qValues = sortedGenes.map(g => g.qValue);
        output += `\n**Tissue Summary:**\n`;
        output += `  • Total sGenes: ${genes.length}\n`;
        output += `  • Most significant q-value: ${Math.min(...qValues).toExponential(2)}\n`;
        output += `  • Mean phenotypes per gene: ${(genes.reduce((sum, g) => sum + g.nPhenotypes, 0) / genes.length).toFixed(1)}\n\n`;
      });
    
      if (result.paging_info && result.paging_info.totalNumberOfItems > sqtlGenes.length) {
        output += `**Note:** Showing ${sqtlGenes.length} of ${result.paging_info.totalNumberOfItems} total results.\n`;
      }
    
      return {
        content: [{
          type: "text",
          text: output.trim()
        }]
      };
    }
  • Tool schema definition in ListTools response, specifying input parameters: gencodeId (required), tissueSiteDetailId (optional), datasetId (optional). Note: gencodeId is required in schema but not used in handler implementation.
    {
      name: "get_sqtl_results",
      description: "Get splicing QTL (sQTL) results for a gene",
      inputSchema: {
        type: "object",
        properties: {
          gencodeId: {
            type: "string",
            description: "GENCODE gene ID (e.g., ENSG00000223972.5)"
          },
          tissueSiteDetailId: {
            type: "string",
            description: "Tissue site detail ID (optional, for tissue-specific results)"
          },
          datasetId: {
            type: "string",
            description: "GTEx dataset ID (default: gtex_v8)",
            default: "gtex_v8"
          }
        },
        required: ["gencodeId"]
      }
    },
  • src/index.ts:699-704 (registration)
    Dispatch logic in CallToolRequestSchema handler that routes 'get_sqtl_results' calls to AssociationHandlers.getSQTLGenes, mapping tool args to handler parameters (ignores gencodeId).
    if (name === "get_sqtl_results") {
      return await associationHandlers.getSQTLGenes({
        tissueIds: args?.tissueSiteDetailId ? [args.tissueSiteDetailId] : undefined,
        datasetId: args?.datasetId
      });
    }
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 what the tool does but lacks details on permissions, rate limits, data format, or any constraints beyond the basic function, which is insufficient for a tool with no annotation coverage.

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, clear sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and efficiently conveys the core function, making it highly concise and well-structured.

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 no annotations and no output schema, the description is incomplete. It does not explain return values, error handling, or behavioral traits, which are crucial for a tool that retrieves genetic data. This leaves significant gaps in understanding how to use the tool effectively.

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 fully documents all parameters. The description does not add any semantic details beyond what the schema provides, such as examples or usage context for parameters, meeting the baseline for high schema 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 action ('Get') and resource ('splicing QTL results for a gene'), making the purpose understandable. However, it does not differentiate from sibling tools like 'get_single_tissue_eqtls' or 'get_multi_tissue_eqtls', which also retrieve QTL-related data, so it misses full sibling distinction.

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 sibling tools like 'get_single_tissue_eqtls' and 'get_multi_tissue_eqtls' available, there is no indication of when this specific sQTL tool is preferred, leaving usage context unclear.

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