Skip to main content
Glama
shichengg
by shichengg

Stata MCP Server

Ein MCP-Server, der die Stata-GUI über Windows Stata Automation COM für Claude Code steuerbar macht.


中文

功能

  • Durch Stata Automation COM Befehle in einem echten Stata-GUI-Fenster ausführen.

  • Stata-Sitzungen anhand des absoluten Pfads der Do-Files verwalten: Dasselbe Do-File verwendet dasselbe Stata-Fenster wieder.

  • Verschiedene Do-Files öffnen verschiedene Stata-Fenster, was das gleichzeitige Betrachten mehrerer Analyseaufgaben erleichtert.

  • Befehle ohne Pfadangabe werden an die zuletzt ausgeführte Do-File-Sitzung gesendet.

  • Unterstützt das Schreiben, Lesen, Anhängen und Ausführen von Do-Files.

  • Unterstützt das Lesen von Stata-Text-Logs, damit Claude die Ergebnisse analysieren kann.

  • Unterstützt das Lesen der aktuellen Datenstruktur, fehlender Werte und einer Stichprobenvorschau, um Claude bei der Bearbeitung von Do-Files zu unterstützen.

Demo

Stata MCP Demo

Verzeichnisstruktur

D:/Stata18/mcp/
├── README.md
├── pyproject.toml
├── .gitignore
├── stata_mcp.py              # 兼容启动器
├── src/
│   └── stata_mcp/
│       ├── __init__.py
│       └── server.py         # MCP 服务器主文件
├── runtime/
│   ├── dofiles/              # Claude/MCP 默认生成 do 文件
│   └── logs/                 # Claude/MCP 默认读取或生成 log
└── examples/                 # 示例 do 文件

Systemanforderungen

  • Windows

  • Stata 18 MP, mit registriertem Automation COM

  • Python 3.10+

  • Python-Pakete: mcp, pywin32

  • Claude Code

Empfohlener Installationsort

Es wird empfohlen, dieses Projekt im mcp-Ordner des Stata-Installationsverzeichnisses abzulegen, zum Beispiel:

D:/Stata18/mcp

Falls Stata an einem anderen Ort installiert ist, wird ebenfalls empfohlen, es im entsprechenden Verzeichnis abzulegen, zum Beispiel:

C:/Program Files/Stata18/mcp

Fortgeschrittene Benutzer können es auch in einem beliebigen stabilen Verzeichnis ablegen. Unabhängig vom Speicherort muss der Skriptpfad in der Claude Code MCP-Konfiguration auf die tatsächliche stata_mcp.py zeigen.

Installationsschritte

  1. Laden Sie dieses Repository herunter oder klonen Sie es in den mcp-Ordner im Stata-Installationsverzeichnis.

  2. Installieren Sie die Python-Abhängigkeiten:

pip install mcp pywin32

Alternativ können Sie diese auch in einer virtuellen Umgebung installieren:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install mcp pywin32
  1. Öffnen Sie PowerShell als Administrator und registrieren Sie Stata Automation. Passen Sie den Befehl an Ihren Stata-Installationspfad an:

Start-Process -FilePath "D:\Stata18\StataMP-64.exe" -ArgumentList "/Register" -Wait
  1. Überprüfen Sie, ob COM verfügbar ist:

python -c "import win32com.client; s=win32com.client.Dispatch('stata.StataOLEApp'); s.DoCommand('display 12345')"

Erwartetes Ergebnis: Die Stata-GUI öffnet sich oder wird verbunden und zeigt 12345 an.

Zu Claude Code hinzufügen (empfohlen)

Es wird empfohlen, claude mcp add zu verwenden:

claude mcp add stata -- python D:\Stata18\mcp\stata_mcp.py

Falls die Installation in einem anderen Pfad erfolgte, ersetzen Sie diesen durch den tatsächlichen Pfad. Zum Beispiel:

claude mcp add stata -- python "C:\Program Files\Stata18\mcp\stata_mcp.py"

Starten Sie nach dem Hinzufügen Claude Code neu und bestätigen Sie, dass das stata-Tool in der Liste der MCP-Tools erscheint.

Manuelle Konfiguration von Claude Code MCP

Falls Sie claude mcp add nicht verwenden, können Sie die MCP-JSON auch manuell konfigurieren:

"stata": {
  "command": "python",
  "args": ["D:\\Stata18\\mcp\\stata_mcp.py"]
}

Sie können auch direkt auf die Hauptdatei verweisen:

"stata": {
  "command": "python",
  "args": ["D:\\Stata18\\mcp\\src\\stata_mcp\\server.py"]
}

Normalerweise wird die Verwendung des Kompatibilitäts-Launchers stata_mcp.py empfohlen, da die Konfiguration bei späteren Änderungen der internen Projektstruktur stabiler bleibt.

Konfigurierbare Umgebungsvariablen

Für normale Benutzer ist keine Einstellung erforderlich. Falls Ihr Installationspfad oder COM-Name besonders ist, können Sie Folgendes festlegen:

Variable

Standardwert

Funktion

STATA_MCP_DIR

Automatisch erkanntes Projekt-Root

MCP-Projektverzeichnis

STATA_DIR

Übergeordnetes Verzeichnis des MCP

Stata-Installationsverzeichnis

STATA_EXE

%STATA_DIR%/StataMP-64.exe

Für README-Registrierungshinweise

STATA_COM_PROG_ID

stata.StataOLEApp

Stata Automation ProgID

Tools

Tool

Funktion

stata_run

Befehl in der letzten Do-File-Sitzung ausführen

stata_run_dofile

Stata-Sitzung anhand des absoluten Do-File-Pfads ausführen/wiederverwenden

stata_write_dofile

Do-File schreiben; einfache Dateinamen in runtime/dofiles, vollständige Pfade an den angegebenen Ort

stata_read_dofile

Do-File-Inhalt lesen

stata_append_dofile

Do-File-Inhalt anhängen

stata_read_log

Stata-Text-Log lesen

stata_install_package

Externes Paket in der Stata-GUI installieren

stata_get_results

return list oder ereturn list in der Stata-GUI anzeigen

stata_get_data_info

describe in der Stata-GUI anzeigen

stata_get_data_schema

Aktuelle Datenstruktur, fehlende Werte und Stichprobenvorschau lesen und an Claude zurückgeben

stata_status

MCP- und Stata-Sitzungsstatus anzeigen

Regeln für Do-Files und Sitzungen

  • stata_run_dofile(path) verwendet den absoluten Pfad des Do-Files als Sitzungskennung.

  • Derselbe Do-File-Pfad verwendet dasselbe Stata-Fenster wieder.

  • Verschiedene Do-File-Pfade erstellen verschiedene Stata-Fenster.

  • stata_run, stata_get_results, stata_get_data_info, stata_get_data_schema werden standardmäßig an die zuletzt ausgeführte Do-File-Sitzung gesendet.

  • Wenn noch kein Do-File ausgeführt wurde, fordern Befehle ohne Pfad dazu auf, zuerst ein Do-File auszuführen.

Lesen der aktuellen Datenstruktur und Stichproben

stata_get_data_schema generiert einen Text-Log-Snapshot in der letzten Do-File-Sitzung und gibt den Inhalt an Claude zurück. Standardmäßig enthalten:

  • describe

  • codebook, compact

  • misstable summarize

  • list in 1/20, abbreviate(20)

  • notes

  • label dir

Optionale Parameter:

Parameter

Standardwert

Beschreibung

sample_rows

20

Anzahl der Stichprobenzeilen, maximal 1000

include_codebook

true

Ob ein kompaktes Codebook enthalten sein soll

include_sample

true

Ob eine Stichprobenvorschau enthalten sein soll

include_missing

true

Ob eine Zusammenfassung fehlender Werte enthalten sein soll

Dies ermöglicht es Claude, nicht nur Variablennamen, Typen und Labels zu sehen, sondern auch eine kleine Menge echter Daten, um die Bearbeitung von Do-Files präziser zu unterstützen.

Log-Strategie

  • stata_get_data_schema überschreibt seinen eigenen Schema-Snapshot-Log, da dieser die aktuelle Datenstruktur repräsentiert.

  • Wenn Claude andere Analyseergebnisse lesen soll, sollte Stata ein Text-Log schreiben, das dann mit stata_read_log gelesen wird.

  • Empfohlene Regel: Innerhalb derselben Claude/MCP-Sitzung anhängen; beim ersten Ausführen desselben Do-Files in einer neuen Sitzung überschreiben, um ein unendliches Anwachsen der Logs zu vermeiden.

Fehlerbehebung

pywin32 nicht verfügbar

Führen Sie aus:

pip install pywin32

COM kann keine Stata-Instanz erstellen

Registrieren Sie Stata Automation erneut:

Start-Process -FilePath "D:\Stata18\StataMP-64.exe" -ArgumentList "/Register" -Wait

Führen Sie den Befehl mit /Register nicht direkt in Git Bash aus, da Git Bash /Register möglicherweise in einen Pfad umschreibt.

stata_run meldet, dass keine Do-File-Sitzung existiert

Führen Sie zuerst ein Do-File aus:

stata_run_dofile(path="D:/Stata18/mcp/examples/browse_test.do")

Danach werden Befehle ohne Pfad an diese letzte Sitzung gesendet.

Claude kann die Ergebnisse der Stata-GUI nicht direkt sehen

Claude kann den Bildschirminhalt nicht lesen. Sie müssen Stata anweisen, ein Text-Log zu schreiben, das dann über stata_read_log gelesen wird; oder verwenden Sie stata_get_data_schema, um einen Snapshot der aktuellen Datenstruktur zu erhalten.


Related MCP server: Stata MCP Server

English

Features

  • Runs Stata commands in the real Stata GUI through Stata Automation COM.

  • Keeps one Stata session per absolute do-file path: the same do file reuses the same Stata window.

  • Different do files open different Stata windows, so multiple analysis tasks can stay visible.

  • Pathless commands are sent to the most recently used do-file session.

  • Supports writing, reading, appending, and running do files.

  • Supports reading Stata text logs so Claude can analyze command output.

  • Supports reading the current data structure, missing-value summary, and sample rows to help Claude edit do files.

Project layout

D:/Stata18/mcp/
├── README.md
├── pyproject.toml
├── .gitignore
├── stata_mcp.py              # compatibility launcher
├── src/
│   └── stata_mcp/
│       ├── __init__.py
│       └── server.py         # main MCP server
├── runtime/
│   ├── dofiles/              # default do files generated by Claude/MCP
│   └── logs/                 # default logs generated or read by Claude/MCP
└── examples/                 # example do files

Requirements

  • Windows

  • Stata 18 MP with Automation COM registered

  • Python 3.10+

  • Python packages: mcp, pywin32

  • Claude Code

It is recommended to place this project inside your Stata installation directory, for example:

D:/Stata18/mcp

If Stata is installed somewhere else, place the project under that Stata directory, for example:

C:/Program Files/Stata18/mcp

Advanced users may place it in any stable directory. Wherever you install it, the Claude Code MCP configuration must point to the actual stata_mcp.py path.

Installation

  1. Download or clone this repository into the mcp folder under your Stata installation directory.

  2. Install Python dependencies:

pip install mcp pywin32

You may also use a virtual environment:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install mcp pywin32
  1. Open PowerShell as Administrator, then register Stata Automation. Adjust the path to your Stata installation:

Start-Process -FilePath "D:\Stata18\StataMP-64.exe" -ArgumentList "/Register" -Wait
  1. Verify COM:

python -c "import win32com.client; s=win32com.client.Dispatch('stata.StataOLEApp'); s.DoCommand('display 12345')"

Expected result: the Stata GUI opens or is connected, and displays 12345.

Use claude mcp add:

claude mcp add stata -- python D:\Stata18\mcp\stata_mcp.py

If you installed the project somewhere else, replace the path with your actual path. Example:

claude mcp add stata -- python "C:\Program Files\Stata18\mcp\stata_mcp.py"

Restart Claude Code after adding the MCP server, then confirm that the stata tools are available.

Manual Claude Code MCP configuration

If you do not use claude mcp add, you can configure MCP manually with JSON:

"stata": {
  "command": "python",
  "args": ["D:\\Stata18\\mcp\\stata_mcp.py"]
}

You can also point directly to the main server file:

"stata": {
  "command": "python",
  "args": ["D:\\Stata18\\mcp\\src\\stata_mcp\\server.py"]
}

The compatibility launcher stata_mcp.py is usually recommended because it keeps your Claude Code configuration stable if the internal project layout changes later.

Environment variables

Most users do not need these. If your installation path or COM ProgID is unusual, you can configure:

Variable

Default

Purpose

STATA_MCP_DIR

auto-detected project root

MCP project directory

STATA_DIR

parent of MCP directory

Stata installation directory

STATA_EXE

%STATA_DIR%/StataMP-64.exe

used in README registration examples

STATA_COM_PROG_ID

stata.StataOLEApp

Stata Automation ProgID

Tools

Tool

Purpose

stata_run

Run commands in the most recent do-file session

stata_run_dofile

Run/reuse a Stata session by absolute do-file path

stata_write_dofile

Write a do file; simple names go to runtime/dofiles, absolute paths write to that location

stata_read_dofile

Read a do file

stata_append_dofile

Append content to a do file

stata_read_log

Read a Stata text log

stata_install_package

Install external packages in the Stata GUI

stata_get_results

Display return list or ereturn list in the Stata GUI

stata_get_data_info

Display describe in the Stata GUI

stata_get_data_schema

Return current data structure, missing summary, and sample rows to Claude

stata_status

Show MCP and Stata session status

Do-file and session rules

  • stata_run_dofile(path) uses the absolute do-file path as the session key.

  • The same do-file path reuses the same Stata window.

  • Different do-file paths create different Stata windows.

  • stata_run, stata_get_results, stata_get_data_info, and stata_get_data_schema are sent to the most recent do-file session by default.

  • If no do file has been run yet, pathless commands will ask you to run a do file first.

Reading current data structure and sample rows

stata_get_data_schema creates a text log snapshot in the most recent do-file session and returns it to Claude. By default, it includes:

  • describe

  • codebook, compact

  • misstable summarize

  • list in 1/20, abbreviate(20)

  • notes

  • label dir

Options:

Option

Default

Description

sample_rows

20

Number of sample rows, max 1000

include_codebook

true

Include compact codebook

include_sample

true

Include sample preview

include_missing

true

Include missing-value summary

This lets Claude see not only variable names, types, and labels, but also a small real-data sample, which helps it write better Stata code.

Log strategy

  • stata_get_data_schema overwrites its own schema snapshot log because it represents the current data state.

  • For other analysis output, ask Stata to write a text log, then use stata_read_log to read it.

  • Recommended rule: append within the same Claude/MCP session; overwrite the first time the same do file is run in a new session, so logs do not grow forever.

Troubleshooting

pywin32 is unavailable

Run:

pip install pywin32

COM cannot create a Stata instance

Register Stata Automation again:

Start-Process -FilePath "D:\Stata18\StataMP-64.exe" -ArgumentList "/Register" -Wait

Do not run the /Register command directly in Git Bash, because Git Bash may rewrite /Register as a path.

stata_run says there is no do-file session

Run a do file first:

stata_run_dofile(path="D:/Stata18/mcp/examples/browse_test.do")

After that, pathless commands are sent to the most recent session.

Claude cannot directly see Stata GUI output

Claude cannot read screen contents directly. To let Claude analyze Stata output, write a Stata text log and read it with stata_read_log; or use stata_get_data_schema for a current data snapshot.

Available Tools

12 tools
stata_append_dofileA

向已有 do 文件追加内容

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes已有 do 文件的完整路径
contentYes要追加的 Stata 代码内容

TDQS

A3.7/5.0
Behavior3/5

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

There are no annotations, so the description carries the full burden of disclosing behavior. It does convey that the operation is non-destructive (append) and targets an existing file, but it does not state what happens if the file is missing, how line separators are handled, or what the result of appending looks like.

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 a single, tightly worded sentence that front-loads the verb and target with no filler. It could have used the space to add usage or behavior notes, but as written it is appropriately concise.

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 low-complexity append operation with fully documented parameters and no meaningful return value, the description is largely sufficient. The only gaps are edge-case behaviors such as missing files, which are secondary to selecting and invoking the tool correctly.

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 description coverage is 100% and both path and content already have clear descriptions. The tool description adds no additional parameter-level meaning, 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a precise verb, 'append' (追加), and a specific resource, an existing Stata do-file (已有 do 文件). This clearly differentiates it from sibling tools like stata_write_dofile (create/overwrite) and stata_read_dofile (read) without needing to open the schema.

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 phrase '已有' implies the file must already exist, and 'append' implies adding to rather than replacing content, so usage is inferable. However, there is no explicit when-to-use/when-not-to-use guidance or mention of alternatives such as stata_write_dofile for creating/overwriting.

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

stata_get_data_infoB

运行 describe,并通过 session 最新运行日志将当前数据集基本信息直接返回给调用端

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal the mechanism: run `describe`, read the session's latest run log, and return basic info to the caller. However, it does not mention prerequisites (e.g., a dataset must be loaded), potential side effects on the session, or what happens on failure.

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, compact sentence that front-loads the core action (`运行 describe`) and then explains the mechanism and result. There is no redundant information or filler; every phrase contributes meaning.

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 description is adequate for a zero-parameter tool, but it leaves gaps: the exact meaning of '基本信息' is vague, there is no mention of required session/dataset state, and it does not clarify how this differs from `stata_get_data_schema`. Given there is no output schema or annotations, some additional context would help an agent invoke 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 tool has zero parameters, so the baseline is 4. There is no parameter information missing, and the description does not need to compensate for undocumented inputs. The empty schema is consistent with the description's focus on an action without arguments.

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 clearly identifies the action: it runs Stata's `describe` command and returns basic information about the current dataset to the caller. It conveys the resource and outcome specifically, though it does not explicitly distinguish itself from the closely related sibling `stata_get_data_schema`.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus alternatives like `stata_get_data_schema` or `stata_get_results`. The intended context is implied by the tool name and description, but there are no explicit usage conditions or exclusions.

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

stata_get_data_schemaB

使用独立且每次覆盖的 schema text log,读取当前 Stata 数据集结构、缺失摘要和样本预览并返回给调用端

ParametersJSON Schema
NameRequiredDescriptionDefault
sample_rowsNo样本预览行数,默认 20
include_sampleNo是否包含样本预览,默认 true
include_missingNo是否包含缺失值摘要,默认 true
include_codebookNo是否包含 codebook, compact,默认 true

TDQS

B3.4/5.0
Behavior3/5

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

There are no annotations, so the description carries the behavioral burden. It does disclose a meaningful implementation detail — the schema text log is independent and overwritten on every call. It does not mention potential side effects, required session state, or what happens if no dataset is loaded, but it provides more than a bare statement of purpose.

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 entire description is one sentence with no filler or repetition. It is compact, though the opening clause about the schema text log delays the main action slightly.

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?

With no output schema and no annotations, the description gives only a broad sense of return content. It covers the data structure, missing summary, and sample preview, but omits usage boundaries, return format, or error conditions. It is adequate for a moderately simple read tool, but not complete.

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%, so parameters are already documented. The description loosely aligns with the parameters by mentioning sample preview and missing summary, but it adds no detail about defaults, combinations, or behavior beyond the schema.

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 (read) and resource (current Stata dataset structure, missingness summary, and sample preview), and adds a unique mechanism (independent schema text log). It is clear, though it does not explicitly contrast with the similarly named sibling stata_get_data_info.

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 intended use is implied: call this when you need the current dataset's schema, missing summary, or sample preview. However, it gives no explicit guidance about when to choose this over stata_get_data_info or stata_get_results, so alternatives are not addressed.

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

stata_get_resultsA

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

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

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.

stata_install_packageA

在已打开的 Stata GUI 中安装外部包,如 estout、ivreg2、rdrobust 等

ParametersJSON Schema
NameRequiredDescriptionDefault
sourceNo安装来源:ssc(默认)或 net
packageYes包名称,例如 estout、ivreg2、rdrobust

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It does disclose the prerequisite that a Stata GUI must already be open, but it does not mention side effects of installation, network requirements, overwriting behavior, or failure conditions. For a mutating operation, this is a significant transparency gap.

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, front-loaded sentence that conveys the action, target, environment, and examples with no filler. Every part 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 two-parameter installer, the description plus fully documented schema provide enough information to invoke the tool correctly. The main gaps are behavioral side effects and expected output, but these are not blocking for a basic install operation.

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 description coverage is 100%, so the schema already fully documents both parameters: package names and source with an enum and default. The description adds example packages but no additional meaning beyond what the schema provides, matching the baseline for high schema coverage.

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 verb ('install'), a clear resource ('external packages'), and the environment ('in the already open Stata GUI'), with concrete examples like estout, ivreg2, and rdrobust. This clearly distinguishes the tool from sibling operations such as running commands, writing do-files, or reading results.

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 when to use the tool: when an external Stata package needs to be installed in an already-open GUI session. However, it does not explicitly compare it to alternatives such as stata_run, which could also execute an install command, nor does it state when not to use this tool.

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

stata_read_dofileA

读取 do 文件内容,返回给 Claude 检查、解释或继续修改

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesdo 文件的完整路径

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It does say the tool reads and returns content, which implies a non-mutating operation, but it does not explicitly state that it does not execute the do-file or trigger Stata, a relevant distinction from sibling tools like stata_run_dofile.

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 front-loaded sentence with no redundant or filler content. It states the action, the resource, and the intended purpose efficiently.

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 one-parameter read tool, the description provides the essential context: what it reads and why. It could be slightly more complete by explicitly stating that it does not execute the file, but the use case is still clear enough for an agent to invoke it correctly.

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?

The schema already documents the only parameter, 'path', with the description 'do 文件的完整路径', giving 100% coverage. The tool description adds no parameter-specific meaning beyond the schema, so the baseline score of 3 is appropriate.

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 and resource: '读取 do 文件内容' (read do-file content). This clearly distinguishes it from sibling tools like stata_write_dofile and stata_append_dofile, and the purpose '检查、解释或继续修改' further clarifies its role.

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 intended usage is implied by the purpose phrase '检查、解释或继续修改' — use this tool when Claude needs to inspect or modify a do-file. However, it does not explicitly name alternatives or state when not to use it, leaving usage guidance implied rather than explicit.

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

stata_read_logA

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

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

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.

stata_runA

在最近的 Stata MCP session 对应 GUI 中将 commands 作为一个完整代码块执行;每次覆盖该 session 的最新运行 text log,并自动返回实际输出。可先用 stata_session(action='set_recent') 切换目标 session。

ParametersJSON Schema
NameRequiredDescriptionDefault
commandsYes要执行的 Stata 命令,多行用换行符分隔

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It explicitly mentions that the tool overwrites the session's latest run text log and returns actual output, which are important side effects. It does not mention error handling or permission requirements, but the disclosed behavior is clear and adds value beyond the schema.

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, with the primary action front-loaded and side effects and session-switching guidance following. It is two sentences with no fluff, and each clause carries information. It is slightly verbose due to phrasing, but overall efficient.

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?

Given the tool's simplicity (one parameter, no output schema, no annotations), the description covers the essential context: the session to use, the side effect (log overwrite), the return of output, and how to switch sessions. It does not cover error handling, but that is not expected for a simple command executor. It is complete enough for an agent to invoke it correctly.

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 description coverage is 100%, so the baseline is 3. The description adds a nuance by describing 'commands' as a 'complete code block', but does not provide additional syntax or format details beyond what the schema already states. It adds minimal semantic value beyond the schema.

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 clearly states the primary action: executing 'commands' as a complete code block in the most recent Stata session. It also mentions the side effect of overwriting the session's log and returning output, which adds specificity. However, it does not explicitly differentiate from sibling tools like 'stata_run_dofile', so it lacks explicit sibling distinction.

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 gives a usage hint by mentioning that one can switch the target session using 'stata_session(action='set_recent')', which is helpful context. But it does not explicitly state when to use this tool versus alternatives like 'stata_run_dofile' or when not to use it. The guidance is implied rather than explicit.

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

stata_run_dofileA

在 Stata GUI 中运行一个 do 文件。该工具以 session_id 表示一个复现任务/同一个 Stata GUI;同一任务的原始 do、检查 do、续跑 do 应使用同一个 session_id。每次调用都会覆盖该 session 在项目 .stata-mcp/cache/ 下的最新运行 text log,并自动返回日志内容;不会修改用户原始 do 文件。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesdo 文件的完整路径,例如 D:/project/analysis.do
roleNo该 do 在 session 中的角色:entry/source/auxiliary,默认 entry
log_modeNo兼容参数;1.1 版始终使用 replace 覆盖 session 最新运行日志
session_idNo可选;同一复现任务固定使用同一个 session_id。不传时兼容旧行为:用 do 文件路径作为 session key

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It transparently discloses that each call overwrites the session's latest running log in .stata-mcp/cache/, automatically returns the log content, and does not modify the user's original do file. These are important side effects and constraints. It does not mention potential blocking behavior or error handling, but the disclosed information is substantial and accurate.

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 composed of a few sentences, with the primary purpose stated first. It includes essential behavioral details (log overwriting, return value, non-modification) without unnecessary verbosity. The structure is clear and efficient, though it could benefit from a slight reordering to front-load the most critical behavioral note about log overwriting.

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?

