MCP Server for Instrumental Variable Two-Stage Least Squares (2SLS) Estimator Skill. Uses an exogenous instrument Z to isolate exogenous variation in endogenous treatment X, producing consistent and unbiased estimates of the causal effect of X on Y even under severe unobserved confounding.
Single tool 'estimate_2sls' has a reasonable description (97 chars, within 10-1024 range) but critical schema and parameter documentation gaps. Input schema visible in code shows three array parameters with descriptions, but lacks type validation, min/max constraints, and error handling. No output schema documented. Tool does one thing (2SLS estimation) but lacks production-grade parameter validation, error recovery guidance, and security considerations. No tool annotations (readOnlyHint, etc.). Descriptions are present but minimal; parameters lack format/range constraints.
Estimate causal effect via 2SLS: Stage 1: Regress X on Z -> X_hat. Stage 2: Regress Y on X_hat -> beta_iv
No output schema documented. LLM cannot predict return fields (beta_iv, beta_ols, stage1_f_stat, stage1_r2, is_strong_instrument) or plan downstream operations.
Input parameters lack constraints. Arrays accept any length/values; no validation for empty arrays, NaN, or mismatched lengths. Code will crash silently on invalid input.
No error handling or recovery guidance. Division by zero in simple_linear_regression (var_x == 0) returns 0.0 silently. LLM receives no actionable error message.
Parameter descriptions are generic ('Exogenous instrument variable Z') and lack format/range guidance. No mention of expected array length, numeric range, or units.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 39 | 2026-07-28+ | v2 |
Tool name 'estimate_2sls' is domain-specific jargon. LLM may not recognize '2SLS' or understand when to call it vs. other regression tools. Consider 'estimate_causal_effect_2sls' or 'fit_instrumental_variable_model'.