Skip to main content
Glama
stata-copilot

stata-copilot

by Parado-D

Read stored results

stata_results

Retrieves the macros left by the last Stata command—r(), e(), or s()—so you can convert transcript output into structured numbers.

Instructions

Return the macros left behind by the last command: r() from summarize/tabulate-style commands, e() from estimation, s() from sreturn. Use it to turn a transcript into numbers.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "stata_results"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory for the read.
scopeNoWhich macro scope to read (default all).
timeoutNoSeconds (default 60).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.6/5.0
Behavior3/5

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

No annotations, so the description carries the full burden. It discloses that results come from the *last* command (a statefulness/ephemeral caveat) which is genuinely useful, but says nothing about what happens if no prior command ran, whether reading clears results, or permissions/working-directory effects.

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?

Two tight sentences; the core behavior leads and the use case follows. No filler, though slightly terse on context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a no-mutation read with 100% schema coverage and no output schema; but with no annotations and no return-format description, the agent gets no picture of the output structure of the macro listing.

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 coverage is 100%, so the schema already documents cwd, scope enum, and timeout with defaults. The description adds the mapping of scopes to command families, which is modest extra meaning beyond the enum labels. Baseline 3 holds.

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?

Specific verb+resource: 'Return the macros left behind by the last command', with concrete scopes r(), e(), s() tied to command types. Distinguishes itself from siblings like stata_run or stata_history, though it doesn't explicitly name an alternative.

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 it to turn a transcript into numbers' gives a clear use context, and mapping r()/e()/s() to summarize/estimation/sreturn helps the agent pick a scope. No explicit when-not or alternative tool named.

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