Skip to main content
Glama

xae_plcopen_import

Idempotent

Imports PLCopen XML into a TwinCAT PLC project with conflict options (none, rename, replace, skip); replace mode preserves existing objects' folder and identity, verifying text before writing.

Instructions

Import a PLCopen XML file into a PLC project (path from xae_plc_projects). option: none | rename | replace | skip (conflict handling). replace: the existing object keeps its place (folder) and identity and gets the imported text. TwinCAT's own replace deletes it and re-creates the import at the project root, so the file is imported as renamed copies (PRG_X_1, header renamed too) and the tool finishes the replace: the copy's header is named back, the texts are checked against the XML, written into the existing object, read back, and the declared name must equal the object's name. Only then is the copy — created by this import, it was not in the tree before — deleted (nothing that existed before the import is ever deleted). Anything not proven → nothing written, the copy kept and named in the error. An object that is not at its place after an import is named (removed / moved). Result: replaced, header_renamed, copies_removed, build_required + objects_to_build (build next).

Input Schema

NameRequiredDescriptionDefault
optionNonone
xml_fileYes
plc_project_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes far beyond the annotations: it explains that nothing pre-existing is ever deleted, that the tool works around TwinCAT's destructive replace by creating a named copy and cleaning it up, and that anything unproven results in nothing being written with the offending copy named in the error. This is exactly the mutation-safety context an agent needs and is consistent with destructiveHint=false and idempotentHint=true.

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?

Front-loaded with the core import statement and option list, with the dense replace walkthrough after. It is long and a touch rambling, but nearly every sentence carries non-redundant safety information, so the size is largely justified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool whose annotations do not carry safety detail, the description supplies the safety semantics, the option semantics, and even enumerates result fields (replaced, header_renamed, copies_removed, build_required, objects_to_build) that point the agent toward the build step. Nothing essential is missing despite the weak schema.

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 0%, so the description must compensate; it does so well for 'option' by listing all four valid values (none/rename/replace/skip) even though the schema declares no enum, and hints where plc_project_path comes from ('path from xae_plc_projects'). 'xml_file' remains semantically unexplained, so it falls short of full compensation.

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+resource ('Import a PLCopen XML file into a PLC project') and immediately routes to the sibling that supplies the path (xae_plc_projects), clearly distinguishing it from xae_plcopen_export. An agent can identify the operation without opening 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?

It enumerates the conflict-handling options (none | rename | replace | skip) and elaborates heavily on replace, which implicitly tells the agent when to pick each option. However, it never states when to use this tool versus the related sibling xae_tree_consume_xml, nor any prerequisite like requiring an open project.

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

Deploy Server

Other Tools