Skip to main content
Glama

stata_do

Run a Stata do-file and retrieve its execution log. Use for regression analysis, statistical operations, or executing Stata commands.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations provided, so description must carry full burden. It mentions optional reading of log on error but does not disclose that is_replace_log defaults to true, implying potential log overwrite. No mention of side effects, permissions, or error handling beyond the optional read.

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?

Description is three sentences, clearly structured with the core action first, followed by supplementary details and usage context. No unnecessary words, though more structure could improve readability.

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?

Tool has 5 parameters with no schema descriptions and an output schema not described. Description lacks details on return log structure, default behaviors (e.g., is_replace_log defaults to true, potentially destructive), and file path constraints. More context needed for safe usage.

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?

Schema description coverage is 0%, yet description only explains dofile_path and read_log_when_error. Parameters log_file_name, is_replace_log, and enable_smcl are not described, leaving their meaning ambiguous. This is insufficient given no schema descriptions.

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' with a specific verb and resource. It distinguishes from siblings like read_log by specifying execution of do-files for statistical analysis.

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 includes 'Use when you need to run Stata commands, perform regression or statistical analysis, or execute a do-file,' providing clear context for appropriate usage. However, it does not explicitly mention when not to use or name alternatives beyond the sibling list.

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/stata-mcp'

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