Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

proximal

Read-only

Estimates causal effect of a treatment on an outcome despite unmeasured confounders, using two proxies and linear 2SLS on an outcome bridge.

Instructions

Proximal Causal Inference via linear 2SLS on the outcome bridge. Identifies ATE with unmeasured confounding using two proxy variables: a treatment-side Z (instrument for W) and an outcome-side W (endogenous bridge regressor). Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Existence of an outcome bridge function h(w, a, x) that recovers E[Y(a) | U, X]; Z and W are conditionally independent given U and (A, X); Z perp Y | U, A, X (exclusion on Z). Pre-conditions: at least one treatment-side proxy Z (independent of outcome given U, X); at least one outcome-side proxy W (independent of treatment given U, X); proxy_z and proxy_w measure the same unmeasured confounder U from different angles. Failure modes: First-stage (Z -> W) too weak -> Try richer Z or more proxies; without first-stage strength the bridge is underidentified; Proxies collapse to nearly-constant -> Proxy variation insufficient -- redesign measurement or fall back to sensitivity (sp.sensemakr); Estimate highly sensitive to bridge specification -> Report multiple bridge families; compare with sp.negative_control_outcome / _exposure. Alternatives: sp.neg...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome
treatYesTreatment
bridgeNoBridge function familylinear
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
n_bootNoBootstrap SE replications
proxy_wYesOutcome-side proxies (endogenous)
proxy_zYesTreatment-side proxies (instruments for W)
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.
covariatesNoBaseline covariates
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.8/5.0
Behavior4/5

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

With readOnlyHint=true already in annotations, the description still adds meaningful behavioral context: the validated-evidence-tier caveat, a full assumption list, and failure modes including underidentification from a weak first stage (Z->W) and near-constant proxies. No contradiction with the read-only annotation — the tool is a non-mutating estimation routine. The only omission is output-shape behavior, which the output schema covers.

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

Conciseness3/5

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

The front-loaded core (method, estimand, proxy roles) is good, but the description is long and dense, with formal assumption notation (h(w,a,x), E[Y(a)|U,X], Z perp Y) that exceeds what an agent needs for selection. It also ends mid-sentence at 'Alternatives: sp.neg...', which signals truncation and hurts structure. Valuable content, but not economical.

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 complex 13-parameter method with an output schema and annotations, the description covers validation tier, assumptions, pre-conditions, and failure modes — enough to call the tool correctly in most cases. Gaps are minor: the alternatives section is cut off, and there is no guidance on interacting parameters like covariates, detail levels, or data_sample_n, though the schema handles those individually.

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 coverage is 100%, so every one of the 13 parameters is already documented in the input schema; the baseline is therefore 3. The description adds modest conceptual value by explaining the proxy role pairing ('measure the same unmeasured confounder U from different angles') and noting the bridge family is currently restricted to linear, but most parameter meaning is carried by the schema itself.

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

Purpose4/5

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

The description opens with a specific verb+resource+mechanism: 'Proximal Causal Inference via linear 2SLS on the outcome bridge' and states the estimand (ATE under unmeasured confounding) with clearly defined proxy roles. It names negative_control_outcome/_exposure as alternatives to compare against, which separates it from those siblings, but it never distinguishes itself from the near-named sibling proximal_regression, so differentiation is incomplete.

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 supplies explicit pre-conditions (one treatment-side Z, one outcome-side W, both measuring the same unmeasured confounder U from different angles), which effectively define when the tool is appropriate. Failure modes give concrete escalation paths ('fall back to sensitivity (sp.sensemakr)', 'compare with sp.negative_control_outcome / _exposure'), though the final 'Alternatives:' sentence is truncated and there is no explicit 'do not use when' statement.

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