Skip to main content
Glama

xae_link

Destructive

Links a TwinCAT 3 PLC variable to its I/O target in the XAE mapping table, with optional bit offsets and size for partial links; validates both ends and rejects invalid or TwinSAFE links.

Instructions

Link a variable to its I/O counterpart (ITcSysManager::LinkVariables), both as full tree paths: variable='TIPC^^ Instance^PlcTask Inputs^GVL_IO.bIn', target='TIID^Device 1 (EtherCAT)^Term 1 (EK1100)^Term 2 (EL1004)^Channel 1^Input' (xae_links gives the instance's variables, xae_tree_get the terminals'). offs_* / size_bits for a part (bits; 0 = the smaller of the two). XAE checks that both exist, are variables and fit. A whole link is refused when the two are linked already (a part may be linked besides others). Runs once; the result has what changed in the mapping table and what else the target is linked to. In XAE only — not saved, not activated. TwinSAFE ends are refused. guarded: tc_request_confirmation(action='xae_link', target=' -> ' + ' [offsets /, bit]' for a part).

Input Schema

NameRequiredDescriptionDefault
targetYes
variableYes
size_bitsNo
offs_targetNo
confirm_tokenNo
offs_variableNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.19

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the destructiveHint=true annotation: it discloses that the link exists only in XAE and is neither saved nor activated, that whole links are refused when already linked while parts may coexist, that TwinSAFE endpoints are rejected, and that the operation runs once. It also documents the confirmation guard and the exact tc_request_confirmation call shape.

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-loads the action and example paths before edge-case rules, and nearly every clause conveys a constraint the agent needs. The parenthetical stacking ('offs_* / size_bits for a part (bits; 0 = the smaller of the two)') makes it denser than it needs to be.

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?

Covers prerequisites, refusal conditions, persistence semantics, and the confirmation workflow, and even summarizes what the output reports (mapping-table changes plus other links on the target) despite an output schema existing. Nothing an agent needs to invoke it safely is missing.

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?

With 0% schema description coverage the description must carry the load, and it does for the core parameters: variable/target are full tree paths (with examples) and offs_*/size_bits are bit offsets where 0 means 'the smaller of the two'. confirm_token is only implied via the guarded confirmation note rather than stated outright.

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 and resource ('Link a variable to its I/O counterpart'), names the underlying API (ITcSysManager::LinkVariables), and grounds it with a concrete variable/target example path pair. An agent can distinguish it from xae_unlink and xae_links without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

Gives a clear prerequisite chain: 'xae_links gives the instance's variables, xae_tree_get the terminals'' — telling the agent how to obtain valid arguments. It also scopes the environment ('In XAE only — not saved, not activated') and notes TwinSAFE ends are refused, though it never explicitly routes the agent to xae_unlink for removal.

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