diff --git a/src/scripts/mirror_export.py b/src/scripts/mirror_export.py index d01e24b..5d44130 100644 --- a/src/scripts/mirror_export.py +++ b/src/scripts/mirror_export.py @@ -5,7 +5,7 @@ import sys, scriptengine as script_engine, os, traceback, time, codecs # # - Structural nodes (Device, Application, Folder, ...) become directories. # - Code-bearing nodes (Program, FB, Function, Method, Property, DUT, GVL, -# Interface, ...) become .iecst files in their parent directory. +# Interface, ...) become .st files in their parent directory. # - If a code-bearing node has child code objects (e.g. an FB with methods) # those children land in a sibling subdirectory with the parent's name. # - Filesystem-illegal characters in CODESYS object names are replaced with @@ -95,7 +95,7 @@ def write_one(parent_dir, name, decl, impl, project_path): if not os.path.exists(parent_dir): os.makedirs(parent_dir) kind = classify(decl) - fname = sanitise(name) + '.iecst' + fname = sanitise(name) + '.st' fpath = os.path.join(parent_dir, fname) lines = [] diff --git a/src/server.ts b/src/server.ts index a3e3321..02371a7 100644 --- a/src/server.ts +++ b/src/server.ts @@ -1350,7 +1350,7 @@ export async function startMcpServer(config: ServerConfig): Promise { s.tool( 'mirror_export', - "Walks the CODESYS project tree and writes one .iecst file per code-bearing object into a filesystem mirror, preserving the project tree as nested directories. Programs / Function Blocks / Functions / Methods / Properties / DUTs / GVLs / Interfaces all become text files; structural nodes (Devices, Applications, Folders) become directories. Each file carries a header comment with its original CODESYS project path so a future write-back tool can map it back to set_pou_code's pouPath. Read-only -- does NOT modify the CODESYS project. UTF-8 output. If mirrorRoot is omitted, defaults to '/MCP/mirror'.", + "Walks the CODESYS project tree and writes one .st file per code-bearing object into a filesystem mirror, preserving the project tree as nested directories. Programs / Function Blocks / Functions / Methods / Properties / DUTs / GVLs / Interfaces all become text files; structural nodes (Devices, Applications, Folders) become directories. Each file carries a header comment with its original CODESYS project path so a future write-back tool can map it back to set_pou_code's pouPath. Read-only -- does NOT modify the CODESYS project. UTF-8 output. If mirrorRoot is omitted, defaults to '/MCP/mirror'.", { projectFilePath: z.string().describe("Path to the project file."), mirrorRoot: z.string().optional().describe("Filesystem path where the mirror tree gets written. If omitted, defaults to '/MCP/mirror'. Created automatically if missing; existing files at the same paths are overwritten."),