Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

bootstrap

Read-only

Compute resampling-based confidence intervals for any statistic, supporting clustered, block, or iid data with percentile, BCa, and normal methods.

Instructions

General bootstrap inference: nonparametric, cluster, block. Percentile/BCa/normal CIs. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Observations (or clusters/blocks) are exchangeable under the resampling scheme used; cluster= resamples whole clusters, block= preserves within-block ordering for serial dependence; The statistic callable is a smooth, well-defined functional of the data so its sampling distribution is approximable by resampling; BCa intervals further assume an estimable bias/acceleration; percentile/normal CIs assume approximate pivotality of the resampled distribution. Pre-conditions: statistic is a deterministic callable returning a finite scalar on any resampled DataFrame; Enough independent resampling units (rows, clusters, or blocks) to populate n_boot replicates; Specify cluster= or block= when data are clustered/serially dependent rather than iid. Failure modes: Few clusters yields anti-conservative CIs / wildly unstable bootstrap distribution -> Use a wild cluster bootstrap with Rademacher weights when the number of clusters is small (<~40); Statistic raises or returns NaN on a resample (e...

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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_bootNoNumber of bootstrap replications.
clusterNoCluster variable for cluster bootstrap
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.
ci_methodNoCI methodpercentile
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.
statisticYesFunction f(df) -> float
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.7/5.0
Behavior5/5

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

The description discloses key behaviors beyond the readOnlyHint annotation: assumptions (exchangeability, smooth functional, pivotality), pre-conditions (deterministic callable, enough resampling units), and failure modes (anti-conservative CIs with few clusters, NaN resamples). These are not inferable from the schema or annotations alone.

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 front-loaded with the core purpose ('General bootstrap inference: nonparametric, cluster, block...') followed by clearly labeled sections (Validation, Assumptions, Pre-conditions, Failure modes). Each sentence carries technical content without fluff, though the description is long and ends mid-sentence ('e...') due to truncation.

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?

An output schema exists, so return-value documentation is not required. The description covers validation tiers, assumptions, pre-conditions, and failure modes, which is thorough for a complex inference tool. The notable gap is the block-mode mismatch: the description repeatedly tells the agent to specify cluster= or block=, but the schema only offers cluster, which could confuse an agent attempting to use block.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds meaningful semantics: it clarifies what cluster does ('resamples whole clusters') and what block would do ('preserves within-block ordering'), and defines constraints on statistic ('deterministic callable returning a finite scalar'). However, it references a 'block' mode that does not appear in the input schema, which slightly reduces the added value.

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 'General bootstrap inference: nonparametric, cluster, block' with explicit CI methods (percentile/BCa/normal). This clearly identifies the tool's purpose and distinguishes it from related siblings like wild_cluster_bootstrap, especially since the failure modes section references that alternative directly.

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?

Explicitly states 'Specify cluster= or block= when data are clustered/serially dependent rather than iid' and gives failure-mode guidance: 'Few clusters yields ... -> Use a wild cluster bootstrap with Rademacher weights when the number of clusters is small (<~40)'. This tells an agent exactly when to use this tool vs 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