Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

yu_elwert_decompose

Read-only

Decompose a group disparity into causal components with nonparametric estimation, providing certified parity evidence for decisions.

Instructions

Nonparametric causal decomposition of a group disparity. Validation: certified parity evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesAdjustment covariates (used to identify within-group CATEs).
yYesName of the (continuous) outcome column.
seedNoRandom seed for reproducible stochastic steps.
trimNoLower/upper clip for fitted propensities (only used in ``method="efficient"``).
alphaNoTwo-sided coverage level.
groupYesBinary group indicator (0/1) -- ``1`` = advantaged / index group.
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
methodNo``"plugin"`` uses within-cell OLS for outcomes and within-group logit for the propensity and computes plug-in expectations. ``"efficient"`` is the efficient-influence-function estimator of the authors' ``cdgd`` package (``cdgd0_manual``) on those same nuisance fits: Hajek-normalised doubly robust potential outcomes, with selection the residual so the components add up exactly -- recommended when nuisance functions might be misspecified. ``method="efficient"`` computed selection as a covariance of doubly robust scores, so the four components did not add up to the disparity (0.566 against 0.572 on a 2,000-row example), and used unnormalised inverse-probability weights. Given the same nuisance predictions it now matches ``cdgd::cdgd0_manual`` to machine precision. ``inference="analytic"`` is new. ``"plugin"`` is unchanged.plugin
n_bootNoNumber of bootstrap replications.
clusterNoColumn name to use for cluster bootstrap.
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://.
inferenceNo``"bootstrap"`` returns SEs and percentile CIs from the non-parametric (cluster-aware) bootstrap. ``"analytic"`` (only with ``method="efficient"``) returns the efficient-influence-function SEs and Wald CIs of ``cdgd``. ``"none"`` skips inference.bootstrap
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.
treatmentYesBinary treatment indicator (0/1).
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

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the description does not contradict the safety profile. It adds a 'validation' concept via 'certified parity evidence', but this is vague and does not explain estimator behavior, assumptions, or how decomposition components relate to the disparity.

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?

Two short sentences keep the core purpose front-loaded and easy to parse. The second sentence is compact but somewhat cryptic; it does not waste words but also does not add much concrete clarity.

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

Completeness2/5

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

For a causal-decomposition tool with 17 parameters and many sibling decomposition/mediation tools, this description is too sparse. It lacks any explanation of the causal framing, the meaning of 'certified parity evidence', or how this tool differs from alternatives, though the rich schema and output schema partially compensate.

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 the input schema already documents all 17 parameters thoroughly. The description adds no parameter-level detail, so it earns the baseline 3 rather than providing extra value beyond the schema.

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 uses a specific verb and resource ('nonparametric causal decomposition of a group disparity'), clearly conveying the tool's analytical purpose. However, it does not differentiate it from sibling decomposition tools such as disparity_decompose, melly_decompose, or mediation_decompose.

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

Usage Guidelines2/5

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

No guidance is provided on when to choose yu_elwert_decompose over alternatives, nor any exclusions or prerequisites. The phrase 'Validation: certified parity evidence' hints at a validation-related use case but does not help an agent decide among the many sibling tools.

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