Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

cross_validate

Read-only

Cross-validate an estimand across independent statistical engines and report agreement (AGREE, PARTIAL, DISAGREE, INSUFFICIENT). Use to honor the cross-package reproducibility rule: trust only when >=2 independent implementations match.

Instructions

Cross-validate ONE estimand across INDEPENDENT engines (StatsPAI, pyfixest, linearmodels, DoubleML, R's fixest, Stata) and report whether they agree (AGREE / PARTIAL / DISAGREE / INSUFFICIENT). Use this to honour the cross-package reproducibility rule: trust a number only when >=2 independent implementations reproduce it. Needs a data_path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gNoDiD only: cohort / first-treatment period (0 = never treated).
iNoDiD only: unit-id column.
tNoDiD only: time column.
yNoOutcome column.
vcovNo
endogNoEndogenous regressors (IV).
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
enginesNoEngines to run, e.g. ['statspai','R::fixest','pyfixest','Stata']. Omit for 'auto' (all installed + applicable).
formulaNofixest-style 'y ~ x | fe | endog ~ z'.
estimandYesModel family to fit in every engine.
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_pathNoAbsolute 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.
treatmentNoFocal regressor (reconciled coefficient).
covariatesNo
instrumentsNo
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.
fixed_effectsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false. The description adds the key behavioral trait: it runs multiple independent engines and reports an agreement verdict, plus the rule for trusting a number. It does not contradict annotations. It does not detail the exact response structure beyond the enum, but the output schema (present) covers that. Overall it provides meaningful behavioral context beyond the annotations.

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

Conciseness5/5

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

The description is a compact three sentences with zero waste. The purpose is front-loaded, the usage guidance follows immediately, and the data_path requirement is stated last. Every sentence 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?

Given the tool's complexity (19 parameters, 6 estimand types) and the existence of an output schema, the description covers the essential context: what it does, when to use it, and the key requirement (data_path). It does not explain the meaning of each estimand or the exact output fields, but the schema and output schema handle that. It is complete enough for an agent to decide and call it correctly.

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 79%, so the schema already documents most parameters. The description only adds a note about data_path being needed, which is redundant with the required list (though data_path is not required, only estimand is required). It does not add meaningful semantic detail beyond the schema for the parameters. Baseline 3 is appropriate.

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 states a specific verb ('cross-validate'), a specific resource ('ONE estimand across INDEPENDENT engines'), and enumerates the engines (StatsPAI, pyfixest, linearmodels, DoubleML, R's fixest, Stata). It also names the output categories (AGREE / PARTIAL / DISAGREE / INSUFFICIENT), making the tool's function unambiguous and distinct from the many siblings that focus on single estimators or diagnostics.

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 gives explicit when-to-use guidance: 'Use this to honour the cross-package reproducibility rule: trust a number only when >=2 independent implementations reproduce it.' It also notes the need for data_path. It does not explicitly name alternatives for when not to use it, but the context is clear enough to route an agent correctly.

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