Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

subcluster_wild_bootstrap

Read-only

Compute valid p-values and confidence intervals for few-treated-cluster designs using subcluster wild bootstrap, correcting over-rejection in small samples.

Instructions

Subcluster wild cluster bootstrap for few-treated-clusters. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesPrimary running variable, regressor, or feature input for this estimator.
yYesOutcome variable column name or outcome array.
h0NoNull value.
seedNoRandom seed for reproducible stochastic steps.
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
n_bootNoBootstrap replications.
clusterYesPrimary cluster column (for SE computation).
test_varNoParameter to test; default last element of ``x``.
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.
subclusterNoFiner grouping at which sign-flips occur. If ``None``, every observation is its own subcluster (pure Rademacher at obs level).
weight_typeNoDistribution of sign flips. ``'webb'`` (6-point) recommended when treatment has <= 5 treated clusters.webb
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

B3/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds no behavioral details such as whether the tool caches results, handles missing data, or requires specific preprocessing. The 'Validation: validated evidence tier...' sentence is cryptic and does not describe behavior in a way an agent can act on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is short, but the second sentence about 'Validation: validated evidence tier' is obscure and does not clearly support the tool's purpose. The first sentence is useful, but the second one introduces a concept that is unexplained and likely confusing to an agent, making it not fully self-justifying.

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

Completeness2/5

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

With 16 parameters, no title, and many closely related sibling tools (e.g., wild_cluster_bootstrap, wild_cluster_boot), this sparse description leaves critical gaps: it does not explain what 'subcluster' means, when to prefer this over wild_cluster_bootstrap, or what the returned evidence tier represents. The output schema may document return values, but the conceptual context is insufficient for a complex tool.

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 input schema fully documents all 16 parameters, including names, types, defaults, and meanings. The description adds no parameter-level detail beyond the method name and context, so it does not improve on the schema's baseline.

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 names a specific method ('subcluster wild cluster bootstrap') and its target context ('few-treated-clusters'), which distinguishes it from siblings like wild_cluster_bootstrap. However, it lacks a clear verb (e.g., 'estimates' or 'computes') and does not state what it returns, so it stops short of a fully specific purpose.

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

Usage Guidelines3/5

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

The phrase 'for few-treated-clusters' provides an implied use case, suggesting the tool is meant for settings with few treated clusters. It does not explicitly name alternatives such as wild_cluster_bootstrap, define what counts as 'few', or state when not to use this tool, leaving usage largely to inference.

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