Skip to main content
Glama

Kaplan-Meier curve / Kaplan-Meier 曲线

kaplan_meier
Read-only

Kaplan-Meier curve / Kaplan-Meier 曲线 | USE WHEN: KM curve and median survival only (no multivariable model) | ALIASES: KM曲线, Kaplan-Meier, 中位生存, 生存曲线, 生存率, log-rank | RETURNS: KM 曲线与中位生存

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "times": [
        5,
        12,
        18,
        24,
        30,
        42
      ],
      "events": [
        1,
        1,
        0,
        1,
        1,
        0
      ]
    },
    "name": "kaplan_meier"
  }
}

Input Schema

NameRequiredDescriptionDefault
timesYes随访时间(一维数值数组,须 >0)。与 events 等长;负时间会被 400 拒绝(否则会算出负的中位生存期)。
eventsYes事件指示,1=事件发生、0=删失(只接受二值编码,传 2/3 会被 400)。与 times 等长;全删失时不给中位生存期。
groupsNo分组标签(一维数组,长度=样本数,如 ["A","B",…])。**不传只出总体曲线、没有 log-rank**;等价字段名 group_ids 也认。
group_idsNo分组标记的**规范字段名**(与 groups 等价,两者都认)。长度=样本数;不传则只出总体曲线、没有 log-rank。

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / events / description
      Previous value: -"事件 0/1"New value: +"事件指示,1=事件发生、0=删失(只接受二值编码,传 2/3 会被 400)。与 times 等长;全删失时不给中位生存期。"
    • addedInput schema / properties / group_ids
      Added value: +{
      +  "description": "分组标记的**规范字段名**(与 groups 等价,两者都认)。长度=样本数;不传则只出总体曲线、没有 log-rank。",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / groups / description
      Previous value: -"分组"New value: +"分组标签(一维数组,长度=样本数,如 [\"A\",\"B\",…])。**不传只出总体曲线、没有 log-rank**;等价字段名 group_ids 也认。"
    • changedInput schema / properties / times / description
      Previous value: -"随访时间"New value: +"随访时间(一维数值数组,须 >0)。与 events 等长;负时间会被 400 拒绝(否则会算出负的中位生存期)。"
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false and destructiveHint=false, so safety is covered. The description adds a 'RETURNS' line stating that both a curve and median survival come back, which is modest added value; it does not mention validation limits (negative times, non-binary event codes, all-censored input) that live only in the schema.

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 pipe-delimited, label-first layout (USE WHEN / ALIASES / RETURNS) front-loads the decision-relevant content and contains no filler. The bilingual title duplication is mildly redundant but consistent with the tool's presentation convention.

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?

With no output schema, the 'RETURNS' line supplies the necessary information about what comes back, and the schema carries parameter and validation detail. For a four-parameter read-only computation the definition is complete enough to invoke correctly.

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 times, events, groups and group_ids are already fully documented including equivalences and error behavior. The description contributes no parameter-level meaning beyond what the schema states, 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 names a specific statistical product (Kaplan-Meier curve plus median survival) and scopes it to the univariable case with 'USE WHEN: KM curve and median survival only (no multivariable model)', which implicitly separates it from Cox-type modeling siblings. It is clear what the tool computes, though it does not name a specific sibling tool.

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: KM curve and median survival only (no multivariable model)' gives an explicit inclusion condition and an implicit exclusion that routes multivariable analyses elsewhere. The alias list further helps matching user phrasing, but no explicit 'use X instead' callout is made.

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