Skip to main content
Glama
KphungFROMM

motionworks-iec-mcp-server

by KphungFROMM

get_tag

Retrieve a variable's declaration and all references across POUs, nets, and lines to trace what drives a signal.

Instructions

Get one variable's full detail plus every place it is used.

Use this to answer "what is this signal and what drives it?" — it returns the declaration (with address and comment) alongside every POU, net and line that references it.

Args: path: Project file or directory. tag_name: Variable name. A qualified name such as "Products.Sensor.Bit" also works.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
tag_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose the core behavior: it returns the declaration and all reference locations. The verb 'Get' and 'returns' imply read-only operation, though it does not explicitly state that it makes no modifications or mention error behavior. This is fairly transparent for a simple lookup 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?

The description is compact and front-loaded: the first sentence states the tool's purpose, the second gives a use case and output details, and then an args list adds parameter semantics. Every sentence contributes value with no filler.

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?

Given the simple two-parameter schema and an output schema that covers return shape, the description is largely complete. It explains the tool's purpose, when to use it, and both arguments. It does not mention prerequisites like project loading or error cases when a tag is not found, which are minor gaps.

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 0%, so the description must compensate. It adds meaning to both parameters: path is described as a project file or directory, and tag_name is described as a variable name with a qualified-name example. This gives the agent practical guidance beyond the bare schema types.

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 clearly states the tool gets a single variable's full detail plus all its usages, naming the concrete output: declaration with address and comment, and every POU, net and line referencing it. This distinguishes it from sibling tools like get_tags and get_type by emphasizing the per-variable detail and usage traversal.

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?

The description gives an explicit use case: 'Use this to answer "what is this signal and what drives it?"' and describes what it returns, giving the agent clear when-to-use guidance. It does not explicitly mention when-not-to-use or name alternative sibling tools, so it stops short of full differentiation.

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