Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

auto_cate_tuned

Read-only

Automatically tunes and compares CATE learners with Optuna, selecting the best-performing model for conditional average treatment effect estimation under cross-fitting and overlap validation.

Instructions

Optuna-tuned CATE learner race -- nuisance, per-learner, or both. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Unconfoundedness given the covariates; Overlap / positivity across the covariate space; Nuisance functions are estimated consistently; cross-fitting controls overfitting bias. Pre-conditions: Covariates, a treatment indicator, and an outcome for each unit; Enough data to fit flexible nuisance models with sample-splitting / cross-fitting. Failure modes: CATE estimates are unstable or extrapolate beyond the covariate support -> Restrict to the overlap region, increase data, or use a doubly-robust learner (DR-/R-learner). Alternatives: sp.dml, sp.causal_forest, sp.tmle. Typical minimum N: 500.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome variable column name or outcome array.
tuneNoTuning regime: - ``'nuisance'`` -- tune the shared outcome / propensity GBMs against held-out R-loss, then hand them to ``auto_cate``. (v0.9.5 behaviour.) - ``'per_learner'`` -- keep default nuisance models; for each learner, tune its final-stage CATE model against held-out R-loss. - ``'both'`` -- run ``'nuisance'`` first, then ``'per_learner'`` using the tuned nuisance. Most expensive; most thorough.nuisance
alphaNoSignificance level for confidence intervals and tests.
treatYesTreatment indicator or first-treatment-period 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
n_foldsNoNumber of cross-fitting or cross-validation folds.
samplerNosampler parameter (Optional[Any]).
timeoutNoWall-clock limit per study (seconds).
verboseNoverbose parameter (bool).
learnersNolearners parameter (LearnersArg).
n_trialsNoBudget for the nuisance-tuning study (ignored when ``tune == 'per_learner'``).
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.
covariatesYesCovariate matrix, DataFrame, or column names.
n_bootstrapNoNumber of bootstrap replications.
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
random_stateNoRandom seed or RandomState for reproducible stochastic steps.
search_spaceNoOverride default spaces. See :data:`DEFAULT_SEARCH_SPACE` and :data:`DEFAULT_PER_LEARNER_SEARCH_SPACE`. Passed through / see :func:`auto_cate`.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.
n_trials_per_learnerNoBudget for each per-learner study. Defaults to ``max(5, n_trials // 3)``.
per_learner_search_spaceNoOverride default spaces. See :data:`DEFAULT_SEARCH_SPACE` and :data:`DEFAULT_PER_LEARNER_SEARCH_SPACE`. Passed through / see :func:`auto_cate`.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already mark the tool read-only, and the description consistently adds behavioral context: required causal assumptions, cross-fitting, failure modes around instability/extrapolation, and validation tiers. This goes beyond the annotation without contradicting it.

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 compact and front-loaded with the core action, then uses labeled sections for validation, assumptions, pre-conditions, failure modes, alternatives, and sample size. A few phrases are slightly redundant (e.g., 'validated evidence tier'), but overall every section earns its place.

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 tool with 22 parameters and an output schema, the description covers the high-level conceptual context an agent needs: assumptions, preconditions, failure modes, and alternatives. It does not need to repeat return values because an output schema exists, though it could have been slightly more explicit about when to prefer this over auto_cate.

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 schema fully documents all 22 parameters. The description only echoes the tune enum in its first sentence and adds no parameter-level detail beyond what the schema already provides, so the baseline 3 is appropriate.

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 action: an Optuna-tuned CATE learner race with three tuning regimes. This clearly identifies the tool's function, but it does not explicitly contrast it with the closest sibling auto_cate or with metalearner/compare_metalearners, so differentiation is left mostly to the word 'tuned'.

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 pre-conditions, assumptions, a typical minimum N of 500, and failure-mode guidance (e.g., restrict overlap, use a DR-/R-learner). It lists alternatives (sp.dml, sp.causal_forest, sp.tmle) but does not give decision rules for choosing among them, so it stops short of full when/when-not guidance.

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