Skip to main content
Glama
vikranthviki

Causal Decision Agent

by vikranthviki

gmm

Read-only

Estimate parameters using generalized method of moments for arbitrary moment conditions. Returns robust standard errors and diagnostics for evidence-backed decisions.

Instructions

General GMM estimator for arbitrary moment conditions. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
WNoWeighting matrix ``(q, q)`` for the first step. Defaults to the identity. Supplying one and asking for ``se='unadjusted'`` warns unless it happens to be efficient.
seNo``'robust'`` returns the sandwich, valid for any ``W``. ``'unadjusted'`` returns the efficient-GMM variance ``(D'WD)^{-1}/n``, which describes the estimator *only* at the efficient weight; otherwise it warns.robust
tolNoNumerical convergence tolerance.
vcovNoEstimator for the moment covariance ``S``.mds
alphaNoSignificance level for confidence intervals and tests.
centerNoCentre the moments before forming ``S``. ``False`` matches Stata, ``True`` matches R's ``gmm``.
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
methodNoEstimator or algorithm variant to use.twostep
theta0YesStarting values. Also the expansion point for the closed form when the moments are affine.
clusterNoGroup labels, one per moment row. Required when ``vcov='cluster'``.
maxiterNomaxiter parameter (int).
jacobianNo``D(theta, data) -> ndarray`` of shape ``(q, k)``, the derivative of the *average* moment. Supplying it removes finite-difference error from the standard errors and from the affine test.
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://.
moment_fnYes``g(theta, data) -> ndarray`` of shape ``(n, q)``: the moment contribution of each observation.
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.
param_namesNoparam_names parameter (Optional[List[str]]).
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.
hac_bandwidthNoBartlett bandwidth for ``vcov='hac'``; the kernel vanishes at ``lag == hac_bandwidth``.

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?

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered and the description does not need to restate it. The description adds one behavioral claim — that results carry a validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact) — but it is cryptic and unexplained. It does not disclose iteration behavior, warnings for inefficient W, or result_ID caching, though annotations lower the burden. 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.

Conciseness3/5

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

The first sentence is front-loaded and efficient. The second sentence ('Validation: validated evidence tier ...') is a confusing fragment that does not clearly earn its place, and for a 20-parameter general estimator the overall brevity borders on under-specification rather than disciplined conciseness.

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?

For a general-purpose estimator with 20 parameters spanning advanced concepts (W, se, vcov, method variants, jacobian, clustering), the two-sentence description is thin. The output schema and 100% parameter schema coverage handle return values and parameter meaning, but the description provides no orientation to the workflow (supply moment_fn + theta0 + data, choose method/vcov) or to the trade-offs among onestep/twostep/iterative/cue.

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% and each of the 20 parameters has a detailed, semantically rich description, so the baseline is 3. The tool description itself adds no parameter-level meaning beyond what the schema already provides.

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 states a specific verb and resource: a general GMM estimator for arbitrary moment conditions, which differentiates it from the many canned estimators in the sibling list (poisson, logit, feglm, ivreg, etc.). However, no sibling is named explicitly, and the second sentence about validation tiers is a cryptic fragment that detracts from, rather than adds to, purpose clarity.

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?

'Arbitrary moment conditions' implies when to use the tool — when the user's identifying assumptions are expressed as custom moment functions rather than a built-in estimator — but there are no explicit when/when-not statements, no named alternatives, and no prerequisites beyond what the schema states. Usage guidance is present only by implication.

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