Skip to main content
Glama

generate_pdw

Create a new PDW binary by replacing one or two X-to-Y template rungs with the same rung count, using supported X0/X1, Y0/Y1/Y2, and NO/NC contacts.

Instructions

Create a new PDW binary by replacing one or two X-to-Y template rungs.

    Same rung count required. Only X0/X1, Y0/Y1/Y2 and NO/NC contacts supported.
    No branches, functions, comments or PLC operations. Templates are workspace-scoped.
    This generates a PDW binary; generate_component_comments produces only a separate .txt.
    Keep private templates outside Git; configure --root to their private directory.
    Return the actual binary artifact and warnings. Never overwrite.
    

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>",
      "rungs": "<rungs>",
      "io_contract": "<io_contract>"
    },
    "name": "generate_pdw"
  }
}

Input Schema

NameRequiredDescriptionDefault
rungsYesOne or two replacement X-to-Y rungs matching the template count.
acceptanceNoOptional executable scan cases checked against the replacement.
io_contractYesComplete user-authorized physical X inputs and Y outputs.
output_nameYesNew plain .pdw filename in the artifact directory; never overwrites.
project_nameNoProject title; defaults to output filename stem.
template_pathYesExisting FBs-60MC .pdw template path inside the workspace.

Output Schema

NameRequiredDescriptionDefault
errorNoValidation error code, message and written=false.
artifactNoArtifact metadata on success; absent when validation fails before writing.
warningsNoGeneration or verification warnings; empty when none were reported.
diagnosisNoLDR failure diagnosis, when available.
response_modeYesCompact or full response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.3.0
    • addedInput schema / properties / project_name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Project title; defaults to output filename stem.",
      +  "title": "Project Name"
      +}
    • changedOutput schema / $defs / ArtifactDescriptor / properties / uri / description
      Previous value: -"MCP resource URI for the artifact bytes."New value: +"Artifact MCP resource URI."
    • changedOutput schema / properties / diagnosis / description
      Previous value: -"Structured LDR generation failure diagnosis; absent on success."New value: +"LDR failure diagnosis, when available."
    • changedOutput schema / properties / error / description
      Previous value: -"Structured error code, message and written=false on handled validation failure."New value: +"Validation error code, message and written=false."
    • changedOutput schema / properties / response_mode / description
      Previous value: -"Whether repeated design metadata was compacted or returned in full."New value: +"Compact or full response."
  2. Changed6 schema fields changedv1.1.1
    • addedInput schema / properties / acceptance / description
      Added value: +"Optional executable scan cases checked against the replacement."
    • addedInput schema / properties / io_contract / description
      Added value: +"Complete user-authorized physical X inputs and Y outputs."
    • addedInput schema / properties / output_name / description
      Added value: +"New plain .pdw filename in the artifact directory; never overwrites."
    • addedInput schema / properties / rungs / description
      Added value: +"One or two replacement X-to-Y rungs matching the template count."
    • addedInput schema / properties / template_path / description
      Added value: +"Existing FBs-60MC .pdw template path inside the workspace."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "ArtifactDescriptor": {
      +      "description": "Download metadata shared by generated and retrieved artifacts.",
      +      "properties": {
      +        "mime_type": {
      +          "description": "Media type of the returned bytes.",
      +          "title": "Mime Type",
      +          "type": "string"
      +        },
      +        "name": {
      +          "description": "Plain artifact filename.",
      +          "title": "Name",
      +          "type": "string"
      +        },
      +        "sha256": {
      +          "description": "Lowercase SHA-256 digest of the exact artifact bytes.",
      +          "title": "Sha256",
      +          "type": "string"
      +        },
      +        "size": {
      +          "description": "Artifact size in bytes.",
      +          "minimum": 0,
      +          "title": "Size",
      +          "type": "integer"
      +        },
      +        "uri": {
      +          "description": "MCP resource URI for the artifact bytes.",
      +          "title": "Uri",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "uri",
      +        "name",
      +        "mime_type",
      +        "size",
      +        "sha256"
      +      ],
      +      "title": "ArtifactDescriptor",
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": true,
      +  "description": "Structured result for artifact-writing and artifact-retrieval tools.",
      +  "properties": {
      +    "artifact": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/ArtifactDescriptor"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Artifact metadata on success; absent when validation fails before writing."
      +    },
      +    "diagnosis": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": true,
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Structured LDR generation failure diagnosis; absent on success.",
      +      "title": "Diagnosis"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": true,
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Structured error code, message and written=false on handled validation failure.",
      +      "title": "Error"
      +    },
      +    "response_mode": {
      +      "description": "Whether repeated design metadata was compacted or returned in full.",
      +      "enum": [
      +        "compact",
      +        "full"
      +      ],
      +      "title": "Response Mode",
      +      "type": "string"
      +    },
      +    "warnings": {
      +      "description": "Generation or verification warnings; empty when none were reported.",
      +      "items": {},
      +      "title": "Warnings",
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "response_mode"
      +  ],
      +  "title": "ArtifactToolOutput",
      +  "type": "object"
      +}
  3. Addedv1.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, closed-world, non-destructive write. The description adds real behavioral context beyond them: it never overwrites, returns the actual binary artifact and warnings, and warns that private templates should live outside Git with --root configured. That last flag is CLI-oriented and slightly confusing in an MCP parameter context, which keeps it from 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?

Front-loads the core action and then enumerates constraints compactly, with little wasted wording. The reference to configuring --root is arguably a CLI detail that does not correspond directly to a tool parameter, adding minor noise.

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?

For a binary-generation tool with six parameters, an output schema, and full schema description coverage, this covers the essential constraints, non-overwrite behavior, artifact/warning return, and sibling distinction. It is complete enough to call correctly, with only the acceptance-case behavior and the --root reference left slightly under-explained.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description still adds meaning beyond the schema by tying rung count to the template, restating the restrictive contact set, and clarifying that output_name never overwrites and template_path must be an existing workspace template.

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 and resource ('Create a new PDW binary') plus the precise mechanism ('replacing one or two X-to-Y template rungs'). It explicitly distinguishes itself from the sibling generate_component_comments by noting that tool produces only a separate .txt.

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?

Gives concrete preconditions: same rung count, only X0/X1 and Y0/Y1/Y2 contacts, NO/NC only, no branches/functions/comments/PLC operations, and workspace-scoped templates. It does not explicitly say when to prefer generate_project_pdw or the inspect tools, so the routing guidance is clear but not exhaustive.

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