Skip to main content
Glama

regress

Read-only

Fit OLS regression models from R-style formulas for baseline specifications or covariate-adjusted RCT analyses, with classical, robust, or cluster-robust standard errors.

Instructions

Fit an OLS regression; classical SEs unless robust= or cluster=. Input is a Wilkinson-style formula like 'y ~ x1 + x2'. Use this for baseline specifications or covariate-adjusted RCT analyses. Validation: certified parity evidence.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "formula": "<formula>"
    },
    "name": "regress"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNoPayload depth; agent is the fullest.agent
robustNononrobust
clusterNoColumn name for cluster-robust SEs.
data_idNoData handle (d_...) from load_data; replaces data_path.
formulaYesR-style formula, e.g. 'y ~ x1 + x2'
data_csvNoSmall inline table as CSV text.
as_handleNoCache the fit and return its result_id.
data_pathNoAbsolute path of a data file on the server.
result_idNoHandle of an earlier fit made with as_handle=true.
data_recordsNoSmall inline table as row objects.
max_output_bytesNoResult byte budget (default 262144; 0 = none).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false, so the description's real contribution is the SE policy (classical unless robust= or cluster=), which is useful behavioral context. It says nothing about the data-source requirement (one of data_id/data_path/data_csv/data_records), the as_handle caching workflow, or output size controls — all of which bear on how the call behaves. "Validation: certified parity evidence" is unparsed jargon that conveys little.

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?

Four tight clauses with the core purpose and the formula format front-loaded, and no redundant restatement. The trailing "Validation: certified parity evidence" is a sentence that does not clearly earn its place.

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?

With 11 parameters at 91% schema coverage and an output schema present, the description does not need to re-document fields; it covers purpose, default inference, and formula syntax. The main residual gap is the data-input and handle workflow, which an agent must infer from the schema alone.

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 91%, so the schema already documents nearly every parameter, including the formula example that the description repeats. The one gap the description partially fills is the SE default, but it does not explain how robust/cluster interact or what result_id/detail depth imply. Baseline 3 applies.

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?

States a specific verb and resource ("Fit an OLS regression") plus the default SE regime, so the tool is instantly identifiable. It does not name the sibling it is not (e.g., feols for fixed effects or iv/ivreg for instrumented models), so differentiation is only implied by the RCT/baseline phrasing.

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

Usage Guidelines4/5

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

"Use this for baseline specifications or covariate-adjusted RCT analyses" gives a clear usage context that implicitly separates simple OLS from the more specialized modeling siblings. There are no explicit exclusions or named alternatives, which keeps it below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.