Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

proximal_regression

Read-only

Estimate causal treatment effects from observational data when confounding is unmeasured by leveraging proxy variables (Z, W) in a doubly-robust regression.

Instructions

Doubly-robust regression-based PCI estimator for the ATE. Assumptions: A treatment-inducing confounding proxy Z and an outcome-inducing confounding proxy W are observed; Outcome and treatment confounding bridge functions exist (proximal-g and proximal-h completeness conditions); Latent confounding is fully captured by (Z, W, X) -- no residual unmeasured confounding outside the proxy span. Pre-conditions: data has outcome, binary treatment, z_proxy and w_proxy columns; treatment is binary for the bridge logistic step. Failure modes: Treatment-bridge logistic regression fails to converge; propensity collapses to the marginal P(D=1) -> Check detail['propensity_fallback']; the DR correction is neutralised -- improve proxies or covariates. Alternatives: sp.proximal, sp.double_negative_control, sp.frontdoor. Typical minimum N: 200.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome column.
alphaNoSignificance level for confidence intervals and tests.
treatYesBinary 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
w_proxyYesOutcome-inducing confounding proxy W.
z_proxyYesTreatment-inducing confounding proxy Z.
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.
covariatesNoMeasured covariates X.
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.
propensity_boundsNopropensity_bounds parameter (tuple).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint=true annotation, the description discloses concrete failure modes: treatment-bridge logistic regression may fail to converge, propensity may collapse to the marginal P(D=1), and the DR correction is neutralized, with an instruction to check detail['propensity_fallback'] and improve proxies or covariates. It also notes a typical minimum N of 200.

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

Conciseness5/5

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

The description is front-loaded with the core purpose, then organized into assumptions, pre-conditions, failure modes, alternatives, and sample size guidance. Each sentence carries useful, non-redundant information for a complex estimator.

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?

For a complex causal-inference tool in a large sibling list, the description covers what the estimator does, its identifying assumptions, required inputs, failure modes, fallback diagnostics, alternatives, and minimum sample size. An output schema exists, so return-value details are not needed in the description.

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 input schema already documents all 13 parameters, including z_proxy and w_proxy. The description adds little parameter-specific meaning beyond restating that treatment must be binary; it mostly reinforces what the schema already says.

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 first sentence states a specific purpose: a doubly-robust regression-based PCI estimator for the ATE. It is clearly distinguished from siblings by its assumptions (Z and W proxies, bridge functions) and by naming alternatives like sp.proximal, sp.double_negative_control, and sp.frontdoor.

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 explicit pre-conditions (outcome, binary treatment, z_proxy/w_proxy columns, binary treatment for logistic bridge) and assumptions, which tells the agent when this tool is appropriate. It also names alternatives, though it does not fully explain when to prefer each alternative over this one.

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