Skip to main content
Glama

stata_session_history

Retrieve the command log of a Stata session to trace executed commands or replay them after a crash. Optionally limit to recent entries for quick inspection.

Instructions

返回当前会话的命令日志(seq/cmd/rc),供追溯或崩溃后重放。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lastNo只返回最近 N 条(默认全部,上限 100)。
session_idNo会话标识;省略用 'default'。

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It explicitly characterizes this as returning a log with sequence/command/return-code, and the crash-replay mention implies persistence. It does not spell out that it is side-effect-free, but '返回' plus the log/replay framing make the read-only nature evident.

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?

A single, front-loaded sentence conveys action, resource, content, and purpose without filler. Every element earns its place.

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 simple read-only history tool, the description plus fully documented schema covers the essential invocation details: what is returned, when to use it, and the optional parameters. A brief note on output ordering or total size would make it fully complete, but nothing critical is missing.

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%, and both parameters (last, session_id) have meaningful descriptions in the schema. The tool description adds no extra meaning about these parameters, so the baseline of 3 is appropriate.

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 names a specific verb ('返回') and resource ('当前会话的命令日志') and specifies the returned fields (seq/cmd/rc). It does not explicitly contrast with sibling tools like stata_get_results or stata_run, so it misses the strongest form of 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?

The phrase '供追溯或崩溃后重放' states clear use cases (tracing and crash replay), which tells an agent when this log-retrieval tool is appropriate. It does not name alternatives or state when not to use it, but the intended context is clear.

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

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

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