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

tc_task

Manage TwinCAT RT tasks, RT-core settings, and linked PLC tasks: list, create, configure cycle time, priority, CPU affinity, and add image variables. Verify changes with summary mode.

Instructions

RT tasks under TIRT (+ RT-core settings under TIRS, + a PLC project's LinkedTask under TIPC). CONFIG-ONLY — no confirm token needed; runtime needs a later activate/restart; TISC (safety) untouched. Tree paths use ^ separators (e.g. TIRT^PlcTask). Actions: list (tasks under TIRT); get (path; summary:true -> identity + parsed TaskDef tags instead of full XML); create (name; withImage default true = SubType 0 / false = SubType 1 no image; before?; cycleTimeUs?/priority? applied after create via ConsumeXml; save?); set_params (path; cycleTimeUs [us, converted to 100ns ticks = us*10] / priority [0-255] / autoStart; OR xml = raw .. escape hatch [mutually exclusive with the typed fields]; returnXml?; save?). CAVEAT: the TaskDef tag names for cycle/priority/autostart are UNCONFIRMED against the AI docs — prefer the xml escape hatch and verify with get(summary) before trusting the typed fields; add_image_var (path = a with-image task's Inputs/Outputs node; varName; dataType e.g. BOOL/INT/DINT; startAddress? default -1 = append; save?); get_rt_settings (TIRS; summary:true -> parsed MaxCPUs/Affinity/per-CPU LoadLimit/BaseTime/LatencyWarning); set_rt_settings (maxCPUs / affinity [TwinCAT hex token e.g. #x0000000000000007] / cpus [{id,loadLimit?,baseTimeNs?,latencyWarningUs?}]; OR xml escape hatch; returnXml?; save?); bind_cpu (path; affinity = a name [CPU1..CPU8, MaskSingle/Dual/Quad/Hexa/Oct/All, None] OR a raw #x.. token; returnXml?; save?); get_linked_task (path? = PLC root under TIPC, default first child of TIPC); set_linked_task (path? = PLC root; linkedTask = XAE tree path of the RT task, e.g. TIRT^PlcTask; save?).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xmlNo
cpusNo
nameNo
pathNo
saveNo
actionYes
beforeNoinsert before this sibling task
maxCPUsNo
summaryNo
varNameNo
affinityNo
dataTypeNo
priorityNo
autoStartNo
returnXmlNo
withImageNo
linkedTaskNo
cycleTimeUsNo
startAddressNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv2.4.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv2.1.1

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: config-only, no confirm token needed, runtime activation needed later, TISC untouched, caveat about unconfirmed tag names, unit conversions (cycleTimeUs to 100ns ticks), and mutual exclusion of typed fields vs xml escape hatch. However, it does not cover authorization needs or error handling, which prevents a perfect score.

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 a single dense paragraph that front-loads the main purpose and then lists actions with their parameter details. Every sentence provides essential information, but it could be better structured (e.g., bullet points or sections) to improve readability without losing content. Still, it is appropriately concise for the complexity.

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 tool has 19 parameters, 10 actions, no output schema, and no annotations, the description is remarkably complete. It covers all actions, parameter semantics, special behaviors (e.g., ConsumeXml, unit conversions, caveats), and structural context (tree paths with ^ separators). The only minor gap is lack of error handling or return value description, but the absence of an output schema makes this acceptable.

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?

The schema description coverage is only 5%, but the description compensates nearly fully. It explains the meaning and constraints of many parameters: withImage default true, cycleTimeUs conversion (us to 100ns ticks), priority range 0-255, affinity as TwinCAT hex token or named CPU masks, and the xml escape hatch being mutually exclusive with typed fields. This adds substantial value beyond the bare schema.

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 RT tasks under TIRT, RT-core settings under TIRS, and linked tasks under TIPC. It lists specific actions and distinguishes itself from siblings by referencing specific subsystems (TIRT, TIRS, TIPC) and noting it is config-only with no confirm token needed, which is unique among sibling tools like tc_system or tc_tree.

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?

The description implies usage through its detailed action list but does not explicitly state when to use this tool versus alternatives (e.g., tc_tree or tc_system). It mentions that runtime needs a later activate/restart and that TISC (safety) is untouched, but no direct comparison or when-not guidance is provided.

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

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