Skip to main content
Glama
dna-seq
by dna-seq

PRS percentile

percentile
Read-onlyIdempotent

Estimates the population percentile for a PRS value using reference panels or fallback methods, returning percentile, reliability, z-score, and reference mean/std for further risk calculation.

Instructions

Estimate the population percentile (0-100) for a computed PRS value.

Uses the 3-tier fallback: precomputed reference-panel distributions (best), then a theoretical distribution, then an AUROC approximation. superpopulation is a 1000G code (AFR/AMR/EAS/EUR/SAS) and should match that genome's ancestry — when comparing people, call this once per score×genome (or rely on compute_prs_by_trait(interpret=True)). Pass weight_mass_coverage (C_wt) from compute_prs so a deflated low-coverage percentile is flagged reliable=False with a caveat instead of presented as authoritative. Also returns the true z-score and reference mean/std used, so absolute risk can be computed without inverting the percentile.

Important next step: for disease traits, feed the returned z_score directly into absolute_risk to get the concrete lifetime probability and risk ratio vs the population average. This is more informative than the percentile alone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
panelNo
pgs_idYes
prs_scoreYes
superpopulationNoEUR
weight_mass_coverageNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
caveatNoHuman-readable warning explaining why the percentile is caveated.
methodYes'reference_panel', 'theoretical', 'auroc_approx', or 'unavailable'.
pgs_idYesPGS Catalog Score ID.
z_scoreNoTrue z-score ((score − reference_mean)/reference_std) used for this percentile — feed directly to absolute_risk instead of inverting the percentile.
ancestryYesRequested 1000G superpopulation (AFR/AMR/EAS/EUR/SAS).
reliableNoFalse when the percentile should be treated as caveated or unreliable.
prs_scoreYesThe PRS value that was scored.
percentileNoEstimated percentile (0-100), or null if unavailable.
reference_stdNoReference-distribution SD used, when known.
reference_meanNoReference-distribution mean used, when known.
reference_panelNoReference panel identifier used (reference_panel method only).
reference_panel_ancestryNoSuperpopulation of the reference panel actually used (reference_panel method only) — check it matches the sample's ancestry before trusting the percentile.
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

Annotations (readOnlyHint, idempotentHint) already establish safety, but the description adds rich behavioral detail: the 3-tier fallback logic, reliability flagging for low coverage, and inclusion of z-score/mean/std for downstream risk calculation. This goes beyond annotation-derived expectations.

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?

Well-structured and dense; the main purpose is front-loaded, and each sentence adds substantive value. The 'Important next step' is a legitimate usage addition, not filler.

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

Completeness5/5

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

Given 5 parameters, a complex fallback algorithm, and linkage to absolute_risk, the description covers core behavior, caveats, parameter meaning, and next steps. The existence of an output schema fills in exact return fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden. It thoroughly explains superpopulation as a 1000G code and weight_mass_coverage as C_wt from compute_prs for reliability flagging. However, 'panel' is only indirectly referenced via 'reference-panel distributions' without explicit parameter clarification.

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?

States a specific verb+resource: 'Estimate the population percentile (0-100) for a computed PRS value.' This clearly differentiates from siblings like compute_prs and absolute_risk.

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

Usage Guidelines5/5

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

Provides explicit when-to-use versus alternatives: suggests compute_prs_by_trait(interpret=True) for comparative scenarios and directs disease-trait users to absolute_risk with the returned z_score. Also gives context for superpopulation matching.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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