Skip to main content
Glama

三域医研 · 科研算法引擎 (SanYu Research Engine)

Cox 比例风险回归

act_cox_model
Read-only

Cox 比例风险回归 做生存分析,要看多个因素对生存时间的影响(给出 HR 与 95%CI) 各变量 HR、95%CI、p 值与模型整体检验

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": {
      "times": "<times>",
      "events": "<events>",
      "X": "<X>"
    },
    "name": "act_cox_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
XYes协变量矩阵(二维数值数组,每行一例、每列一个变量,**不含截距列**)。行数必须等于 times 长度;单一取值的列会被拒绝(无变异无法估 HR)。
timesYes随访时间(一维数值数组,须 >0,单位自定但全表一致)。与 events、X 的行数三者必须严格等长;负时间会被 400 拒绝。
eventsYes结局事件,1=发生、0=删失(不接受 2/3 等多状态编码)。至少 2 个事件才可估计 HR —— 全删失或仅 1 个事件会被 400 拒绝。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / X / description
      Previous value: -"协变量矩阵,每行一例、每列一个变量(必须传;全删失或单一取值会被拒)"New value: +"协变量矩阵(二维数值数组,每行一例、每列一个变量,**不含截距列**)。行数必须等于 times 长度;单一取值的列会被拒绝(无变异无法估 HR)。"
    • changedInput schema / properties / events / description
      Previous value: -"结局事件,1=发生、0=删失"New value: +"结局事件,1=发生、0=删失(不接受 2/3 等多状态编码)。至少 2 个事件才可估计 HR —— 全删失或仅 1 个事件会被 400 拒绝。"
    • changedInput schema / properties / times / description
      Previous value: -"随访时间"New value: +"随访时间(一维数值数组,须 >0,单位自定但全表一致)。与 events、X 的行数三者必须严格等长;负时间会被 400 拒绝。"
  2. Added

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is fully covered by structured data and the description adds output-shape information (per-variable HR, 95% CI, p, overall test). It says nothing about the proportional hazards assumption, tie handling, or estimator choice, which are the behaviors that materially affect a Cox fit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

It is short and front-loads the method name, but the phrasing runs together without clear separation, and the output content is stated twice ('给出 HR 与 95%CI' then '各变量 HR、95%CI、p 值与模型整体检验'), which wastes one of only a few sentences.

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

Completeness3/5

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

With three fully documented required parameters and a rich annotation set, the main gap the description must fill is return values, and it does so since there is no output schema. However, for a statistical estimation tool it omits the key caveats an agent would want flagged (proportional hazards assumption, minimum sample size, censoring implications).

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%; the schema itself already specifies the no-intercept covariate matrix, strictly equal lengths across times/events/X, positive times, and the 1/0 event coding with at least 2 events. The description adds no meaning beyond that, so the baseline 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?

States a specific method (Cox proportional hazards regression) and its scope — multi-factor effects on survival time, reporting HR with 95% CI and p-values plus an overall model test. An agent can tell what the tool does, but nothing distinguishes it from the sibling `survival_cox` or from `act_cox_stuart` (a trend test on the same name stem), so the differentiation half of the criterion is unmet.

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

Usage Guidelines2/5

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

The phrase '要看多个因素对生存时间的影响' implies a use case, but there is no explicit when-to-use, no when-not-to-use, and no named alternative. With both `survival_cox` and `act_cox_stuart` present in the sibling list, an agent receives no help choosing between them.

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.