Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

rdpower

Read-only

Calculate statistical power for a regression discontinuity design from sample size, effect size, and variance. Determine minimum detectable effect for a target power.

Instructions

Power of an RD design given sample size and effect size. Validation: certified parity evidence.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cNoCutoff, for data mode.
xNoOutcome and running-variable column names, for data mode.
yNoOutcome and running-variable column names, for data mode.
tauYesHypothesised treatment effect at the cutoff.
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
h_leftNoBandwidth fractions (proportion of running-variable support used). Design mode only.
n_leftNoAvailable sample size on each side. Design mode only.
h_rightNoBandwidth fractions (proportion of running-variable support used). Design mode only.
n_rightNoAvailable sample size on each side. Design mode only.
var_leftNoOutcome variance on each side of the cutoff. Design mode only.
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.
var_rightNoOutcome variance on each side of the cutoff. Design mode only.
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
target_powerNoIf set, compute MDE for this target power instead.
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

B3.2/5.0
Behavior3/5

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

The readOnlyHint annotation already communicates that this is a safe, non-mutating calculation, lowering the behavioral burden on the description. The description adds a modest credibility signal ('certified parity evidence') but does not disclose behavioral details such as the dual design/data modes or the as_handle caching mechanism. There is no contradiction with 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.

Conciseness4/5

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

The description is appropriately concise, with the core calculation front-loaded in the opening sentence and no padding. The second sentence is a validation claim rather than actionable guidance, so it is not maximally useful, but the text is not bloated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity — 18 parameters, data vs. design modes, target_power MDE behavior, and result chaining — the main description is thin. However, the rich input schema descriptions and available output schema cover much of the operational detail, leaving clear gaps but not a fundamentally incomplete picture.

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 parameter schema already carries the full weight of documenting tau, target_power, n_left/right, data_path, and the other fields. The description itself adds only the general notion of sample size and effect size, with no parameter-level mapping, 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence clearly names the tool's core function — computing power of an RD design given sample size and effect size — which is specific and distinct from estimation tools. It does not explicitly differentiate from RD power/sample-size siblings like rdsampsi or pretrends_power, so it stops short of full disambiguation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use rdpower versus related power/sample-size tools, nor does it mention the design-mode versus data-mode distinction or when target_power should be used for MDE. The 'Validation: certified parity evidence' sentence reads as a quality label, not a usage rule, so the agent must infer applicability from the schema and sibling list.

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