Skip to main content
Glama
Edge-JB
by Edge-JB

tc_variant

Manage TwinCAT project variants offline: retrieve or replace variant definitions, select the active variant, and disable or enable tree items for the active variant.

Instructions

Project VARIANT management on the open solution (needs TCatSysManagerLib >= 3.3.0.0; older installs get_* return empty and set_*/disable surface a clear COM error). OFFLINE CONFIG ONLY — no confirm token needed; runtime needs a later activate/download; per-item disable/enable refuses TISC (safety) paths. Optional save:true does File.SaveAll once after a write. Actions: get_config (read-only) — returns the raw XML (round-trip this FIRST to capture the live shape before editing). get_current (read-only) — active variant name; empty string => no variant active / not configured. set_config (xml, save?) — replaces the WHOLE variant definition: a document with ..VariantName.. and/or standalone .. children (raw XML verbatim, schema not validated). select (variant, save?) — sets the active variant by name (e.g. "Variant3") or a group in bracket form (e.g. "[Group1]"); must already exist in the config. disable / enable (path, save?) — sets disabled state on a tree item FOR THE ACTIVE VARIANT; path uses ^ separators (e.g. TIID^Device 2 (EtherCAT)^Box 1, TIPC^MyPlc) and MUST NOT be under TISC. The readback disabled int may report SMDS_PARENT_DISABLED=2 (read-only state: disabled because an ancestor is) — never written, only echoed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlNo
pathNo
saveNo
actionYes
variantNo
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It reveals that set_config replaces the whole variant definition, save:true triggers File.SaveAll, disable/enable affects the active variant, and that the readback disabled int may report SMDS_PARENT_DISABLED=2 (a read-only state never written). This is comprehensive behavioral context beyond what annotations would typically cover.

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 description is compact and front-loaded with the core purpose and prerequisites. It uses clear section breaks for actions. A slight deduction because the first sentence is dense and could be split: 'Project VARIANT management on the open solution (needs TCatSysManagerLib >= 3.3.0.0; older installs get_* return empty and set_*/disable surface a clear COM error).' This packs version, error behavior, and scope into one sentence, but remains readable.

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?

Given the high complexity (5 parameters, 6 actions, no output schema, no annotations), the description covers prerequisites, offline-only nature, action semantics, parameter formats, error conditions, and readback quirks. It does not need to explain return values since there is no output schema, and it provides enough detail for an agent to invoke any action correctly.

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

Parameters5/5

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

Schema description coverage is 0% (only parameter names and types are in the schema, no descriptions). The description compensates fully by detailing each parameter: xml expects a raw <ProjectVariants> XML document with specific child elements, path uses ^ separators and must avoid TISC, variant can be a name or bracket-group, save is optional, and action is an enum explained per sub-action. This adds critical meaning to every parameter.

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 clearly states the tool manages project variants on a Beckhoff TwinCAT open solution. It lists six specific actions (get_config, get_current, set_config, select, disable, enable) and details each action's verb, resource, and behavior, distinguishing this tool from siblings like xae_build or tc_system.

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?

The description explicitly says this is for OFFLINE CONFIG ONLY, warns that older installs return empty/errors, and clarifies when a confirm token is not needed but runtime activation is required later. It also notes that per-item disable/enable refuses safety (TISC) paths, providing clear when-to and when-not-to guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Edge-JB/TwinCAT-XAE-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server