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

tc_cpp

Manage TwinCAT C++ projects: create, import, build, publish modules, and regenerate code from TMC files.

Instructions

TwinCAT C++ projects/modules under TIXC (paths use ^ separators). C++ ONLY — TISC (safety) untouched; runtime needs a later activate/download. VS-hosted-safe: create/open go purely through ITcSmTreeItem.CreateChild on TIXC (no New/Open/SaveConfiguration). Actions: create_project (name, template, before?) — CreateChild a new C++ project node under TIXC from a wizard; template = "TwinCAT C++ Project Wizard" | "TcVersionedDriverWizard" | "TcModuleCyclicCallerWizard" (or a full template .vcxproj/.tczip path — if a wizard NAME is rejected, fall back to the file path). create_module (projectPath = TIXC^, name, template? default "TwinCAT Class Wizard", before?) — CreateChild a module/class on an existing C++ project. open (file = existing .vcxproj/.tczip, subType? 0 copy into solution dir (default) /1 move/2 use-in-place, before?) — import an existing C++ project; the project is NOT renamed (CreateChild name is empty). tmc_codegen (projectPath) — offline StartTmcCodeGenerator (regenerates C++ from the .tmc; no runtime impact). set_props (projectPath, bootProjectEncryption? None|Target, saveProjectSources?) — offline config edit via ConsumeXml (at least one prop required). build (projectName = the .vcxproj DTE project Name/UniqueName, config? default "Release|TwinCAT RT (x64)", waitForFinish? default true, timeoutMs? default 1800000) — compile a single C++ project via SolutionBuild2.BuildProject; compiles only, does NOT deploy. publish (projectPath, confirm) — GUARDED, requires confirm="ALLOW_CPP_PUBLISH" and defaults to no-op: builds the module for ALL platforms and exports the deployable/shippable driver artifacts (long-running); does NOT itself activate/restart the runtime. CAVEAT: the ConsumeXml wrapper element for C++ project params is from a doc summary (Set-TreeItemXml surfaces GetLastXmlError, so a wrong element fails loudly); ProduceXml the project node once to confirm element names before relying on tmc_codegen/set_props/publish.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNo
nameNo
actionYes
beforeNoinsert before this sibling
configNo
confirmNo
subTypeNo
templateNo
timeoutMsNo
projectNameNo
projectPathNo
waitForFinishNo
saveProjectSourcesNo
bootProjectEncryptionNo
Behavior5/5

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

With no annotations, the description fully discloses behavioral details: VS-hosted-safe operation via ITcSmTreeItem.CreateChild, open project not renamed, build-only for compile, publish guarded and not activating runtime, and ConsumeXml error behavior. It covers side effects, restrictions, and prerequisites comprehensively.

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 well-structured with a clear overview followed by action-specific details. While lengthy, every sentence serves a purpose, and the information is organized logically. Minor redundancy exists (e.g., repeating 'CreateChild' details), but overall it is appropriately sized for the tool's complexity.

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

Completeness4/5

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

Given the tool's complexity (14 parameters, 7 actions, no output schema), the description is highly comprehensive, covering per-action behaviors, defaults, error indications, and guarded operations. It lacks details on return values or success/failure representation, but the context provided is sufficient for effective agent invocation.

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?

Despite only 7% schema description coverage, the description explains each action's parameters with defaults, constraints, and specific values (e.g., template options for create_project, subType semantics for open, confirm requirement for publish). This adds crucial meaning beyond the schema, fully compensating for low coverage.

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 identifies the tool as handling TwinCAT C++ projects/modules under TIXC with distinct differentiation from TISC safety. It explicitly lists seven actions with specific behaviors, making the purpose unambiguous and distinguishing from sibling tools like tc_ethercat or plc_project.

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?

The description provides strong usage guidance within its domain: it states 'C++ ONLY', notes when runtime activation is needed separately, and gives per-action caveats (e.g., build does not deploy, publish does not activate). However, it lacks explicit comparison to alternative tools or direct 'when-not-to-use' statements.

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