Skip to main content
Glama

kaplan_meier

Estimate survival curves from durations and event indicators, optionally grouped, to compare time-to-event outcomes across cohorts.

Instructions

Estimate survival curves with the Kaplan-Meier product-limit method.

``durations`` and ``events`` may be inline lists or ``"@<path>"`` references.
``groups`` optionally supplies one group label per observation (inline list
or ``"@<path>"`` file); when given, a separate curve is returned per group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventsYes
groupsNo
durationsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose useful input-handling behavior: values may be inline lists or '@<path>' references, and supplying groups yields one curve per group. However, it says nothing about assumptions (e.g. censoring convention for events), error conditions, or the shape of the returned curves beyond the per-group note.

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?

Three short sentences, front-loaded with the core purpose and then the parameter conventions. No filler, though the backtick-heavy formatting is slightly noisy rather than informative.

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?

For a 3-parameter statistical tool with no annotations and no output schema, the description covers inputs reasonably and hints at output ('a separate curve is returned per group'), but leaves the events encoding and result structure underspecified for an agent to call it confidently.

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 coverage is 0%, so the description must compensate, and it partially does: it explains the inline-vs-'@<path>' duality for durations/events and that groups takes one label per observation. It omits the critical semantics of events (presumably 1=event, 0=censored), leaving a key integer-encoding meaning undocumented.

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 verb and resource ('Estimate survival curves with the Kaplan-Meier product-limit method'), which is unambiguous and clearly distinct from most siblings. It does not explicitly differentiate from the nearest sibling (cox_regression), leaving the agent to infer the boundary.

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?

No when-to-use or when-not-to-use guidance is given. The description never mentions cox_regression or any other survival-analysis sibling, nor prerequisites such as data alignment between durations and events. The only usage context is the optional groups behavior.

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