Skip to main content
Glama

generate_sequence_ldr

Generates ordered ladder-logic sequences in .ldr files using native T timers, with pause/resume state handling and optional acceptance checks. Use it to turn a sequence spec into symbols and ladder code.

Instructions

Generate ordered steps using native T timers, with no automatic X/Y additions. Native pause/resume uses FUN87 with register state and no relay copy chains. External pulse counting is only for requirements explicitly specifying a clock input. Return symbols and actual .ldr; not GUI or PLC verified.

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_sequence_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

B3.3/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, so the write-vs-read and sandbox status is known. The description adds genuinely useful behavior beyond that: no automatic X/Y additions, FUN87 register-based pause/resume with no relay copy chains, and the caveat that output is 'not GUI or PLC verified' — an important quality signal. However, it says nothing about whether the tool validates or fails on invalid specs, what strict_writers does to output, or how require_acceptance changes behavior.

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?

Four short sentences with the core action front-loaded and no filler; the functional constraints follow in a logical order. The telegraphic, jargon-dense phrasing ('no relay copy chains') is efficient for an expert reader but costs a little immediate comprehensibility.

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?

This is a heavily structured generator with nested specs, acceptance harnesses, a target profile enum and a strict_writers toggle, and no output schema. The description covers only the timer/clock design rule and the return artifact; it never explains the acceptance/require_acceptance coupling, strict_writers, target_profile selection, or the IO contract's role, which are exactly the decisions an agent must make before calling.

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 all seven parameters (including nested SequenceSpec, IOContract and AcceptanceCase) are documented only by their names and types. The description touches a few indirectly — clock via 'external pulse counting', pause/resume via FUN87, register state via register_base — but leaves output_name, io_contract, acceptance, strict_writers, target_profile and require_acceptance entirely unexplained, so it does not compensate for the coverage gap.

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 names a specific verb and resource: 'Generate ordered steps using native T timers', and the contrast with 'external pulse counting' clarifies what kind of sequence is produced. It never names the sibling generators (generate_ldr, generate_control_ldr, generate_system_ldr), so the agent must infer the boundary from the tool name rather than from explicit differentiation.

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?

It gives a concrete selection rule for one design decision: external pulse counting is only used when the requirement explicitly specifies a clock input, which routes the clock-based case away from the default T-timer path. Missing is any guidance on when to pick this generator over generate_control_ldr or generate_ldr, and no prerequisites (e.g., when acceptance cases must be supplied) are stated.

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