Skip to main content
Glama
Sysmac Studio File Editor MCP

Sysmac Studio File Editor MCP

by il-prof-f-a

plc_register_external

Registers an existing same-controller global as VAR_EXTERNAL in a POU, preserving source and rejecting local name/type conflicts or duplicate aliases. Repairs missing declarations from validation.

Instructions

Register an existing same-controller global as VAR_EXTERNAL in one POU. Preserve source, reject local name/type conflicts and avoid duplicate aliases. Useful for repairing missing declarations reported by plc_validate.

Input Schema

NameRequiredDescriptionDefault
pou_idYes
transaction_idYes
expected_revisionYesProject revision read before staging this change.
global_variable_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Adds real behavioral content beyond annotations: source is preserved, local name/type conflicts are rejected, duplicate aliases avoided. However, the required transaction_id is never explained, so the agent is not told whether this stages a change that must later be committed via plc_commit_changes. Annotations correctly mark it as non-readonly, non-idempotent, non-destructive, and the description does not contradict them.

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?

Three compact sentences, with the core action front-loaded followed by behavioral constraints and then the use case. No filler, though the middle sentence packs three distinct rules into one clause chain, which is slightly dense.

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

Completeness3/5

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

An output schema exists, so return values need no explanation. For a mutating tool whose signature includes a required transaction_id and an expected_revision guard, the description omits the staging/commit lifecycle and revision-mismatch behavior — meaningful gaps for correct invocation. What it does cover (conflict rejection, duplicate avoidance) is accurate and useful.

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 only 25%, with expected_revision the sole documented parameter, so the description must carry the rest. It weakly implies pou_id ('in one POU') and global_variable_id ('existing same-controller global') but never explains transaction_id or the optimistic-concurrency role of expected_revision. The compensation is too thin for a 4-parameter mutation with a staging workflow.

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?

States a specific verb and resource: register an existing same-controller global as VAR_EXTERNAL, scoped to one POU. That distinguishes it from a generic create-variable tool by requiring the global to already exist. It stops short of naming an explicit sibling alternative, so it lands at 4 rather than 5.

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 a clear use case: repairing missing declarations reported by plc_validate, which anchors the tool in a concrete workflow. It offers no explicit exclusions or contrast with siblings such as plc_create_variable for the case where the global does not yet exist, so the when-not is left implicit.

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