Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

rd_multi_extrapolate

Read-only

Extrapolates regression-discontinuity treatment effects from multiple cutoffs to new running-variable values.

Instructions

Multi-cutoff RD extrapolation (Cattaneo, Keele, Titiunik, Vazquez-Bare 2021). 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 name.
yYesOutcome variable name.
alphaNoSignificance level.
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
methodNoInterpolation method: - ``'linear'``: tau(x) = a + b*x - ``'polynomial'``: polynomial of degree min(len(cutoffs)-1, 3) - ``'weighted'``: inverse-variance weighted local linearlinear
cutoffsYesCutoff values. Must contain at least 2 cutoffs.
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.
eval_pointsNoRunning variable values at which to predict tau(x). Defaults to 30 equally spaced points spanning the data range.
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
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses key behavioral risks: a running-variable density jump invalidates the design and the estimate may be bandwidth-sensitive. It even instructs the agent to run rdplotdensity or use an MSE-optimal bandwidth, which is exactly the kind of non-obvious behavior an agent needs to anticipate.

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 longer than a simple one-liner, but every sentence is dense and useful: assumptions, preconditions, failure modes, alternatives, and sample-size guidance are all included. It would earn a 5 if it were slightly tighter and used clearer structural markers, but nothing here is wasteful.

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 RD tool with 12 parameters and 4 required fields, the description is unusually complete: it gives statistical assumptions, data pre-conditions, failure modes with remedies, alternatives, and sample-size guidance. Since an output schema exists and parameter schema coverage is 100%, there is no material gap that would prevent an agent from selecting and invoking this tool 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 the schema already carries parameter documentation and the description need not compensate. The description references 'cutoff' and 'running variable' conceptually and discusses bandwidth behavior, but it adds no syntax-level parameter meaning beyond what the schema already provides.

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 clearly identifies the tool as 'Multi-cutoff RD extrapolation' with a formal citation, and the assumptions/preconditions make it evident this is an RD estimation/extrapolation procedure. However, it never uses an explicit verb such as 'estimates' or 'computes', and it does not directly differentiate from closely named siblings like rd_extrapolate or multi_cutoff_rd.

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 description provides explicit pre-conditions, failure modes, recommended follow-up actions, and named alternatives ('sp.rdrobust, sp.rdrandinf, sp.rdbwselect'), plus a typical minimum N of 500. This gives an agent clear guidance on when the tool is appropriate and what to do if assumptions fail.

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