Skip to main content
Glama

proj_set_code

Idempotent

Writes PLC declaration and implementation into TwinCAT .TcPOU/.TcDUT/.TcGVL files, preserving other XML, creating a .bak, and removing stale LineIds for closed-XAE or batch edits.

Instructions

Write declaration/implementation back into the .TcPOU/.TcDUT/.TcGVL file (keeps the rest of the XML byte-identical, writes a .bak, drops the object's stale ). Use when XAE is closed or for batch edits; otherwise prefer xae_pou_set. Written also while the attached XAE has the project open — the result then says what that means (xae_open).

Input Schema

NameRequiredDescriptionDefault
nameYes
declarationNo
strip_lineidsNo
implementationNo
regenerate_lineidsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already establish readOnly=false, idempotent=true, and destructive=false, but the description adds important side effects beyond that: preserving the rest of the XML byte-identically, writing a .bak file, dropping stale <LineIds>, and reporting xae_open when the attached XAE has the project open. These are exactly the behavioral details an agent needs before invoking a file mutation.

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?

The key purpose is stated first, followed by side effects and sibling routing, so the structure is front-loaded. The parenthetical side-effect list is dense but still earns its place; the only minor weakness is that the final sentence about XAE-open behavior is slightly awkward.

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

Completeness3/5

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

An output schema exists, so return values do not need full explanation in the description. However, for a 5-parameter mutation with 0% schema description coverage, the missing parameter semantics leave a meaningful gap despite strong behavioral disclosure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description only partially compensates by mentioning declaration/implementation and stale <LineIds>. It does not explain the required name parameter, the optional null behavior, or the distinction between strip_lineids and regenerate_lineids, leaving several parameters undocumented in both places.

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?

The description names a specific mutation verb and resource: writing declaration/implementation back into .TcPOU/.TcDUT/.TcGVL files. It also distinguishes the tool from xae_pou_set by saying when that sibling is preferred, so an agent can identify the tool 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit routing guidance: use when XAE is closed or for batch edits, otherwise prefer xae_pou_set. This names both the qualifying condition and the alternative tool directly.

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