Skip to main content
Glama
shichengg
by shichengg

stata_read_log

Read a Stata text log and parse it into command-result pairs to pinpoint errors. Leave path empty to use the last session's log.

Instructions

读取 Stata text log。path 留空时读取最近 session 的 last_log_path;推荐 output_format='dict',它会把日志解析成命令-结果对,便于 AI 判断报错位置。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNolog 文件的完整路径;留空则读取最近 session 的 last_log_path
tail_linesNo只读取最后 N 行,留空则读取全部
output_formatNo输出格式:full=完整文本,core=去除日志框架行,dict=JSON 命令-结果对

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral burden. It discloses the default path fallback and the parsing behavior of output_format='dict' into command-result pairs, which adds real value beyond the schema. It does not mention error conditions such as what happens when no prior session exists, but the disclosed behaviors are meaningful.

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 short sentences with front-loaded purpose and actionable defaults/recommendations. No filler, no repetition of schema content, and every clause adds useful information.

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?

For a zero-required-parameter read tool with full schema coverage, the description covers purpose, default behavior, and recommended output format. It lacks an output schema and annotation safety profile, but the core invocation decision is adequately specified.

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?

All three parameters are fully described in the schema, so the baseline is 3. The description adds important semantics for path (empty means recent session's last_log_path) and output_format (dict is recommended and parses logs into command-result pairs), which is value beyond the schema. tail_lines remains schema-only but already has a clear one-line description.

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?

The description identifies a specific verb and resource: reading a Stata text log, and the log-vs-dofile distinction in sibling names makes the target reasonably clear. It does not explicitly contrast with stata_get_results or stata_read_dofile, so it stops short of full sibling differentiation.

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 provides concrete usage context: leave path empty to target the most recent session's last_log_path, and prefer output_format='dict' when the AI needs to locate errors. It does not explicitly say when to use alternative tools, but the practical guidance is clear and actionable.

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