Skip to main content
Glama
purinzan

gx3-mcp-server

gx3_ladder_print

Render GX Works3 ladder logic as readable text to show how a circuit is wired, with options to filter by section, position range, or device and save output to a file.

Instructions

Render a program in GX Works3 print-text layout. This is the output to show a user when explaining how a circuit is wired: quote it verbatim in a code block, never a JSON dump of the same rung. Output can be large; pass 'output' to write it to a file. To emit only the circuit under discussion, use 'list_sections' to discover section titles, then filter with 'section', 'pos_range' (A-B), or 'device'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rootYesExtracted project folder.
deviceNoRender only rungs referencing this device (any role), plus their section title.
outputNoOptional output file path (-o); parent dirs are created.
programYesProgram/POU name or <hash>_LDDB.db.
sectionNoRender only sections whose title contains this text.
pos_rangeNoRender only rows whose step pos is within A-B (inclusive).
list_sectionsNoList section titles with pos range and rung count, then exit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses that output can be large, that 'output' writes to a file, that list_sections exits after listing, and that the result should be quoted verbatim rather than restructured. This is strong coverage, though it does not detail all edge-case behaviors such as exact return format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact, front-loaded with the core purpose, and each sentence earns its place: purpose, output handling, and filtering workflow. There is no filler or redundancy.

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

Completeness5/5

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

Given no annotations and no output schema, the description covers the essential context: what the tool renders, how to present the result, how to manage large outputs, and how to narrow the result via list_sections and filters. An agent has enough information to invoke the tool correctly in the intended workflow.

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 description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining why 'output' matters (large output), how list_sections relates to filtering, and which filters are appropriate for narrowing the rendered circuit. This enriches the schema definitions without repeating them.

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?

The description states a specific verb and resource: "Render a program in GX Works3 print-text layout." It also clarifies the intended use case—showing a user how a circuit is wired—which distinguishes it from sibling analysis and check tools like gx3_lint or gx3_interlock_check.

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

Usage Guidelines5/5

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

The description gives explicit guidance on when to use the tool: when explaining circuit wiring, and how to present the output (verbatim in a code block, not JSON). It also provides a concrete workflow for filtering output using list_sections, section, pos_range, and device, making usage conditions clear.

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