Skip to main content
Glama
shukwong

gnomAD MCP Server

by shukwong

get_coverage

Retrieve genomic coverage data for genes from gnomAD to analyze sequencing depth and variant detection reliability in population genetics studies.

Instructions

Get coverage information for a gene

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gene_idNoEnsembl gene ID
gene_symbolNoGene symbol
datasetNoDataset IDgnomad_r4
reference_genomeNoReference genomeGRCh38

Implementation Reference

  • Handler logic for the 'get_coverage' tool within the CallToolRequestSchema handler's switch statement. It validates input, makes a GraphQL request to fetch coverage data, and formats the result.
    case "get_coverage":
      if (!args.gene_id && !args.gene_symbol) {
        throw new Error("Either gene_id or gene_symbol must be provided");
      }
      result = await makeGraphQLRequest(QUERIES.getCoverage, {
        geneId: (args.gene_id as string) || null,
        geneSymbol: (args.gene_symbol as string) || null,
        datasetId: parseDatasetId((args.dataset as string) || "gnomad_r4"),
        referenceGenome: parseReferenceGenome((args.reference_genome as string) || "GRCh38"),
      });
      formattedResult = result.data?.gene?.coverage || null;
      break;
  • src/index.ts:558-584 (registration)
    Registration of the 'get_coverage' tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    {
      name: "get_coverage",
      description: "Get coverage information for a gene",
      inputSchema: {
        type: "object",
        properties: {
          gene_id: {
            type: "string",
            description: "Ensembl gene ID",
          },
          gene_symbol: {
            type: "string",
            description: "Gene symbol",
          },
          dataset: {
            type: "string",
            description: "Dataset ID",
            default: "gnomad_r4",
          },
          reference_genome: {
            type: "string",
            description: "Reference genome",
            default: "GRCh38",
          },
        },
      },
    },
  • GraphQL query schema for fetching gene coverage data, defined in the QUERIES object and used by the handler.
    getCoverage: `
      query GetCoverage($geneId: String, $geneSymbol: String, $datasetId: DatasetId!, $referenceGenome: ReferenceGenomeId!) {
        gene(gene_id: $geneId, gene_symbol: $geneSymbol, reference_genome: $referenceGenome) {
          coverage(dataset: $datasetId) {
            exome {
              pos
              mean
              median
              over_1
              over_5
              over_10
              over_15
              over_20
              over_25
              over_30
              over_50
              over_100
            }
            genome {
              pos
              mean
              median
              over_1
              over_5
              over_10
              over_15
              over_20
              over_25
              over_30
              over_50
              over_100
            }
          }
        }
      }
    `,
  • Helper function used by the get_coverage handler to execute GraphQL requests to the gnomAD API.
    async function makeGraphQLRequest(query: string, variables: Record<string, any> = {}): Promise<GnomadResponse> {
      const response: Response = await fetch(GNOMAD_API_URL, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        body: JSON.stringify({
          query,
          variables,
        }),
      });
    
      if (!response.ok) {
        throw new Error(`HTTP error! status: ${response.status}`);
      }
    
      return await response.json() as GnomadResponse;
    }
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 only states what the tool does ('Get coverage information'), without detailing what 'coverage information' entails (e.g., metrics, formats), whether it's a read-only query, any rate limits, authentication needs, or error handling. This is inadequate 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.

Conciseness4/5

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

The description is a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for a simple query tool, though it could be more informative. There's no fluff or redundancy, making it easy to parse.

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 tool's complexity (4 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what 'coverage information' means in this context, how results are returned, or any prerequisites. For a tool in a genomics server with multiple siblings, more context is needed to guide effective 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 all parameters documented in the schema (e.g., 'Ensembl gene ID' for gene_id). The description adds no parameter-specific information beyond the schema, not even clarifying if parameters are optional or how they interact (e.g., using gene_id vs. gene_symbol). Baseline 3 is appropriate as the schema handles the heavy lifting.

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

Purpose3/5

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

The description states the tool's purpose as 'Get coverage information for a gene', which is clear but vague. It specifies the resource (coverage information) and target (a gene), but doesn't distinguish it from siblings like 'get_gene' or 'get_variants_in_gene' in terms of what type of information it returns. The verb 'Get' is generic but functional.

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 'get_gene', 'get_variants_in_gene', and 'search', there's no indication of what makes 'get_coverage' distinct or appropriate for coverage-specific queries versus broader gene data. This leaves the agent to infer usage from the 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/shukwong/gnomad-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server