Skip to main content
Glama

generate_project_pdw

Compile ladder-logic IR into FBs-20MC/32MC/40MC/60MC PDW project layouts from a local template, replacing programs and annotations while preserving opaque settings and writing new files only.

Instructions

Compile Ladder IR to sampled FBs-20MC/32MC/40MC/60MC PDW layouts.

    Module records come from local templates.

    Match ladder.profile to the template CPU. Template must be inside workspace. Program and
    annotations are replaced by the explicit request; opaque project settings are retained.
    Network.comment supports CR/LF. Section indexes refer to zero-based source networks.
    Optional embedded SECT text uses only the sampled even-byte encoding. FUNC199 and
    control flow are not generated. New files only, no PLC connection or GUI guarantee.
    module_order=null preserves all modules; [] removes them explicitly. Names copy exact
    records from the template and optional workspace-scoped module_template_paths. Order and
    duplicates are retained. Missing or conflicting records are rejected. No automatic I/O
    allocation, module parameter editing, slot-capacity or hardware compatibility validation.
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "output_name": "<output_name>",
      "template_path": "<template_path>",
      "ladder": "<ladder>",
      "io_contract": "<io_contract>"
    },
    "name": "generate_project_pdw"
  }
}

Input Schema

NameRequiredDescriptionDefault
ladderYes
commentsNo
sectionsNo
acceptanceNo
io_contractYes
output_nameYes
module_orderNo
template_pathYes
require_acceptanceNo
module_template_pathsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only say write, not destructive, closed-world; the description goes well beyond that by disclosing that program and annotations are replaced while opaque settings are retained, that FUNC199 and control flow are not generated, that there is no PLC connection or GUI guarantee, and that no I/O allocation, parameter editing, slot-capacity, or hardware compatibility validation occurs. It never says what is returned (artifact path, bytes, diagnostics), which is the main remaining behavioral gap and is why this is not a 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?

The core purpose is front-loaded and the length is defensible for a tool with this many constraints; every clause carries a real limitation or rule. The structure is a dense run of fragments rather than an organized list, which makes rules like the module_order semantics easy to miss on a first read.

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

Completeness3/5

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

Given a large nested schema, no output schema, and only three annotations, the description does well on generation limits and validation gaps. It still leaves out the return value/artifact behavior and the purpose of the acceptance and io_contract parameters, which an agent must understand before constructing a valid call.

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

Parameters3/5

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

Top-level schema description coverage is 0% across 10 parameters, so the description has to carry the load. It does add real meaning for several of them (module_order=null vs [] semantics, zero-based section network indexes, workspace-scoped module_template_paths, ladder.profile/template CPU matching, network.comment CR/LF), but output_name, io_contract, acceptance, and require_acceptance are never explained, leaving nearly half the surface undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Compile Ladder IR to sampled FBs-20MC/32MC/40MC/60MC PDW layouts', which tells an agent exactly what the tool produces. It does not, however, distinguish this from the sibling 'generate_pdw', so an agent cannot tell from the text alone which of the two to call for a given PDW generation request.

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?

Prerequisites are stated ('Match ladder.profile to the template CPU', 'Template must be inside workspace', 'New files only'), which implies the context in which the tool can succeed. There is no explicit when-to-use / when-not-to-use guidance relative to generate_pdw or the other generate_* siblings, so the agent must infer the choice from the project/template framing.

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