Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

genmatch

Read-only

Estimate average treatment effect on treated outcomes via genetic matching, optimizing covariate balance for unbiased causal inference.

Instructions

Genetic Matching for ATT estimation. Validation: certified parity evidence. Cost: Genetic search: population_size x generations full matching + balance evaluations (default 40 x 20 = 800 matching passes), each of which builds a pairwise distance matrix. Budget it as hundreds of sp.match calls, not one. Assumptions: Unconfoundedness: treatment is as-good-as-random given the measured covariates; Overlap / common support: every unit has a non-degenerate probability of each treatment; The covariate set blocks all back-door paths. Pre-conditions: Pre-treatment covariates measured for treated and control units; A binary (or low-cardinality) treatment indicator; Sufficient covariate overlap between treatment arms. Failure modes: Poor overlap -- extreme propensity scores or few acceptable matches -> Trim or restrict to the common-support region and report the discarded units; Covariate imbalance remains after matching/weighting -> Re-specify the balancing model (CBPS, entropy balancing) and re-check standardized mean differences. Alternatives: sp.propensity_score, sp.cbps, sp.ebalance, sp.dml. Typical minimum N: 200.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNoNumber of matches per treated unit.
yYesOutcome variable column name or outcome array.
alphaNoSignificance level for confidence intervals and tests.
treatYesBinary treatment indicator.
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.
covariatesYesCovariate matrix, DataFrame, or column names.
generationsNogenerations parameter (int).
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
random_stateNoRandom seed or RandomState for reproducible stochastic steps.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.
mutation_rateNomutation_rate parameter (float).
population_sizeNopopulation_size parameter (int).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Even though annotations declare readOnlyHint=true, the description adds substantial behavioral context: a quantified cost model (40x20=800 matching passes, each building a pairwise distance matrix), assumptions, failure modes, and validation/certification evidence. This far exceeds what annotations provide and helps the agent anticipate runtime and diagnose poor results.

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 organized into labeled sections (Validation, Cost, Assumptions, Pre-conditions, Failure modes, Alternatives, Typical minimum N), making it scannable and front-loaded with the core purpose. It is lengthy but dense with actionable information; however, 'Validation: certified parity evidence' is cryptic and could be clarified, and the three assumptions/back-door bullet could be more compact.

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 15-parameter causal matching tool with 4 required parametershol아 높은 complexity, the description covers the full usage context: when it is valid (assumptions), what must hold (pre-conditions), what to do when it fails (failure modes), where to go next (alternatives), and expected cost. The presence of an output schema means return values need not be described, so nothing materially missing.

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%, and all parameters like population_size, generations, and mutation_rate already have detailed descriptions. The tool description only references defaults already present in the schema (e.g., 'default 40 x 20') without adding new meaning per parameter, so the baseline of 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 opens with 'Genetic Matching for ATT estimation', a specific verb+resource that names the method and estimand. It explicitly contrasts with 'hundreds of sp.match calls' and lists alternatives (sp.propensity_score, sp.cbps, sp.ebalance, sp.dml), so an agent can distinguish it from closely related matching and causal-inference siblings.

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?

Pre-conditions and assumptions (binary treatment, covariate overlap, unconfoundedness) clearly signal when genetic matching is appropriate. Alternates are namedтных. However, it does not explicitly state 'use X instead when Y' for each alternative, though failure-mode remedies like 're-specify the balancing model (CBPS, entropy balancing)' imply trade-offs. The guidance is strong but not fully explicit.

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