MCP server exposing ten PLC analysis tools for querying parsed L5X (Rockwell/Allen-Bradley) PLC programs. Provides project summaries, tag search, routine inspection, interlock tracing, and live value evaluation via OPC UA or static snapshots.
LogixLens demonstrates strong domain-specific tool design with clear, actionable descriptions tailored for PLC diagnostics. All 11 tools have explicit names, descriptions (avg ~150 chars), and documented input schemas. Naming follows verb_noun convention (get_*, search_*, find_*, trace_*). However, output schemas are not formally documented in the visible code, only inferred from descriptions. Parameters lack type constraints (enums, ranges) and some descriptions omit usage context. Error handling and recovery guidance are absent. The trace_blockers tool is exceptionally well-designed for its domain (backward-chaining diagnostics), but most tools lack the LLM-optimization depth of A-tier tools.
Bundled context to explain a whole routine in one call: its rungs+comments, every tag referenced with descriptions, and the signatures of AOIs it uses. Use for 'explain routine R / what does R do'.
Cited list of every place that READS a tag (XIC/XIO/compares...). Member-level aware. Use for 'what reads X / where is X used'.
Cited list of every place that WRITES a tag (OTE/OTL/OTU/MOV/timers...). Member-level aware. Use for 'what writes X'.
An Add-On Instruction definition: parameters (name/usage/type), local tags, internal routine rung texts, and its instance tags. Use for 'what is <AOI>' (e.g. FB_VALVE).
Current live tag values from the attached snapshot/OPC UA provider (or a note that none is attached). Optionally filter to specific tags.
Machine Dossier: controller metadata, program/routine tree, tag/module/AOI/UDT counts, documentation coverage, and an aoi_instances map (AOI type -> instance tag names). Call this for 'what does this machine do' / overview questions.
Output schemas not formally documented. Tool descriptions infer structure (e.g., 'returns condition tree with AND/OR/LEAF nodes') but no JSON Schema or TypeScript interface is visible in source. LLMs cannot reliably plan downstream calls without explicit return types.
Parameters lack type constraints (enums, ranges, patterns). E.g., 'scope' in search_tags accepts 'Controller' or program name but no enum is declared; 'limit' has no min/max bounds. Free-form strings invite hallucinated values.
No error handling or recovery guidance. Tools return success implicitly but do not document failure modes (e.g., 'tag not found', 'routine does not exist', 'live snapshot unavailable'). LLMs cannot self-correct on failures.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 56 | <=2025-11-25 | v2 |
List every rung (number, raw ladder text, comment) of an RLL routine, or every line of an ST routine. Use to read a routine end to end.
One rung's raw text, comment, parsed instruction list (mnemonic + operands), and every tag it references with its description. Use to explain a specific rung.
Full record for one tag (data type, tag type, scope, description, alias, constant) plus a member-level usage summary: cited reads and writes. Use to check a tag exists and how it's used.
Case-insensitive substring search over tag name AND description. Use to discover exact tag names before making a claim. Returns a capped list with a 'total'.
THE diagnosis tool. Backward-chains the interlock logic that drives a target coil/bit and returns the condition tree (AND/OR/LEAF/FLAG/LATCH nodes with citations). If live_values are supplied (or a live snapshot is attached), it evaluates the tree and returns the minimal FAILING path(s) — the exact red contact blocking the target. Use for any 'why won't X go / why is X stopped/blocked' question.
List-returning tools (search_tags, find_writers, find_readers) mention 'capped list' and 'total' in descriptions but no pagination parameters (limit, offset, cursor) are visible in input schemas. Unclear how to iterate large result sets.
Tool descriptions lack 'when to use' context. E.g., get_routine vs get_rung vs explain_context_pack all read routine logic but distinctions are unclear. LLMs may pick the wrong tool or call multiple tools redundantly.