Skip to main content
Glama
efranceschetti

festo-codesys-mcp

ST Find References (where-used)

st_find_references
Read-onlyIdempotent

Locates every usage of an ST identifier across .st files, ignoring comments and strings, to support safe renaming and refactoring.

Instructions

Find all references (usages) of an ST identifier across a directory of .st files — token-aware and comment/string-safe (unlike grep: ignores comments, strings, typed literals, and substring matches). USE WHEN: you need every usage of an ST identifier across files before renaming or refactoring. Each reference carries file, line/column, the line text, the containing POU, whether it is the declaration site, and disambiguation hints (e.g. resolves E_X.MEMBER member access via the qualifier). Note: sourceDir must be inside the workspace unless FESTO_MCP_ALLOW_OUTSIDE_WORKSPACE=1.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesIdentifier to search for (whole token)
sourceDirYesDirectory containing .st files (recursive scan)
caseInsensitiveNoIEC is case-insensitive (default true)
includeDeclarationNoInclude the declaration site (default false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
sourceDirYes
referencesYes
definitionsYes
referenceCountYes
Behavior5/5

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

The description adds rich behavioral context beyond the annotations (readOnlyHint, idempotentHint, destructiveHint). It details token-awareness, ignoring comments/strings/substrings, and specifies the output fields (file, line/col, line text, containing POU, declaration flag, disambiguation hints). It also notes the workspace constraint for sourceDir.

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 extremely concise at 3 sentences, with a clear 'USE WHEN' callout and a final note on workspace restrictions. No wasted words, front-loaded with the main purpose.

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 the tool's complexity (4 parameters, full schema coverage, existing output schema, rich annotations), the description covers all necessary aspects: behavior, usage context, constraints, and output details. It is complete without needing to repeat output schema information.

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?

The input schema covers all 4 parameters with descriptions (100% coverage). The description does not add new parameter-specific semantic details beyond the schema; it provides tool-level context but no extra per-parameter elaboration. Baseline of 3 is appropriate.

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 verb and resource: 'Find all references (usages) of an ST identifier across a directory of .st files'. It distinguishes itself from grep by being token-aware and safe, and differentiates from sibling tools like plc_lookup or st_symbols by focusing on references for renaming/refactoring.

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 includes an explicit 'USE WHEN' statement: 'USE WHEN: you need every usage of an ST identifier across files before renaming or refactoring.' This provides clear context for when to use the tool, though it does not explicitly state when not to use it or name specific alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/efranceschetti/festo-codesys-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server