Given that there is no output schema, the description explains what the tool returns (log content). It covers the key aspects an agent needs to know: setting up session_id for related tasks, the behavior of the log, and the safe handling of the original file. It does not mention return format or error handling in detail, but for a run tool with this parameter set, it is fairly complete.

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 provides 100% coverage with descriptions for all parameters. The description adds value beyond the schema by explaining the session_id semantics (same session for related tasks) and clarifying that log_mode is a compatibility parameter that always uses 'replace' in version 1.1. This enhances the agent's understanding of how to use the parameters correctly.

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 clearly states the tool's purpose: running a do file in Stata GUI. It specifies the resource (do file) and the environment (Stata GUI). It is distinct enough, though it does not explicitly differentiate from the sibling 'stata_run' tool, which could be a potential confusion point. Overall the purpose is specific and unambiguous.

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 provides useful usage context: it explains the session_id concept (same session for original/check/continuation do files) and notes the behavior of overwriting the latest log. However, it does not give explicit guidance on when to use this tool versus alternatives like stata_run or stata_append_dofile. The context is helpful but not a full usage guideline.

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

stata_sessionB

管理 Stata MCP session:列出、查询、销毁、切换最近 session。session_id 代表同一复现任务/同一个 Stata GUI,并关联 entry/source/current do、每个 do 的 log_paths 和 last_log_path。

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYes操作:list/get/destroy/set_recent
session_idNoget/destroy/set_recent 需要指定的 session_id

TDQS

B3.1/5.0
Behavior2/5

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

Annotations are absent, so the description must carry the full behavioral burden. It does explain what session_id represents and what it is associated with, but it does not disclose the side effects of destroy, what get returns, how set_recent changes behavior, or whether these operations are safe or destructive. A session-management tool with a destroy action needs clearer behavioral disclosure.

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 a single compact sentence that front-loads the tool's purpose and action list, then adds essential session-semantics context. There is no fluff or repetition of the schema. It could be slightly better structured by separating the action enumeration from the session_id semantics, but it remains appropriately sized.

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?

With no output schema and no annotations, the description should clarify return values and behavioral outcomes for each action. It adequately covers what session_id means and which actions need it, but it does not explain what list/get return, what destroy removes, or what set_recent actually switches. The tool is simple enough that this is a moderate gap, not a fatal one.

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?

Schema description coverage is 100%, so the baseline is 3. The description goes beyond the schema by explaining that session_id identifies the same reproduction task/GUI and is linked to entry/source/current do and log paths. It also clarifies that get/destroy/set_recent require session_id, which is not reflected as a conditional requirement in the schema.

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 clearly identifies the resource (Stata MCP session) and enumerates the four supported operations: list, get, destroy, and set_recent. This maps directly to the action enum and distinguishes the tool from siblings focused on running or editing do-files. '管理' alone would be vague, but the explicit action list makes the purpose concrete.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives, and it does not explain when one action should be preferred over another. The action enum and the session_id note imply some usage contexts, but the description never states conditions like 'use list to discover active sessions' or 'destroy removes the session and its associated state.'

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

stata_statusA

检查 Stata MCP 服务器状态、内存 session 和项目局部 .stata-mcp/cache/task_registry.json 中记录的 session/do/log 关系

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden. '检查' strongly implies a read-only inspection, and naming the project-local cache file adds useful concrete context about the data source. However, it does not explicitly state side-effect-freeness, permission requirements, or behavior when the registry file is missing.

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 compact sentence that front-loads the action and lists its targets without filler. The inclusion of the specific cache file path is dense but relevant, and no sentence or phrase is wasted.

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?

Given the zero-parameter schema and the straightforward status-checking nature, the description adequately covers what the tool does and what it inspects. It does not spell out the exact response format, but for a status/inspection tool that information is largely inferable from the listed targets.

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?

This tool has zero parameters and an empty input schema, so there is no parameter documentation burden. The description still adds semantic value by explaining what the status check covers, which is sufficient for an agent to invoke the tool correctly.

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 uses the concrete verb '检查' (check/inspect) and identifies three specific objects: Stata MCP server status, in-memory sessions, and session/do/log relationships recorded in .stata-mcp/cache/task_registry.json. This resource-level specificity clearly distinguishes it from siblings like stata_run or stata_session, even without naming them. It is not a tautology and tells an agent exactly what the tool inspects.

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?

