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

Compute PRS (batch)

compute_prs_batch
Read-onlyIdempotent

Calculate polygenic risk scores for one genome against many PGS models using a raw VCF, with automatic caching and job-based results.

Instructions

Compute PRS for one genome against many PGS models.

Pass the raw VCF directly; a separate normalization call is not required. The tool transparently creates or reuses a collision-safe normalized cache, then uses the memory-safe DuckDB engine with spill-to-disk. It reuses the scoring caches across scores. This is still one genome × many PGS IDs. For a trait panel across people, use compute_prs_by_trait(samples=[...]) then compare_genomes / build_prs_prompt. Set attach_performance=True to embed each score's best published performance on its result in the same pass.

reference_restoration (default "auto") recovers absent-hom-ref coverage on WGS/array input — see compute_prs; the reference-allele universe is resolved once and reused across every score. genotype_input_mode ("auto" / "variant_only" / "all_sites") controls how absent loci are read.

Returns a PRSJob immediately. When done, result is the list of successful PRSResult objects. If status is queued or running, poll prs_job_status(job_id, wait_seconds=25).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pgs_idsYes
vcf_pathYes
genome_buildNo
attach_performanceNo
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.7/5.0
Behavior5/5

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

Annotations already cover readOnlyHint and idempotentHint, but the description adds substantial behavioral detail: it explains internal caching ('creates or reuses a collision-safe normalized cache'), the DuckDB engine with spill-to-disk, and the async job model with polling ('If status is queued or running, poll prs_job_status'). It also explains reference_restoration and genotype_input_mode behaviors. 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.

Conciseness4/5

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

The description is detailed but well-structured, with a clear front-loaded purpose and paragraphs for usage, parameters, and async behavior. Every sentence adds value, though it is slightly long. The use of bold for key terms and explicit defaults aids readability. No excess fluff, but it could be tightened.

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?

Given the tool's complexity (6 params, output schema, async job), the description covers most bases: it explains the async behavior and polling, parameter semantics for major parameters, and distinguishes from sibling tools. It references compute_prs for deeper detail on reference_restoration, which is acceptable. The only notable gap is the omission of genome_build, but overall it is quite complete.

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 has 0% description coverage, so the description carries the full burden for parameter meaning. It explains attach_performance, reference_restoration, genotype_input_mode, and indirectly vcf_path and pgs_ids from the purpose. However, genome_build is not mentioned at all, leaving a gap. Overall it adds meaning beyond the bare schema but misses one parameter.

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 'Compute PRS for one genome against many PGS models' with a specific verb and scope. It explicitly distinguishes from siblings by saying 'For a trait panel across people, use compute_prs_by_trait(samples=[...])' and emphasizes 'This is still **one genome × many PGS IDs**.' This fully differentiates it from broader alternatives.

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?

The description provides explicit usage context: it says no separate normalization is needed, and it directs users to alternative tools for trait panels. It also explains when to use attach_performance and how to poll with prs_job_status, giving clear when-to-use vs when-not-to-use guidance.

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