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

Compute PRS by trait (give user html_link)

compute_prs_by_trait
Idempotent

Calculate polygenic risk scores for a trait using provided VCF genomes, delivering an interactive report with risk percentiles and model quality metrics.

Instructions

Compute the PRS scores associated with a trait for one or more genomes.

REQUIRED REPORT DELIVERY: when html_link is set, your reply MUST include it as a markdown link (for example Open the interactive trait report) and explicitly tell the user to open it. This is the primary user-facing result, not an implementation detail. Do not skip the link, merely say the report was saved, fetch it, or paste the HTML. html_link is an HTTP URL when available and a file:// URI on local stdio.

Pass a raw .vcf/.vcf.gz path directly. Do NOT call normalize_vcf first as a prerequisite: multi-score tools transparently create or reuse a safe normalized cache, and single-score tools read the VCF directly. normalize_vcf is only an optional explicit step for custom filters. If list_genomes already shows a normalized Parquet, it can be passed directly.

trait_id may be an EFO or MONDO identifier. samples is always a list (one genome is fine): each entry is Label=path or a bare path; .parquet is a normalized genotype source. Every genome is auto-saved; the return carries reports, result_paths, and (when models have percentiles) the primary html_link plus transport-specific html_url / html_path — the just-prs trait HTML report (same page as prs plot trait -o *.html). Pass result_paths to compare_genomes (2+), plot_trait_panel, or build_prs_prompt.

Profile (curation): profile="all" (default) returns the raw associated panel. profile="curated" is the interpreted shortlist — it drops toy scores (<10 variants), scores with no performance evidence, scores below the C_wt coverage floor, and de-dups score families.

interpret=True (default) attaches percentiles/quality per model. Set interpret=False for raw scores only — the report then says so. reference_restoration defaults to "auto". superpopulation may be a 1000G code or "auto". Set include_prompt=True to also attach the just-prs LLM prompt covering every genome in this call.

This tool returns a PRSJob immediately. If status is queued or running, call prs_job_status(job_id, wait_seconds=25) until done or failed. Do not start a second identical compute — the server reuses the in-flight job. When done, html_link and result (TraitPRSReports) are on the job. Native multi-score work is isolated in a child process so a DuckDB/Polars crash fails the batch without killing the MCP transport.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buildNo
limitNo
panelNo
top_nNo
profileNoall
samplesYes
ancestryNo
trait_idYes
interpretNo
min_aurocNo
genome_buildNo
include_promptNo
min_match_rateNo
superpopulationNoEUR
include_childrenNo
genotype_input_modeNoauto
reference_restorationNoauto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolYesTool that created the job.
errorNoFailure message when status is failed.
job_idYesPass this to prs_job_status until status is done or failed.
resultNoWhen status is done: the original tool payload (TraitPRSReports, NormalizeResult, OpResult, or a list of PRSResult). Read html_link / result_paths from this object.
statusYesqueued/running: call prs_job_status. done: read result and html_link. failed: read error. Do not start a second identical compute while queued/running.
messageYesLatest progress line.
progressNoCompleted work units, when known.
html_linkNoPRIMARY REPORT DELIVERY TARGET. When set, put this exact value in the user reply as a markdown link and explicitly tell the user to open the interactive report. It is an HTTP URL when available and a file:// URI for local stdio. Never omit, fetch, or paste the HTML.
poll_withNoPoll this tool with job_id. Optional wait_seconds keeps one poll under typical client timeouts (try 25).prs_job_status
created_atYesUTC timestamp when the job was created.
html_errorNoOptional HTML-generation error. Scores remain valid when this is set.
progress_totalNoTotal work units, when known.
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

No annotations contradiction. The description clearly goes beyond the structured annotations by revealing that every genome is auto-saved, an in-flight compute is reused, work runs in a child process to avoid killing the MCP transport, and the returned PRSJob may be queued/running before completion. It also makes the non-negotiable user-facing html_link behavior explicit.

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 dense but front-loaded with the most important operational fact: the report link must be given to the user. It then covers input path handling, profile semantics, async behavior, and safety. It is longer than ideal, and paragraph-like formatting makes scanning a little harder, but most sentences carry necessary information.

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?

It is largely complete for a complex 17-parameter compute-and-report tool: it documents the async job flow, the return of html_link/result_paths, the report equivalence to ``prs plot trait``, reuse of normalized caches, and the role of result_paths in sibling tools. It loses a point because several optional parameters and their intended interactions are not addressed.

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?

It adds real semantics for trait_id (EFO/MONDO), samples (list with Label=path or bare path), profile ('all' vs 'curated'), interpret, reference_restoration, superpopulation, and include_prompt. However, with 17 parameters and 0% schema description coverage, several meaningful advanced parameters such as limit, top_n, panel, min_auroc, min_match_rate, ancestry, genome_build, and include_children are left to name-inference only.

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 first sentence states a specific action and resource: 'Compute the PRS scores associated with a trait for one or more genomes.' The description also orients the tool among siblings by calling out multi-score vs single-score behavior and by clarifying that this tool ultimately produces the trait HTML report.

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?

It gives explicit when-and-when-not guidance: 'Do NOT call normalize_vcf first as a prerequisite' and clarifies that normalize_vcf is only optional for custom filters. It also tells the agent when to poll with prs_job_status, not to start a duplicate identical compute, and how to route outputs to compare_genomes, plot_trait_panel, or build_prs_prompt.

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