Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

unified_sensitivity

Read-only

Run every applicable sensitivity analysis in one shot—E-value, Oster's delta, Rosenbaum Gamma, Sensemakr—on a fitted causal estimate to assess robustness to unobserved confounding.

Instructions

Run every applicable sensitivity analysis in one shot: E-value, Oster delta (when R^2 inputs given), Rosenbaum Gamma (when matched_pairs outcomes exposed), Sensemakr (when raw data supplied via data/y/treat/controls), and a breakdown-frontier bias estimate. Also available as result.sensitivity(). Assumptions: Dashboard that dispatches every applicable sensitivity method (E-value, Cinelli-Hazlett RV, Oster's delta) to one fitted result; Oster's delta requires the short- and long-regression R-squared (r2_treated, r2_controlled) plus beta_uncontrolled; rho_max is Oster's R_max bound (default 1.0); The Sensemakr component needs the raw estimation data via data/y/treat/controls; result objects do not carry it, so it is skipped (with a note) when those are omitted. Pre-conditions: A result with point estimate, SE, and CI attributes; r2_treated and r2_controlled for the Oster's-delta component. Failure modes: Result lacks estimate/se/ci, so no sensitivity component can be computed -> Pass a fitted result exposing estimate, se, and ci rather than a raw scalar or DataFrame; Oster's delta omitted because r2_treated / r2_controlled were not provided -> Pass the short- and long-regression R-s...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yNoOutcome variable column name or outcome array.
treatNoTreatment indicator or first-treatment-period column.
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
resultYesresult parameter (CausalResult | EconometricResults).
rho_maxNorho_max parameter (float).
controlsNoControl-variable column names.
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_pathNoAbsolute 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.
r2_treatedNor2_treated 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.
include_osterNoWhether to include oster.
r2_controlledNor2_controlled parameter (float).
beta_uncontrolledNobeta_uncontrolled parameter (float).
include_rosenbaumNoWhether to include rosenbaum.
include_sensemakrNoWhether to include sensemakr.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the readOnlyHint/openWorldHint annotations, the description discloses real behavioral traits: Sensemakr is 'skipped (with a note)' when raw data is absent, the Oster component silently degrades when r2 inputs are missing, and the tool fails entirely when result lacks estimate/se/ci. The aliasing note ('Also available as result.sensitivity()') adds integration context. Nothing contradicts the annotations.

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

Conciseness2/5

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

The description is a dense, rambling block that mixes dispatch behavior, parameter definitions, assumptions, and pre-conditions under mislabeled headers — rho_max's definition and Sensemakr's data requirement are filed under 'Assumptions' rather than parameters or conditions. Pre-conditions are duplicated across the 'Assumptions' and 'Pre-conditions' sections, and the text truncates mid-sentence ('Pass the short- and long-regression R-s...'). The first sentence is excellent, but the rest lacks editing.

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 17-parameter tool with five conditional components, the description covers dispatch rules, preconditions, and failure modes, and an output schema exists so return values need not be explained. However, it is literally cut off mid-sentence, the breakdown-frontier component's own requirements are never stated (unlike the other four methods), and the relationship to sibling sensitivity_dashboard / sensitivity tools is not clarified. It attempts completeness but falls short.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but several schema descriptions are near-tautological ('rho_max parameter (float)'), and the description enriches them: rho_max is 'Oster's R_max bound (default 1.0)', result must be a fitted object exposing estimate/se/ci rather than a scalar, and data/y/treat/controls feed the Sensemakr component. Major params (detail, as_handle, data_path, result_id, include_* flags) are left to the schema, which already documents them well.

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 opening sentence names a specific verb and resource: 'Run every applicable sensitivity analysis in one shot,' then enumerates the five dispatched methods (E-value, Oster delta, Rosenbaum Gamma, Sensemakr, breakdown-frontier). This distinguishes it from the many single-method siblings (sensemakr, oster_delta, rosenbaum_gamma, evalue, breakdown_frontier) by framing it as the unified dispatcher.

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?

The description gives conditional applicability for each component ('Oster delta when R^2 inputs given,' 'Rosenbaum Gamma when matched_pairs outcomes exposed,' 'Sensemakr when raw data supplied'), states pre-conditions (result with point estimate/SE/CI, r2 inputs), and provides corrective failure-mode guidance ('Pass a fitted result exposing estimate, se, and ci rather than a raw scalar or DataFrame'). It does not explicitly route users to single-method siblings when only one analysis is needed, so it stops short of full when-not guidance.

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