Skip to main content
Glama

get_code_template

Return a ready-to-adapt IEC 61131-3 template for common automation patterns, so you can start with the structure and add your specific PLC logic.

Instructions

Returns a ready-to-adapt IEC 61131-3 code template for a common automation pattern. Use this as the structural starting point, then fill in the user-specific logic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYesAutomation pattern slug
languageNoIEC 61131-3 languageST

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does usefully warn that the returned template is not final code ("fill in the user-specific logic"), but it says nothing about the return form (code block vs. file), permissions, or whether the patterns are exhaustive. Adequate but not rich for an unannotated tool.

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?

Two sentences with zero filler: the first states what is returned and the domain, the second states how to use it. The purpose is front-loaded and nothing is repeated from the schema.

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 two-parameter enum-only retrieval tool with no output schema, the description covers purpose and usage well. The only minor gap is that it never characterizes the response payload beyond 'code template,' which for template retrieval is a small omission.

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?

Schema description coverage is 100% with both parameters enum-constrained, so the schema already documents valid values fully. The description adds no parameter-level meaning (no mention of 'pattern' or 'language'), which is the expected baseline 3 when the schema does the heavy lifting.

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 gives a specific verb and resource ("Returns ... IEC 61131-3 code template") plus the qualifier "ready-to-adapt" and the domain "common automation pattern." It is clear enough to distinguish Get from its list-style siblings (list_templates, list_brands), though it never names a sibling explicitly, which keeps it short of a 5.

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?

"Use this as the structural starting point, then fill in the user-specific logic" tells the agent the intended workflow, but there is no when-not guidance and no explicit routing against get_iec61131_reference or list_templates. Usage is implied rather than contrasted with alternatives.

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