Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

overlap_weights

Read-only

Estimate causal treatment effects using overlap weights (ATO) to balance covariates between treated and control groups, with diagnostics for overlap and covariate balance.

Instructions

Overlap-weight (ATO) treatment effect estimator. Validation: certified parity evidence. Assumptions: Unconfoundedness: treatment is as-good-as-random given the measured covariates; Overlap / common support: every unit has a non-degenerate probability of each treatment; The covariate set blocks all back-door paths. Pre-conditions: Pre-treatment covariates measured for treated and control units; A binary (or low-cardinality) treatment indicator; Sufficient covariate overlap between treatment arms. Failure modes: Poor overlap -- extreme propensity scores or few acceptable matches -> Trim or restrict to the common-support region and report the discarded units; Covariate imbalance remains after matching/weighting -> Re-specify the balancing model (CBPS, entropy balancing) and re-check standardized mean differences. Alternatives: sp.propensity_score, sp.cbps, sp.ebalance, sp.dml. Typical minimum N: 200.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome column.
seedNoRandom seed for reproducible stochastic steps.
trimNoOptional clip of pscore to ``[trim, 1-trim]``. For overlap weights this is rarely needed -- set to 0 by default.
alphaNoSignificance level for confidence intervals and tests.
treatYesBinary 0/1 treatment 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
estimandNoWhich generalized-weight scheme to use. All follow Li-Li-Li (2019) Table 1; 'ATO' uses the overlap weights; 'matching' uses the ``min(e, 1-e)`` weight; 'entropy' uses ``-e*log(e) - (1-e)*log(1-e)``; 'ATE/ATT/ATC' reduce to standard IPW for comparison.ATO
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.
covariatesYesCovariates for the logistic propensity-score model.
n_bootstrapNoPaired-sample bootstrap replications for SE.
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.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false; the description adds meaningful behavioral context by disclosing failure modes (extreme propensity scores, residual imbalance) and remediation steps, as well as a typical minimum N of 200. It does not mention the caching side effect of as_handle=true, but that is parameterized behavior is absent from the description, so it doesn't contradict the read-only annotation.

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 substantial but organized with labeled sections (Validation, Assumptions, Pre-conditions, Failure modes, Alternatives, Typical minimum N) and front-loads the core estimator identity. Each sentence earns its place, though 'certified parity evidence' is ambiguous and slightly cryptic.

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?

For a 14-parameter estimator with an output schema, the description covers statistical context (assumptions, pre-conditions, failure modes, alternatives, minimum N) while the schema fully documents parameters and output. Nothing critical for tool invocation is missing; only the 'Validation: certified parity evidence' line is opaque.

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 the baseline holds. The description adds contextual rationale for trim (rarely needed, clip to [trim, 1-trim]) and implicitly for estimand via the ATO default, but it does not systematically describe each of the 14 parameters; the schema carries that burden.

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 opens with a specific method-object pair, 'Overlap-weight (ATO) treatment effect estimator,' which clearly identifies the estimator and its target. It further differentiates from siblings by explicitly listing alternatives (sp.propensity_score, sp.cbps, sp.ebalance, sp.dml), so an agent can select it without inspecting the schema.

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 provides explicit assumptions (unconfoundedness, overlap, back-door closure) and pre-conditions (pre-treatment covariates, binary treatment, sufficient overlap), which collectively signal when the tool is appropriate. Failure modes also advise remedies like trimming or re-specifying with CBPS/entropy balancing. However, it doesn't directly state when to prefer ATO over ATE/ATT/ATC as an estimand choice beyond the default.

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