Skip to main content
Glama
Replaced by its MCP Registry listing

This endpoint is listed in the official MCP Registry as 三域医研 · 科研算法引擎 (SanYu Research Engine). If you published it, claim ownership there.

Two-sample Mendelian randomization / 两样本孟德尔随机化(MR)

mr_run

Two-sample Mendelian randomization / 两样本孟德尔随机化(MR) | USE WHEN: the user has GWAS summary statistics and wants a causal estimate (IVW / MR-Egger / weighted median) with instrument QC and figures | ALIASES: 孟德尔随机化, 随机化, mendelian randomization, MR, IVW, MR-Egger, 加权中位数, 工具变量, GWAS, summary statistics | RETURNS: IVW/Egger/加权中位数估计(β、SE、P、95%CI)、异质性 Q、工具变量质检、三态结论门禁、图 SVG

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "exposure_file_id": "<exposure_file_id>"
    },
    "name": "mr_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
seedNo随机种子,默认 42;固定则结果可逐位复算
n_bootstrapNo加权中位数 bootstrap 次数,默认 1000(100–20000)
p_thresholdNo不给 rsID 时,按该 P 值阈值从暴露表里自动筛工具变量(如 5e-8)
genome_buildNoGRCh37 / GRCh38;两侧不一致会告警(只有按 chr:pos 匹配时才影响结果)
exposure_onlyNotrue = 只做工具变量质检(F 统计量/弱工具),不出因果估计
sample_overlapNo两样本重叠情况:none / partial / same_cohort / unknown(默认 unknown,会在 gate 里降级说明)
include_figuresNo是否返回森林/散点/漏斗/留一图 SVG(默认 true)
outcome_file_idNo结局 sumstats 的 file_id;只想做工具变量质检时传 exposure_only=true 可不给
exposure_file_idYes暴露 sumstats 的 file_id(先用 sanyu_upload_data 上传;tsv/csv/txt,制表符或逗号分隔,首行列名)
instrument_rsidsNo工具变量 rsID 列表,如 ["rs12345", "rs67890"];最多 5000 个
instrument_file_idNo工具变量清单的 file_id(至少含 SNP 列);与 instrument_rsids / p_threshold 三选一
outcome_column_mapNo结局文件的列名映射对象 {"SNP":"rsid","beta":"b",…},与 exposure_column_map 同构。列名不标准时靠它对齐。
exposure_column_mapNo规范名→原列名,如 {"beta": "Effect", "se": "StdErr", "snp": "MarkerName"};自动识别失败时用它显式指定

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / outcome_column_map / description
      Previous value: -"结局文件的列名映射,同上"New value: +"结局文件的列名映射对象 {\"SNP\":\"rsid\",\"beta\":\"b\",…},与 exposure_column_map 同构。列名不标准时靠它对齐。"
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the agent knows this is a non-destructive computation but not much else. The description adds genuine behavioral context — the returned estimate set (β, SE, P, 95%CI), heterogeneity Q, instrument QC, a 'three-state conclusion gate', and SVG figures — but never says whether artifacts are persisted, whether the run is expensive/long, or what happens when the gate fails.

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?

It is a single piped block with USE WHEN, ALIASES and RETURNS front-loaded, so the actionable trigger appears immediately. The long bilingual ALIASES list (孟德尔随机化, IVW, 加权中位数, summary statistics, …) is padding for a human reader but harmless for retrieval, keeping it just short of a 5.

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?

For a 13-parameter, nested-object tool with no output schema, the description does the essential job of summarizing the return payload and the QC/gate behavior. Remaining gaps — file persistence, runtime cost, and what the three-state gate does to the response — are the only things an agent might still need.

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?

Schema description coverage is 100%, so the schema already explains all 13 parameters including the instrument_rsids / instrument_file_id / p_threshold三选一 choice, defaults, and ranges. The description adds no parameter-level meaning beyond what the schema provides, so the baseline of 3 applies.

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

Purpose4/5

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

The description states a specific method and resource ('Two-sample Mendelian randomization') and enumerates the estimators it produces (IVW / MR-Egger / weighted median) plus instrument QC and figures, so the agent knows exactly what computation runs. It never names or contrasts a sibling (e.g. mr_engines), so differentiation is left implicit rather than stated.

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?

'USE WHEN: the user has GWAS summary statistics and wants a causal estimate' gives a clear triggering precondition, and the schema note on exposure_only=true carves out a QC-only mode. There are no explicit exclusions or named alternatives, so the agent must infer when a different randomization/engine tool is the better pick.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources