stata_append_dofile
Append Stata code to an existing do-file to extend or modify scripts without rewriting the entire file.
Instructions
向已有 do 文件追加内容
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 已有 do 文件的完整路径 | |
| content | Yes | 要追加的 Stata 代码内容 |
Append Stata code to an existing do-file to extend or modify scripts without rewriting the entire file.
向已有 do 文件追加内容
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | 已有 do 文件的完整路径 | |
| content | Yes | 要追加的 Stata 代码内容 |
Changes observed during successful MCP inspections.
v1.1.0Does 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.
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.
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.
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.
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.
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.