Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

sensemakr

Read-only

Assess whether an estimated treatment effect survives unobserved confounding. Quantify the minimum confounder strength needed to nullify or reverse a result, benchmarking against observed controls to guide verdicts.

Instructions

Sensitivity analysis for omitted variable bias (Cinelli & Hazlett 2020). Validation: certified parity evidence. Assumptions: Cinelli-Hazlett (2020) omitted-variable sensitivity in the partial-R-squared framework; the Robustness Value is the minimum partial R-squared a confounder needs with both treatment and outcome to nullify the estimate; Outcome is modeled by OLS of y on treat plus observed controls; benchmarking calibrates confounder strength relative to named observed controls; rv_q is the RV to change the point-estimate sign; rv_qa is the RV to lose significance at alpha. Pre-conditions: A DataFrame with outcome, treatment, and observed control columns; At least one control to anchor the benchmark comparison. Failure modes: Benchmark names a control not present in the controls list or data -> Pass benchmark names that are a subset of the controls actually included in the regression; Perfectly collinear controls make the partial-R-squared decomposition unstable -> Drop redundant collinear controls before computing the robustness value. Alternatives: sp.oster_bounds, sp.evalue, sp.unified_sensitivity. Typical minimum N: 50.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome column
alphaNoSignificance level for confidence intervals and tests.
treatYesTreatment column of interest
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
controlsYesObserved control variables
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.
benchmarkNoCovariates to benchmark confounding strength against
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.
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

A4.6/5.0
Behavior4/5

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

The annotations only provide readOnlyHint=true, which is consistent with a sensitivity analysis tool. The description adds significant behavioral context: it discloses the modeling assumption (OLS of y on treat plus controls), defines the Robustness Value and its variants (rv_q, rv_qa), explains benchmarking, and details failure modes. This is valuable beyond the annotation. However, it does not mention whether it writes to disk or performs other side effects, but since readOnlyHint is set, the agent can safely assume it is a read operation. The description exceeds the baseline by providing framework details but could still mention whether it caches results (though as_handle parameter suggests it may), so a perfect 5 is not given.

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 structured with clear labels (Validation, Assumptions, Pre-conditions, Failure modes, Alternatives) and is front-loaded with the core purpose. It is long but every sentence adds information; no fluff. It could be slightly more concise, but the structure aids readability and the density of content justifies its length. A 4 reflects that it is well-organized but not extremely short.

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

Completeness5/5

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

The tool is complex: it has 11 parameters, no output schema (has output schema true in signals, but not provided), and many sibling tools that perform similar analyses. The description covers the method's assumptions, key concepts, pre-conditions, failure modes, and alternatives. It even mentions suggested minimum N (50). Given the complexity and the lack of an output schema shown, the description is nearly exhaustive for an agent to know when and how to call it correctly. The detail parameter is self-explanatory with examples. No critical gap is apparent.

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% and each parameter has a description, so the baseline is 3. The tool description adds extra semantic context: it explains what 'benchmark' means (covariates to benchmark confounding strength against, and clarifies that benchmark names must be a subset of controls), and it also mentions rv_q and rv_qa outputs that relate to the alpha parameter. It also explains the 'detail' parameter's purpose (e.g., 'agent' for planning). This goes beyond the schema descriptions, so a 4 is appropriate.

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 begins with a specific verb phrase 'Sensitivity analysis for omitted variable bias', naming the resource (the sensitivity analysis) and the method (Cinelli & Hazlett 2020). It clearly distinguishes itself from siblings like oster_bounds and evalue that also do sensitivity analysis, by spelling out the partial-R-squared framework, Robustness Value, and benchmarking. The purpose is unambiguous and not a tautology.

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

Usage Guidelines5/5

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

The description explicitly names alternatives (sp.oster_bounds, sp.evalue, sp.unified_sensitivity) and states assumptions and pre-conditions (need treatment, outcome, controls). It also lists failure modes with corrective actions (e.g., benchmark names must be subset of controls, collinear controls cause instability and should be dropped). This tells the agent exactly when to use this tool over siblings and how to avoid common pitfalls.

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