Plot trait panel (give user html_link)
plot_trait_panelCreate an interactive HTML report from polygenic risk score results, with charts, model table, and Ask-AI insights, and provide a URL or file path.
Instructions
Write the just-prs trait HTML report and return a URL or file path.
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.
This is the MCP equivalent of prs plot trait ... -o intel_o_family.html:
just_prs.viz.plot_trait_scores + save_trait_report. The page has
the Vega-Lite panel, median cards, model table, and Ask-AI buttons.
result_paths is always a list (one genome is fine; two or more
overlay people). On Streamable HTTP html_url is served from this
same origin at /reports/<file> with no extra config.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| panel | No | ||
| ancestry | No | EUR | |
| model_scope | No | usable | |
| output_path | No | ||
| result_paths | Yes | ||
| genome_labels | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | Trait label. | |
| summary | Yes | Human-readable summary of what was written. | |
| html_url | No | REQUIRED when set: browser URL for this report on the FastMCP HTTP origin (``/reports/<file>``). Put this exact URL in your reply as a markdown link and tell the user to open it. Do not skip it. Do not fetch or paste the HTML. | |
| trait_id | Yes | Trait ontology ID plotted. | |
| html_link | Yes | PRIMARY REPORT DELIVERY TARGET. 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. | |
| html_path | Yes | Server filesystem path of the written just-prs HTML report. Use only when ``html_url`` is absent (stdio): tell the user to open this file. Never paste the HTML. | |
| n_markers | Yes | Number of scored models with a percentile on the chart. | |
| n_samples | No | Number of genomes overlaid on the panel (1 = single-genome markers). | |
| sample_labels | No | Genome labels drawn on the panel, in overlay order. |