Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

rdmc

Read-only

Estimates causal effects from multi-cutoff regression discontinuity designs, validating assumptions and returning diagnostics to guide rollout, hold, or investigate decisions.

Instructions

Multi-cutoff RD design. Validation: certified parity evidence. Assumptions: Conditional expectations of potential outcomes are continuous at the cutoff; Units cannot precisely manipulate the running variable around the cutoff (no sorting); For fuzzy designs: monotonicity of treatment take-up at the cutoff. Pre-conditions: A continuous running/forcing variable with a known cutoff that (sharply or fuzzily) assigns treatment; Enough observations in a neighbourhood of the cutoff to fit a local polynomial. Failure modes: Density of the running variable jumps at the cutoff (manipulation / sorting) -> Run a McCrary / density test (rdplotdensity); if manipulation is present the design is invalid near the cutoff; Estimate swings with the bandwidth -- results are not robust -> Report a bandwidth-sensitivity curve and use a data-driven MSE-optimal bandwidth. Alternatives: sp.rdrobust, sp.rdrandinf, sp.rdbwselect. Typical minimum N: 500.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesRunning variable.
yYesOutcome variable.
alphaNoSignificance level for confidence intervals and tests.
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
kernelNoKernel function used for weighting or smoothing.triangular
cutoffsNoCutoff values.
poolingNoPooling method: 'ivw' (inverse-variance weighted) or 'equal'.ivw
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.
bandwidthNoBandwidth for local polynomial. If None, uses Silverman rule.
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.
cutoff_varNocutoff_var parameter (Optional[str]).
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/5.0
Behavior4/5

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

The description goes well beyond the readOnlyHint annotation by stating assumptions, validation expectations, failure modes, and recommended follow-up actions such as running rdplotdensity or reporting a bandwidth-sensitivity curve. This gives an agent meaningful behavioral context; only the phrase 'certified parity evidence' is vague.

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 compact and clearly structured into labeled sections: validation, assumptions, pre-conditions, failure modes, alternatives, and typical minimum N. Each section adds distinct information with little redundancy, making it easy for an agent to scan.

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 complex 14-parameter tool, the description covers assumptions, preconditions, failure modes, alternatives, and sample-size guidance, and the output schema covers return values. It could be slightly more complete by clarifying the multi-cutoff use case and when to choose each alternative, but the essential context is present.

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?

The input schema covers 100% of parameters, so the baseline is 3. The description adds some context by calling x a running/forcing variable, mentioning a known cutoff, and noteing data-driven MSE-optimal bandwidth, but it does not materially clarify individual parameter syntax or types beyond the schema.

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 identifies the tool as a multi-cutoff regression discontinuity design, which names a specific method and resource. It is not a tautology, and listing alternatives (sp.rdrobust, sp.rdrandinf, sp.rdbwselect) helps position it among siblings, though the phrasing lacks an explicit verb like 'estimates'.

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 concrete pre-conditions, including a continuous running variable with a known cutoff and sufficient observations near the cutoff. It also names alternatives and failure-mode remedies, but it never explicitly states when to choose rdmc over those alternatives.

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