Skip to main content
Glama

get_dataset_info

Retrieve details about available GTEx datasets, including dataset IDs and descriptions, to identify relevant genomics data for analysis.

Instructions

Get information about available GTEx datasets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetIdNoSpecific dataset ID (optional, returns all if not provided)

Implementation Reference

  • Main handler function for 'get_dataset_info' tool. Calls API client, handles errors, and formats dataset information into a detailed markdown response.
    async getDatasetInfo(args: any) { const result = await this.apiClient.getDatasetInfo(args.datasetId); if (result.error) { return { content: [{ type: "text", text: `Error retrieving dataset information: ${result.error}` }], isError: true }; } const datasets = result.data || []; if (datasets.length === 0) { return { content: [{ type: "text", text: "No dataset information available." }] }; } let output = `**GTEx Dataset Information**\n\n`; datasets.forEach((dataset, index) => { if (datasets.length > 1) { output += `### Dataset ${index + 1}: ${dataset.datasetId}\n`; } output += `**Basic Information:**\n`; output += ` • ID: ${dataset.datasetId}\n`; output += ` • Display Name: ${dataset.displayName}\n`; output += ` • Organization: ${dataset.organization}\n`; if (dataset.description) { output += ` • Description: ${dataset.description}\n`; } if (dataset.dbgapId) { output += ` • dbGaP ID: ${dataset.dbgapId}\n`; } output += `\n**Genomic References:**\n`; output += ` • Genome Build: ${dataset.genomeBuild}\n`; output += ` • GENCODE Version: ${dataset.gencodeVersion}\n`; if (dataset.dbSnpBuild) { output += ` • dbSNP Build: ${dataset.dbSnpBuild}\n`; } output += `\n**Sample Statistics:**\n`; output += ` • Total subjects: ${dataset.subjectCount.toLocaleString()}\n`; output += ` • Total tissues: ${dataset.tissueCount}\n`; output += ` • RNA-seq samples: ${dataset.rnaSeqSampleCount.toLocaleString()}\n`; output += ` • RNA-seq + genotype samples: ${dataset.rnaSeqAndGenotypeSampleCount.toLocaleString()}\n`; output += `\n**QTL Analysis:**\n`; output += ` • eQTL subjects: ${dataset.eqtlSubjectCount.toLocaleString()}\n`; output += ` • eQTL tissues: ${dataset.eqtlTissuesCount}\n`; if (datasets.length > 1 && index < datasets.length - 1) { output += '\n'; } }); return { content: [{ type: "text", text: output }] }; }
  • src/index.ts:763-767 (registration)
    Registration and dispatching logic in the main CallToolRequestHandler that routes 'get_dataset_info' calls to the referenceHandlers.getDatasetInfo method.
    if (name === "get_dataset_info") { return await referenceHandlers.getDatasetInfo({ datasetId: args?.datasetId }); }
  • Tool schema definition including name, description, and input schema for 'get_dataset_info' in the ListTools response.
    name: "get_dataset_info", description: "Get information about available GTEx datasets", inputSchema: { type: "object", properties: { datasetId: { type: "string", description: "Specific dataset ID (optional, returns all if not provided)" } } }
  • API client helper method that makes the HTTP request to GTEx Portal API /metadata/dataset endpoint to fetch dataset information.
    async getDatasetInfo(datasetId?: string): Promise<GTExApiResponse<DatasetInfo[]>> { try { const params = datasetId ? { datasetId } : {}; const queryParams = this.buildQueryParams(params); const response = await this.axiosInstance.get(`/metadata/dataset?${queryParams}`); return { data: response.data }; } catch (error) { return error as GTExApiResponse<DatasetInfo[]>; } }
  • TypeScript interface defining the structure of DatasetInfo objects returned by the API, used for type safety in handlers and client.
    export interface DatasetInfo { datasetId: string; dbSnpBuild: number; dbgapId: string; description: string; displayName: string; eqtlSubjectCount: number; eqtlTissuesCount: number; gencodeVersion: string; genomeBuild: string; organization: string; rnaSeqAndGenotypeSampleCount: number; rnaSeqSampleCount: number; subjectCount: number; tissueCount: number; }

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