Skip to main content
Glama

tcunit_scaffold

Idempotent

Generate a TcUnit test suite for a TwinCAT function block, creating test methods for each public method and registering it in the .plcproj. Assertions remain TODO stubs.

Instructions

Generate _Tests.TcPOU (TcUnit.FB_TestSuite) with Test_InitialState and one test method per public method, arranged from the FB interface, and register it in the .plcproj. Assertions are left as TODO stubs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fb_nameYes
out_dirNo
overwriteNo
add_to_plcprojNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.8/5.0
Behavior4/5

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

With annotations already declaring non-readOnly, idempotent, non-destructive, the description still adds valuable behavior: it writes to the .plcproj, and critically, that assertions are left as TODO stubs (so the result is incomplete until filled in). These are real side effects the agent needs. It doesn't explain overwrite or out_dir semantics, keeping it short of 5.

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?

A single dense sentence, front-loaded with the verb and artifact and trailing into the meaningful detail about TODO stubs. No filler, though the run-on structure packs several distinct facts into one clause chain.

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?

An output schema exists so return values need not be described, and the description covers the artifact, its layout, .plcproj registration, and the stub caveat. The remaining gap is the undocumented out_dir and overwrite parameters, which most agents would want clarified before invoking.

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%, so the description must carry all four parameters, yet it only hints at fb_name (FB interface) and add_to_plcproj (register in the .plcproj). The out_dir and overwrite parameters receive no explanation anywhere, leaving half the surface undocumented.

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 (Generate) plus an exact artifact (<FB>_Tests.TcPOU of type TcUnit.FB_TestSuite) and enumerates its contents (Test_InitialState, one method per public method). It is clearly distinct from siblings like tcunit_run, which executes rather than scaffolds tests.

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 generation context is implied — you call this to create a test suite skeleton — but there is no explicit when-to-use, no stated precondition (e.g. an existing FB interface), and no reference to alternatives such as tcunit_run or exp_' tooling. Usage is inferable but not spelled out.

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