Skip to main content
Glama
shichengg
by shichengg

stata_get_results

Retrieve Stata's stored r() or e() results by running return list or ereturn list and parsing the latest session log to return them directly to the caller.

Instructions

运行 return list 或 ereturn list,并通过 session 最新运行日志将 r() 或 e() 存储结果直接返回给调用端

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYes结果类型:r 或 e

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are present, so the description carries the full burden. It discloses that the tool executes commands and relies on the session's latest run log to extract results, which is useful context. However, it does not mention prerequisites (e.g., an active session or prior command producing r()/e()) or potential side effects of running commands, so it is only partially transparent.

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?

The description is a single concise sentence that front-loads the action and then explains the delivery mechanism. There is no redundant phrasing; all included details (command execution, session log, result type) earn their place.

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?

The tool has a simple input schema and no output schema, so the description needs to explain return values and prerequisites. It describes what is returned (r()/e() stored results) but does not specify the output format or note that a Stata session with recent results must exist, leaving modest gaps for an agent to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents the `type` parameter (enum r/e) with 100% coverage. The description adds meaning by associating the type with the specific commands (`return list` vs `ereturn list`) and clarifying that returned values correspond to r() or e() stored results, going beyond the bare enum documentation.

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 action: it runs `return list` or `ereturn list` and returns the stored r()/e() results to the caller. It names the exact Stata commands and the result type, which clearly distinguishes it from siblings like `stata_run` and `stata_read_log`.

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?

The description implies the tool is for retrieving Stata stored results after commands, but it does not explicitly state when to use it over alternatives such as `stata_read_log` or provide any exclusions. The use case is inferable but not spelled out.

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