No explicit when-to-use or when-not-to-use guidance is provided, and no sibling alternatives are named. The intended usage is implied by the content: call this tool to check server/session/cache status. However, it lacks explicit routing or exclusion conditions that would make this dimension stronger.

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

stata_write_dofileA

将 Stata 代码写入 do 文件并保存到磁盘,返回文件路径;相对文件名会写入最近 session 项目的 .stata-mcp/dofiles/,不会使用 MCP runtime。

ParametersJSON Schema
NameRequiredDescriptionDefault
contentYesdo 文件的完整内容
filenameNo文件名(不含扩展名)或绝对路径;留空则自动生成时间戳文件名

TDQS

A4/5.0
Behavior4/5

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

Without annotations, the description carries the disclosure burden and does add meaningful behavior: it writes to disk, returns the file path, routes relative filenames to .stata-mcp/dofiles/, and notes that MCP runtime is not used. It does not disclose overwrite behavior or session prerequisites, but the disclosed traits are substantial.

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?

One dense, front-loaded senrence that includes action, return value, path semantics, and a runtime caveat. Every clause adds information; no filler.

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 two-parameter tool with full schema coverage, this is nearly complete: it specifies the return value, the default location behavior, and the runtime exception. It could be more complete about overwrite behavior or what happens if no session project exists, but those are edge cases.

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 covers 100% of parameters, so the baseline is 3. The description adds no new parameter-level meaning beyond what the schema already states about filename and auto-generation; it mostly restates the path behavior already present in the schema.

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?

States a specific verb ('write'), a resource ('do file'), and the outcome ('saved to disk, returns file path'). The description clearly distinguishes this from sibling tools like stata_run_dofile or stata_append_dofile by focusing on writing and saving.

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 usage for creating or overwriting do-files and clarifies path resolution for relative filenames, but it does not explicitly say when to prefer this tool over alternatives such as stata_append_dofile or stata_run_dofile. No when-not-to-use guidance is provided.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 12 tool updatesv1.1.0
    • First observedstata_append_dofile
    • First observedstata_get_data_info
    • First observedstata_get_data_schema
    • First observedstata_get_results
    • First observedstata_install_package
    • First observedstata_read_dofile
    • First observedstata_read_log
    • First observedstata_run
    • First observedstata_run_dofile
    • First observedstata_session
    • First observedstata_status
    • First observedstata_write_dofile

TDQS

A3.7/5.0

Scored across 12 tools

Disambiguation4/5

Each tool targets a distinct artifact (do file, log, session, package, data metadata), and the descriptions clarify the boundaries well. A few pairs like stata_run/stata_run_dofile and stata_get_data_info/stata_get_data_schema are close enough that an agent could initially pick the wrong one.

Naming Consistency4/5

Almost all tools follow a consistent stata_verb_noun pattern in snake_case. Minor deviations are stata_session and stata_status, which are noun-only names rather than verb_object, and stata_run which lacks an explicit object.

Tool Count5/5

12 tools is well within the ideal scope for a domain-specific server. Each tool covers a meaningful part of the do-file, session, log, and data-inspection workflow without unnecessary bloat.

Completeness4/5

The tool surface covers the full write-do-file, append, read, run, read-log, install-package, and retrieve-results workflow coherently. Minor gaps exist around explicit session creation and do-file deletion, but arbitrary command execution via stata_run mitigates most dead ends.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides a bridge between Stata statistical software and code editors like VS Code and Cursor, enabling users to run Stata commands directly from the editor, view output in real-time, and get AI-powered assistance with Stata coding.
    506
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Connects AI agents to a local Stata installation, enabling execution of Stata code, data inspection, graph generation, and result verification through natural language interactions.
    731 PyPI
    86
    AGPL 3.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables an agent to execute Stata do scripts or inline commands locally and retrieve structured results including status, error diagnostics, and output text for consumption by the model.
    1
    -
  • A
    license
    A
    quality
    B
    maintenance
    Enables LLM/agent applications to execute Stata code, load and inspect data, obtain structured regression results and graphs, and manage background tasks through the Model Context Protocol.
    10
    MIT