Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

synth_survival

Read-only

Estimates treatment effect on survival: fits donor Kaplan-Meier curves to pre-treatment data and reports post-treatment gap with placebo UCBs.

Instructions

Synthetic Survival Control (Han & Shah 2025, arXiv:2511.14133). Fits a convex combination of donor Kaplan-Meier curves on the complementary log-log scale to match the treated arm's pre-treatment survival, then reports the post-treatment survival gap with placebo UCBs. Assumptions: A convex (or regularized) combination of donor units reproduces the treated unit's pre-treatment outcome path; No interference: the treatment does not affect the donor units (SUTVA); No anticipation before the treatment date. Pre-conditions: Panel of one or more treated units plus an untreated donor pool, observed over time; Pre-treatment window long enough to fit donor weights (rule of thumb: more pre-periods than donors used); Outcome observed for every unit in every period. Failure modes: Large pre-treatment RMSPE -- the synthetic unit fails to track the treated unit before treatment -> Add donors / predictors, lengthen the pre-period, or use a bias-corrected estimator (sdid, augsynth); Placebo / permutation inference shows the estimate is not extreme relative to donors -> Report the placebo distribution honestly; the effect may not be distinguishable from noise; Pre-treatment RMSPE > post-treatment e...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoRandom seed for reproducible stochastic steps.
timeYesTime period column.
unitYesUnit/panel-id column
alphaNoSignificance level for confidence intervals and tests.
detailNoPayload depth: 'minimal' (~150 tokens) for sub-step calls where only the point estimate is needed; 'standard' (~1K tokens) for diagnostics + coefficient table; 'agent' (~2K tokens, default) adds violations / next_steps / suggested_functions so the LLM can plan its next call without another round-trip.agent
treatedYesBoolean column or name of the single treated unit
survivalYesColumn with survival probability S_i(t)
as_handleNoIf true, cache the fitted result on the server and return result_id + result_uri alongside the JSON payload so a subsequent tools/call can chain without re-running.
data_pathYesAbsolute path or URL to a data file. Supported: .csv / .tsv / .txt (delimited), .parquet / .pq, .feather / .arrow, .xlsx / .xls, .dta (Stata), .json / .jsonl. Schemes: file://, s3://, gs://, https://.
result_idNoOptional handle to a previously-fitted result (returned by an earlier call when as_handle=true). Tools that operate on a fitted object accept this in place of re-supplying data_path + columns.
n_placebosNoNumber of placebos.
treat_timeYestreat_time parameter (float).
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, which the description does not contradict. The description adds substantial behavioral context: it discloses the method's assumptions (SUTVA, no anticipation), pre-conditions, and specific failure modes (pre-treatment RMSPE, placebo inference). This goes beyond the annotation and informs the agent about limitations and when results might be unreliable.

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 description is long but well-structured with clear sections (Assumptions, Pre-conditions, Failure modes). It front-loads the purpose and then organizes constraints. While verbose, each section adds value for a complex estimator. The cut-off at the end suggests it might be even longer, but the visible portion is justified and not repetitive.

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?

Given the complexity of the tool, the description covers a lot: method, assumptions, pre-conditions, and failure modes. An output schema exists to document return values, so the description doesn't need to detail that. The only minor gap is that it doesn't explicitly tie parameters to usage steps (e.g., how to set treat_time), but this is compensated by schema descriptions. Overall, an agent has enough to invoke it 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% — every parameter already has a description in the input schema. The tool description does not add parameter-specific guidance beyond what the schema provides (e.g., it doesn't explain how to map 'pre-treatment window' to treat_time or how data_path interacts with survival). It mostly repeats context already available. Baseline 3 is appropriate given full schema coverage.

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

Purpose5/5

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

The description states a specific verb ('fits'), a resource (donor Kaplan-Meier curves), and a clear method (convex combination on complementary log-log scale to match pre-treatment survival, then reports post-treatment gap). It distinguishes itself from other synth tools by focusing on survival outcomes, which is explicit. The citation and technical detail leave no ambiguity about what the tool computes.

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

Usage Guidelines3/5

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

The description provides pre-conditions (panel data, pre-treatment window, outcome observed) and failure modes with suggested alternatives (sdid, augsynth). However, it never explicitly states 'use this when you have survival/time-to-event data' or contrasts it with sibling tools like synth or synthdid_estimate. The guidance is implied through the survival focus, but not made explicit enough to route an agent decisively.

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

Deploy Server

Other Tools