generate_component_comments
Creates a separate CP950/Big5 WinProLadder component-comment import .txt file from REF/COMMENT/DESCRIPTION rows, enforcing 16-byte comments and never overwriting existing files.
Instructions
Create only a separate CP950 WinProLadder component-comment import .txt file.
Call this only when the user explicitly requests 新增元件註解 or component comments. It
does not inspect, analyze, generate or modify ladder logic or PDW projects; use analyze_ldr
to explain the logic and device references in an existing .ldr.
Rows use REF/COMMENT/DESCRIPTION, tabs, CRLF and CP950/Big5; COMMENT is at most 16
encoded bytes. Never overwrites a file.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"output_name": "<output_name>",
"entries": "<entries>"
},
"name": "generate_component_comments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entries | Yes | Rows with ref, description, and COMMENT (max 16 CP950/Big5 bytes). | |
| output_name | Yes | New plain .txt filename in the artifact directory; never overwrites. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Validation error code, message and written=false. | |
| artifact | No | Artifact metadata on success; absent when validation fails before writing. | |
| warnings | No | Generation or verification warnings; empty when none were reported. | |
| diagnosis | No | LDR failure diagnosis, when available. | |
| response_mode | Yes | Compact or full response. |