Skip to main content
Glama
winternewt
by winternewt

Compute PRS

compute_prs
Read-only

Compute a polygenic risk score from a VCF file using a specified PGS score. Returns the score, match rate, variant counts, and trait information.

Instructions

Compute a polygenic risk score for one VCF against one PGS score.

Downloads the harmonized scoring file (cached) and scores the genotypes. Pass genotypes_path to reuse a normalized Parquet from normalize_vcf (avoids re-reading the VCF); otherwise the VCF is read directly. Returns the score, match rate, variant counts, trait, and (when data permits) a theoretical percentile.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vcf_pathYes
pgs_idYes
genome_buildNo
genotypes_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pgs_idYesPGS Catalog Score ID
scoreYesComputed polygenic risk score
variants_matchedYesNumber of scoring variants matched in VCF
variants_totalYesTotal number of variants in scoring file
match_rateYesFraction of scoring variants matched (0-1)
trait_reportedNoReported trait for the score
performanceNoBest available performance metric from PGS Catalog
has_allele_frequenciesNoWhether the scoring file contained allelefrequency_effect data
theoretical_meanNoTheoretical population mean PRS computed from allele frequencies: sum(w_i * 2 * p_i)
theoretical_stdNoTheoretical population SD of PRS: sqrt(sum(w_i^2 * 2 * p_i * (1-p_i)))
percentileNoEstimated population percentile (0-100) from theoretical distribution
ancestryNoAncestry superpopulation used for percentile (AFR, AMR, EAS, EUR, SAS)
percentile_methodNoMethod used to compute percentile: 'reference_panel', 'theoretical', or 'auroc_approx'
absolute_riskNoAbsolute disease risk estimate based on PRS z-score and prevalence data
Behavior4/5

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

Annotations provide readOnlyHint and openWorldHint. The description adds transparency about caching behavior and conditional percentile calculation. No contradiction with annotations.

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?

Three concise sentences, each adding value: purpose, optimization, and return values. No fluff, front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers core functionality, caching, optimization, and return values. Missing genome_build explanation and potential error cases, but adequate for a medium-complexity tool with output schema.

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?

With 0% schema description coverage, the description explains three of four parameters (vcf_path, pgs_id, genotypes_path) but leaves genome_build undocumented.

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

Purpose5/5

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

The description clearly states the tool computes a polygenic risk score for one VCF against one PGS score, using specific verbs and resources. It distinguishes itself from siblings like normalize_vcf by mentioning reuse of normalized Parquet.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear usage context, including an optimization tip for reusing normalized data. Does not explicitly state when not to use, but the purpose is well-defined among siblings.

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/winternewt/just-prs-mcp'

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