Skip to main content
Glama

stata_do

Run Stata do-files and retrieve execution logs for regression or statistical analysis. Automatically detects errors to read log details when needed.

Instructions

Execute a Stata do-file and return the execution log. Accepts a do-file path, runs it via the configured Stata executable, and can optionally read log content only when return-code errors are detected. Use when you need to run Stata commands, perform regression or statistical analysis, or execute a do-file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dofile_pathYes
log_file_nameNo
read_log_when_errorNo
is_replace_logNo
enable_smclNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the burden. It explains that the tool runs a do-file via a configured executable and can optionally read logs on error. However, it does not disclose potential destructive actions (e.g., file overwriting with is_replace_log) or authentication requirements.

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?

The description is concise and well-structured, with the core purpose stated upfront. It uses a few sentences without excess, though it could better organize parameter details.

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?

Given six parameters and no annotations, the description lacks completeness. It does not explain the output schema, error handling beyond optional log reading, or prerequisites like Stata configuration. The tool's behavior is only partially covered.

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

Parameters2/5

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

With 0% schema coverage, the description must compensate for missing parameter explanations. It only covers 'dofile_path' and the optional error-log reading, but omits details for 'log_file_name', 'is_replace_log', 'enable_smcl', and 'timeout'. This is insufficient for the six parameters.

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 clearly states 'Execute a Stata do-file and return the execution log,' specifying the verb (Execute), resource (Stata do-file), and output (execution log). It distinguishes from siblings by focusing on executing do-files, not just reading logs or getting info.

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?

The description provides explicit usage context: 'Use when you need to run Stata commands, perform regression or statistical analysis, or execute a do-file.' It does not explicitly state when not to use it or give alternatives, but the context is clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SepineTam/mcp-for-stata'

If you have feedback or need assistance with the MCP directory API, please join our Discord server