Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

weakrobust

Read-only

Run weak-instrument-robust tests (AR, CLR, K) and confidence sets for instrumental variable models, delivering verdicts on instrument strength and endogeneity.

Instructions

Stata-style unified weak-instrument-robust diagnostic panel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yYesOutcome and single endogenous regressor (column names in ``data``).
h0NoNull value for the endogenous coefficient. All under-H0 tests (AR, CLR, K) are evaluated at ``beta = h0``.
exogNoIncluded exogenous controls. An intercept is always added.
vcovNoUsed by the Olea-Pflueger effective F.HC1
alphaNoSignificance level for the robust confidence sets.
endogYesOutcome and single endogenous regressor (column names in ``data``).
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
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://.
grid_sizeNoGrid resolution used by AR/CLR/K confidence-set inversion.
include_kNoAlso run the Kleibergen K score test and K confidence set.
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.
include_clrNoAlso run the CLR test and invert it for a CLR confidence set.
instrumentsYesExcluded instruments.
data_columnsNoOptional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads.
random_stateNoRandom seed or RandomState for reproducible stochastic steps.
data_sample_nNoOptional uniform random subsample size (seed=0, deterministic) — useful on huge panels.
clr_simulationsNoMonte-Carlo draws for the CLR null distribution.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true and openWorldHint=false, so the agent knows this is a read-only analysis tool. The description adds meaningful behavioral context beyond annotations: it is 'Stata-style' (familiar output conventions), 'unified' (combines multiple weak-instrument-robust procedures), and a 'diagnostic panel' (produces a set of diagnostics rather than a single test). The detail parameter further discloses output-depth behavior (minimal/standard/agent) and token sizes, which is substantial behavioral transparency. No contradiction with 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 a single compact sentence that front-loads the tool's identity ('Stata-style unified weak-instrument-robust diagnostic panel'). It is appropriately sized for a tool whose parameter schema carries most of the detail. It earns its place by conveying the Stata-style and unified-panel nature, though it could have added a second sentence with usage guidance without becoming bloated.

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?

Given the tool's complexity (18 params, 4 required, output schema present) and the rich schema descriptions, the description is mostly complete. The output schema exists, so return values need not be described. The main gap is the lack of explicit guidance on when to choose this tool over the many IV-related siblings (anderson_rubin_test, effective_f_test, iv_diag, ivreg). The detail parameter's 'agent' mode and as_handle caching are documented in the schema, so the description does not need to repeat them.

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 baseline is 3. The description itself adds little parameter meaning beyond the schema, but the schema descriptions are already rich (e.g., detail explains token sizes and use cases, h0 explains AR/CLR/K evaluation at beta=h0, data_path lists supported formats and schemes). The description's 'unified' and 'Stata-style' framing adds context for interpreting parameters like vcov and h0, but does not compensate for anything missing since nothing is missing.

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 'Stata-style unified weak-instrument-robust diagnostic panel' names a specific resource (weak-instrument-robust diagnostics) and a specific verb/action (unified diagnostic panel). It distinguishes itself from siblings like anderson_rubin_test, effective_f_test, iv_diag, and ivreg by signaling a unified panel of weak-instrument-robust tests. However, it does not explicitly enumerate which tests are included (AR, CLR, K are only in the schema), so an agent must infer the full scope from parameters.

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 description implies usage for weak-instrument-robust diagnostics in an IV setting, and the schema's required parameters (data_path, endog, instruments, y) make the IV context clear. But there is no explicit when-to-use vs alternatives guidance, no mention of when to prefer anderson_rubin_test, effective_f_test, or iv_diag, and no exclusions. The 'unified' wording hints it is a one-stop panel, but the agent is left to infer when this is the right tool among many IV siblings.

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