Skip to main content
Glama

generate_control_ldr

Generates FATEK .ldr ladder logic for common control functions from translated requirements and an explicit I/O contract, returning the file plus assumptions for validation.

Instructions

Generate common control functions from customer requirements translated by the host. Physical I/O must be explicit and within io_contract. Supports latch, toggle, edges, delays, pulse, counter, interlocked direction and star/delta; returns actual .ldr + assumptions.

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>",
      "spec": "<spec>",
      "io_contract": "<io_contract>"
    },
    "name": "generate_control_ldr"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYes
acceptanceNo
io_contractYes
output_nameYes
strict_writersNo
target_profileNo
require_acceptanceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.0
    • addedInput schema / properties / target_profile
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "FBs-32MC-test30",
      +        "FBs-32MN-test29",
      +        "FBs-40MC-test27",
      +        "HB1-32M-test23",
      +        "FB-28MA-test22",
      +        "FBe-40MC-test21",
      +        "FBe-20MA-test19",
      +        "FBn-26MC-test17",
      +        "FBs-60MC-test16",
      +        "FBs-20MC",
      +        "FBs-24MA",
      +        "FBs-24MA-test7",
      +        "FBs-32MA-test11",
      +        "FBs-40MA-test12",
      +        "FBs-44MN-test13"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Target Profile"
      +}
  2. Addedv1.0.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false. The description adds useful behavioral context by stating it returns actual .ldr plus assumptions and requires physical I/O to be explicit within io_contract. It does not, however, describe side effects, failure modes, or what happens when assumptions cannot be met.

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 three sentences, front-loaded with the main action and followed by a key constraint and supported capabilities. It is dense but efficient, with no obvious filler.

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

Completeness2/5

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

The tool has a complex nested schema with 7 parameters and no output schema, yet the description is very short and omits most parameter semantics. Given the schema richness and 0% description coverage, the description is not complete enough for an agent to call the tool confidently without inspecting the schema.

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 the burden of explaining 7 parameters. It only vaguely references io_contract and lists the control kinds that map to spec.kind, leaving parameters like acceptance, strict_writers, target_profile, require_acceptance, and output_name unexplained.

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 states a specific verb and resource: 'Generate common control functions'. It further specifies supported control types (latch, toggle, edges, delays, etc.) and says it returns actual .ldr plus assumptions, making the purpose clear. However, it does not explicitly differentiate itself from sibling generators like generate_ldr or generate_sequence_ldr.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only guidance provided is a precondition: 'Physical I/O must be explicit and within io_contract'. There is no explicit statement of when to use this tool versus alternatives such as generate_ldr or generate_sequence_ldr, nor any when-not-to-use guidance.

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