rewrite_pdw_metadata
Copy PDW metadata while preserving program and memory bytes, then update status pages, tables, or project title without overwriting workspace files or validating PLC semantics.
Instructions
Copy PDW metadata while retaining populated program and memory bytes exactly.
Title defaults to output stem. Pages: null preserves, [] removes, list replaces.
Tables: null preserves, [] removes; creating tables is unsupported.
Retains unrelated/unknown records. Workspace files only, never overwrites. Validates byte
preservation, not original instruction semantics, GUI compatibility or PLC behavior.
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>",
"source_path": "<source_path>"
},
"name": "rewrite_pdw_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tables | No | Tables: null preserves, [] removes. Nonempty definitions are limited to existing Modbus register-table edits: template_name and commands, with unchanged transaction count. Communication tables are not integer lists. | |
| output_name | Yes | New plain .pdw artifact filename. | |
| source_path | Yes | Existing workspace .pdw source path. | |
| project_name | No | CP950 project title; defaults to output stem. | |
| status_pages | No | Pages as in generate_project_pdw: name and items (ref, column_raw, row, display_format). null preserves, [] removes. | |
| normalize_component_names | No | Normalize verified FF name padding; retain program and other data. |
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. |