Skip to main content
Glama

get_tissue_info

Retrieve tissue details and sample counts from the GTEx Portal to analyze gene expression data across human tissue types.

Instructions

Get information about GTEx tissues and sample counts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetIdNoGTEx dataset ID (default: gtex_v8)gtex_v8

Implementation Reference

  • The primary handler function implementing the get_tissue_info tool. Fetches tissue site details from the API, handles errors, filters by tissueIds if provided, formats comprehensive output with identifiers, sample summaries, eQTL data, and statistics.
    async getTissueInfo(args: any) {
      const result = await this.apiClient.getTissueSiteDetails(args.datasetId || 'gtex_v8');
    
      if (result.error) {
        return {
          content: [{
            type: "text",
            text: `Error retrieving tissue information: ${result.error}`
          }],
          isError: true
        };
      }
    
      const tissues = result.data || [];
      if (tissues.length === 0) {
        return {
          content: [{
            type: "text",
            text: "No tissue information available."
          }]
        };
      }
    
      let output = `**GTEx Tissue Information**\n`;
      output += `Dataset: ${tissues[0]?.datasetId}\n`;
      output += `Total tissues: ${tissues.length}\n\n`;
    
      // Filter tissues if specific ones requested
      let displayTissues = tissues;
      if (args.tissueIds && Array.isArray(args.tissueIds)) {
        displayTissues = tissues.filter(t => args.tissueIds.includes(t.tissueSiteDetailId));
        if (displayTissues.length === 0) {
          return {
            content: [{
              type: "text",
              text: `No tissues found matching: ${args.tissueIds.join(', ')}`
            }]
          };
        }
      }
    
      // Sort by tissue name
      const sortedTissues = displayTissues.sort((a, b) => a.tissueSiteDetail.localeCompare(b.tissueSiteDetail));
    
      sortedTissues.forEach((tissue, index) => {
        if (displayTissues.length === 1) {
          output += `### ${tissue.tissueSiteDetail}\n`;
        } else {
          output += `${(index + 1).toString().padStart(2)}. **${tissue.tissueSiteDetail}** (${tissue.tissueSiteDetailId})\n`;
        }
    
        if (displayTissues.length === 1) {
          output += `**Identifiers:**\n`;
          output += `  • Tissue ID: ${tissue.tissueSiteDetailId}\n`;
          output += `  • Abbreviation: ${tissue.tissueSiteDetailAbbr}\n`;
          output += `  • Sampling Site: ${tissue.samplingSite}\n`;
          output += `  • Ontology ID: ${tissue.ontologyId}\n`;
          if (tissue.ontologyIri) {
            output += `  • Ontology IRI: ${tissue.ontologyIri}\n`;
          }
    
          output += `\n**Visual Properties:**\n`;
          output += `  • Color (hex): ${tissue.colorHex}\n`;
          output += `  • Color (RGB): ${tissue.colorRgb}\n`;
    
          output += `\n**Data Availability:**\n`;
          output += `  • Has eGenes: ${tissue.hasEGenes ? 'Yes' : 'No'}\n`;
          output += `  • Has sGenes: ${tissue.hasSGenes ? 'Yes' : 'No'}\n`;
          output += `  • Mapped in HubMAP: ${tissue.mappedInHubmap ? 'Yes' : 'No'}\n`;
    
          if (tissue.hasEGenes) {
            output += `  • eGene count: ${tissue.eGeneCount.toLocaleString()}\n`;
          }
          if (tissue.hasSGenes) {
            output += `  • sGene count: ${tissue.sGeneCount.toLocaleString()}\n`;
          }
          output += `  • Expressed genes: ${tissue.expressedGeneCount.toLocaleString()}\n`;
    
          // RNA-seq samples
          const rnaSamples = tissue.rnaSeqSampleSummary;
          output += `\n**RNA-seq Samples:**\n`;
          output += `  • Total: ${rnaSamples.totalCount}\n`;
          output += `  • Female: ${rnaSamples.female.count} (age: ${rnaSamples.female.ageMin}-${rnaSamples.female.ageMax}, mean: ${rnaSamples.female.ageMean.toFixed(1)})\n`;
          output += `  • Male: ${rnaSamples.male.count} (age: ${rnaSamples.male.ageMin}-${rnaSamples.male.ageMax}, mean: ${rnaSamples.male.ageMean.toFixed(1)})\n`;
    
          // eQTL samples
          const eqtlSamples = tissue.eqtlSampleSummary;
          output += `\n**eQTL Samples:**\n`;
          output += `  • Total: ${eqtlSamples.totalCount}\n`;
          output += `  • Female: ${eqtlSamples.female.count} (age: ${eqtlSamples.female.ageMin}-${eqtlSamples.female.ageMax}, mean: ${eqtlSamples.female.ageMean.toFixed(1)})\n`;
          output += `  • Male: ${eqtlSamples.male.count} (age: ${eqtlSamples.male.ageMin}-${eqtlSamples.male.ageMax}, mean: ${eqtlSamples.male.ageMean.toFixed(1)})\n`;
    
        } else {
          // Brief format for multiple tissues
          const totalSamples = tissue.rnaSeqSampleSummary.totalCount;
          const eGeneInfo = tissue.hasEGenes ? `, ${tissue.eGeneCount} eGenes` : '';
          const sGeneInfo = tissue.hasSGenes ? `, ${tissue.sGeneCount} sGenes` : '';
          output += `    ${totalSamples} samples${eGeneInfo}${sGeneInfo}\n`;
        }
      });
    
      if (displayTissues.length > 1) {
        // Summary statistics
        const totalSamples = displayTissues.reduce((sum, t) => sum + t.rnaSeqSampleSummary.totalCount, 0);
        const totalEGenes = displayTissues.reduce((sum, t) => sum + (t.hasEGenes ? t.eGeneCount : 0), 0);
        const totalSGenes = displayTissues.reduce((sum, t) => sum + (t.hasSGenes ? t.sGeneCount : 0), 0);
    
        output += `\n**Summary:**\n`;
        output += `  • Total RNA-seq samples: ${totalSamples.toLocaleString()}\n`;
        output += `  • Total eGenes: ${totalEGenes.toLocaleString()}\n`;
        output += `  • Total sGenes: ${totalSGenes.toLocaleString()}\n`;
        output += `  • Tissues with eQTL data: ${displayTissues.filter(t => t.hasEGenes).length}\n`;
        output += `  • Tissues with sQTL data: ${displayTissues.filter(t => t.hasSGenes).length}\n`;
      }
    
      return {
        content: [{
          type: "text",
          text: output
        }]
      };
    }
  • Tool schema definition including input schema for parameters like datasetId and optional tissueIds.
      name: "get_tissue_info",
      description: "Get information about GTEx tissues and sample counts",
      inputSchema: {
        type: "object",
        properties: {
          datasetId: {
            type: "string",
            description: "GTEx dataset ID (default: gtex_v8)",
            default: "gtex_v8"
          }
        }
      }
    },
  • src/index.ts:734-738 (registration)
    Registration and dispatch logic in the main request handler that maps the 'get_tissue_info' tool name to the referenceHandlers.getTissueInfo method.
    if (name === "get_tissue_info") {
      return await referenceHandlers.getTissueInfo({
        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 mentions retrieving information, implying a read-only operation, but lacks details on permissions, rate limits, error handling, or output format. For a tool with no annotations, this is a significant gap in transparency.

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, direct sentence that efficiently conveys the core purpose without unnecessary words. It is front-loaded and wastes no space, 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?

Given the complexity of retrieving biological data and the lack of annotations and output schema, the description is incomplete. It doesn't explain what information is returned (e.g., tissue names, sample counts, metadata), potential limitations, or how it integrates with sibling tools, leaving gaps for effective tool invocation.

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?

The input schema has 100% description coverage, with one parameter ('datasetId') fully documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 information about') and the resource ('GTEx tissues and sample counts'), making the purpose understandable. However, it doesn't differentiate this tool from siblings like 'get_dataset_info' or 'get_sample_info', which might provide overlapping or related information about datasets or samples, leaving some ambiguity about its specific scope.

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 many sibling tools available (e.g., 'get_dataset_info', 'get_sample_info', 'get_tissue_specific_genes'), there is no indication of context, prerequisites, or exclusions, leaving the agent to infer usage based on tool names 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