Skip to main content
Glama
stata-copilot

stata-copilot

by Parado-D

Estimate a model and return a coefficient table

stata_model

Run a single Stata estimation command and return structured coefficients, standard errors, p-values, and fit statistics instead of parsing transcript tables.

Instructions

Run one estimation command (e.g. "regress price mpg weight" or "xtreg y x, fe vce(cluster id)") and return a structured coefficient table — b, se, t/z, two-sided p per term — plus fit statistics. Use this instead of reading a regression table out of the transcript.

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": {
      "command": "<command>"
    },
    "name": "stata_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory.
quietNoSuppress the estimation output in the transcript (default false).
commandYesExactly one Stata estimation command.
timeoutNoSeconds (default 300).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses the return shape (per-term b, se, t/z, p plus fit statistics) and that `quiet` suppresses transcript output, but says nothing about session state effects: whether the estimated model remains active for later tools, whether it fails on a non-estimation command, or what happens on timeout. For a code-execution tool with zero annotation coverage that is a meaningful gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

Two sentences: the first gives the action, an example, and the exact output contract; the second gives the selection rule. Every clause earns its place and the most decision-relevant content (what it returns) is front-loaded.

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?

There is no output schema, so the description must describe return values — and it does so concretely (per-term coefficients, standard errors, t/z, two-sided p, fit statistics). What is left implicit is the execution side-effect story: whether results persist in the Stata session and interact with stata_results or later calls.

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 all four parameters are already documented in the schema and the baseline of 3 applies. The description adds the important semantic constraint that `command` must be exactly one estimation command, but does not elaborate on cwd, timeout, or quiet behavior beyond the schema text.

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?

The description states a specific verb and resource ("run one estimation command") and precisely names the artifact produced ("structured coefficient table — b, se, t/z, two-sided p per term — plus fit statistics"). The clause "Use this instead of reading a regression table out of the transcript" distinguishes it from transcript/results-reading siblings such as stata_results.

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?

It gives concrete selection criteria — use this rather than extracting a regression table from transcript text — and supplies two example commands covering both a simple `regress` and a panel `xtreg ... vce(cluster id)` case. It stops short of explicit when-not conditions (e.g. non-estimation commands, or when a full do-file run is wanted, which is presumably stata_run_do).

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