Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

causal_forest

Read-only

Estimate heterogeneous treatment effects from observational data, showing how impact varies across segments to guide targeted decisions.

Instructions

Causal Forest for heterogeneous treatment effect estimation (CATE). Validation: certified evidence with scoped limitations. Known limitations: The AIPW ATE/ATT are validated against grf on clean-overlap designs only; under severe propensity-overlap loss the AIPW influence function inflates the standard error (conservative, over-covering inference), so inspect the sp.audit overlap diagnostic before interpreting the ATE on that kind of sample. Assumptions: Unconfoundedness: Y(d) perp D | X; Overlap: 0 < P(D=1 | X) < 1 for the estimand support; Honest splitting: splits and estimates use disjoint samples (enforced by default). Pre-conditions: formula uses pipe separator: 'y ~ treatment | x_1 + x_2 + ...'; treatment is binary 0/1 (use sp.multi_arm_forest for multi-valued); covariates are numeric; encode categoricals beforehand. Failure modes: Calibration test (sp.calibration_test) rejects -> CATE predictions are miscalibrated -- increase n_trees, add variables, or switch to a DR-Learner; Variance of CATE estimates too large to be useful -> Need more observations or narrower conditioning set; consider GATE on discrete subgroups; Extreme propensity scores in part of the covariate space -...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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
formulaYes'y ~ treatment | x1 + x2' (pipe separates covariates)
n_treesNoNumber of trees.
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.8/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses validation scope ('validated against grf on clean-overlap designs only'), a known limitation (inflated standard error under severe propensity-overlap loss), statistical assumptions, and failure modes. It even tells the agent to inspect the overlap diagnostic before interpreting the ATE. No contradiction with annotations.

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 dense but organized into labeled sections (Validation, Known limitations, Assumptions, Pre-conditions, Failure modes), with the purpose front-loaded. Some phrasing is jargon-heavy and the failure-modes list is long, but nearly every sentence carries decision-relevant information.

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-estimation tool with an output schema and read-only annotation, the description covers what is estimated, required assumptions, formula syntax, known inference limitations, and failure responses. This is sufficient for an agent to decide whether and how to call 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 value by specifying the formula contract: pipe separator, binary treatment, numeric covariates, and encoded categoricals. It also connects n_trees to calibration-failure remediation ('increase n_trees'), going beyond the schema descriptions without restating every parameter.

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 description opens with a specific estimator and target: 'Causal Forest for heterogeneous treatment effect estimation (CATE).' It also disambiguates scope by stating that treatment must be binary and pointing to sp.multi_arm_forest for multi-valued treatments, which helps distinguish this tool from related CATE and forest-family tools.

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

Usage Guidelines5/5

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

The Pre-conditions section gives explicit exclusion criteria and a named alternative: 'treatment is binary 0/1 (use sp.multi_arm_forest for multi-valued)'. The Failure modes section adds remedial routing: switch to a DR-Learner if calibration fails, or consider GATE on discrete subgroups when variance is too large. This is concrete when/alternative 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