Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

bridge

Read-only

Reconcile two causal estimates using bridging theorems, test agreement, and return a doubly-robust combined recommendation.

Instructions

Unified dispatcher for six causal-inference bridging theorems (2025-2026): DiD==SC (Shi-Athey), EWM==CATE (Ferman), IPW==DR==CB (Zhao-Percival), Bunching==RDD (Lu-Wang-Xie), DR-via-Calibration (Zhang), Long-term-surrogate==PCI (Imbens-Kallus-Mao-Wang). Reports both path estimates + doubly-robust recommendation. Assumptions: The two estimation paths being bridged target the same causal estimand under the chosen bridging theorem (e.g., DID = synthetic control for kind='did_sc'); Each path's own identification holds (parallel trends / SC convex-hull / proximal completeness, depending on kind), so a non-rejected agreement test is meaningful; The doubly-robust combined estimate is consistent if at least one of the two bridged paths is correctly specified. Pre-conditions: kind is one of the supported bridges and the matching per-bridge kwargs are supplied; Panel/data shape matches the chosen bridge (e.g., did_sc needs unit, time, treated_unit, treatment_time); Both paths are estimable on the same sample so the agreement test is well-defined. Failure modes: Agreement test rejects: the two paths give materially different estimates -> Treat divergence as evidence one bridging assumption fa...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesWhich bridge to invoke
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
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.
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
Behavior5/5

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

Goes well beyond the readOnlyHint annotation by disclosing assumptions (e.g., target estimand must match), pre-conditions (data shape, kwargs), and failure modes (agreement test rejection implies assumption violation). It also mentions the doubly-robust property of the combined estimate. This is rich behavioral disclosure that helps an agent anticipate outcomes.

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 longer than the minimal ideal but each section (purpose, assumptions, pre-conditions, failure modes) earns its place for a complex dispatcher. It is front-loaded with the core purpose and then abuts relevant usage constraints. Slightly verbose but not redundant.

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?

Given the tool's complexity and the presence of an output schema, the description is comprehensive: it lists all six bridge types, specifies assumptions and pre-conditions, and mentions failure modes. It does not need to explain return values because the output schema exists. It equips an agent with enough to invoke the tool correctly.

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%, so the baseline is 3. The description adds valuable parameter-related context, such as the meaning of the 'kind' values (mapping theorem pairs) and giving an example of required columns for 'did_sc'. This goes beyond the schema's 'Which bridge to invoke' and helps agents map inputs to the correct bridge.

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?

Clearly states it is a 'unified dispatcher' for six specific causal-inference bridging theorems, naming each pairing (e.g., 'DiD==SC', 'IPW==DR==CB'). The verb 'bridge' and resource are specific, and the description distinguishes it from single-estimator siblings by focusing on path estimates plus a doubly-robust recommendation.

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?

Provides clear context on when it applies: it enumerates the six bridge types, states pre-conditions (per-bridge kwargs, panel shape) and references failure modes. It does not explicitly name alternative tools to use instead when one only needs a single estimator, but the specification of bridging targets implicitly guides selection.

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