Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

oaxaca

Read-only

Decompose mean outcome gaps between two groups into explained and unexplained components, showing how much of the difference is due to covariates versus group membership.

Instructions

Oaxaca-Blinder decomposition of mean outcome gaps. Validation: certified parity evidence. Assumptions: Linearity of conditional mean within each group; Constant returns to covariates within group (no interactions ignored); Reference-group choice does not change interpretive sign of explained vs. unexplained gaps. Pre-conditions: Binary group indicator with both groups represented; Linear specification of outcome on covariates within each group. Failure modes: Detailed decomposition signs flip when reference group changes -> Report aggregated decomposition only, or use pooled reference (Neumark / Cotton). Alternatives: sp.ffl_decompose, sp.dfl_decompose, sp.rif_decomposition. Typical minimum N: 200.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesCovariate names.
yYesOutcome variable name.
alphaNoSignificance level for p-values.
groupYesBinary group indicator (0 = Group A, 1 = Group B).
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://.
referenceNoReference coefficient vector beta*: - ``0`` -- Group A coefficients (beta_A). The "explained" part uses Group A's returns as the benchmark. - ``1`` -- Group B coefficients (beta_B). - ``'pooled'`` -- Pooled OLS (Neumark 1988). - ``'cotton'`` -- Sample-size weighted average (Cotton 1988). - ``'reimers'`` -- Equal-weighted average (Reimers 1983).
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.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the agent knows it is a safe read. The description adds valuable behavioral context: explicit assumptions, pre-conditions, failure modes, and a validation claim. It does not describe output structure, but that is covered by the output schema. It adds substantial context beyond 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 single paragraph but clearly structured with labeled sections (Assumptions, Pre-conditions, Failure modes, Alternatives, Typical minimum N). Every sentence earns its place; there is no filler or repetition. It is front-loaded with the core purpose.

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 and that an output schema exists, the description covers the key contextual needs: assumptions, pre-conditions, failure modes, alternatives, and sample size guidance. It does not mention handling of missing data or data formats, but those are covered by the input schema. It is complete enough for an agent to 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 100%, so every parameter is already well-documented in the schema. The description adds little parameter-specific meaning beyond the schema; it only touches on the 'reference' parameter indirectly in the failure mode note. Baseline of 3 is appropriate since the schema does the heavy lifting.

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?

States the exact method (Oaxaca-Blinder decomposition) and the resource (mean outcome gaps) with a specific verb. It distinguishes itself from siblings by naming alternatives, so an agent can tell it apart from ffl_decompose, dfl_decompose, and rif_decomposition without inspecting their schemas.

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?

Provides explicit pre-conditions (binary group indicator, both groups represented, linear specification), failure modes (sign flips when reference group changes) with remediation, and names specific alternative tools. It also gives a typical minimum N, which helps an agent decide whether the data is sufficient. This is unusually thorough 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