Skip to main content
Glama
industrial-aiops

OT-AIops Energy

plc_program_outline

Read-only

Parse exported PLC program files to obtain a structural outline of blocks, variables, branches, timers/counters, and call graph, with source line citations.

Instructions

[READ][risk=low] Structural outline of an EXPORTED PLC program file.

Parses one exported text file (Siemens SCL/ST .scl/.st, AWL/STL .awl,
Rockwell Studio 5000 .L5X — .txt is content-sniffed) and returns blocks
(FB/FC/OB/DB/routines/AOIs) with VAR sections, IF/CASE branch inventory,
timers/counters, and the call graph. Never uploads from a live PLC; reads
exactly the named file (≤5 MB). Every element cites source_file + line
(rung number for L5X ladder) — quote those citations when explaining.
Malformed sections degrade to entries in parse_errors, never a crash.

Args:
    path: Exported program file (.st/.scl/.awl/.l5x/.txt; must exist, ≤5 MB).

Returns dict: {source_file, format, stats:{blocks, variables, call_edges,
    branches, timers_counters, comments, lines, parse_errors},
    blocks:[{name, kind, language, line, end_line, variables (≤100,
    variables_truncated), calls, branches, timers_counters, networks,
    comment}] (≤50, blocks_truncated), call_graph:[{caller, callee,
    source_file, line}], parse_errors, citation_note}.

Example: plc_program_outline(path="~/exports/Line3_Conveyor.scl").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds substantial behavioral context: file size limit (≤5 MB), format support with content sniffing, graceful degradation to parse_errors, citation requirements, and truncation limits for variables (≤100) and blocks (≤50). This goes well beyond the annotations and helps the agent understand side effects and limitations.

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?

The description is well-structured with a leading summary, then parameter details, return value breakdown, and example. It is longer than average but every sentence adds value, explaining formats, error handling, and citations. The only minor issue is slight redundancy in restating the file size (≤5 MB) multiple times, but this is not a serious flaw.

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?

The tool has no output schema, and the description provides a detailed return structure including stats, blocks, call graph, parse_errors, and citation_note. It also covers edge cases (malformed sections, truncation) and practical usage guidance (quote citations). Given the tool's complexity, the description is complete enough for an agent to select and invoke it correctly without needing external documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema only defines a single string parameter 'path' with 0% coverage. The description fully compensates by specifying allowed extensions (.st/.scl/.awl/.l5x/.txt), existence requirement, size limit (≤5 MB), and a concrete example. This provides semantic meaning far beyond the bare schema.

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's purpose: it parses an exported PLC program file and returns a structural outline, including blocks, branches, timers/counters, and call graph. It specifies the verb 'Parses' and the resource 'exported PLC program file', and distinguishes from siblings like plc_program_visibility (live) by emphasizing 'Never uploads from a live PLC'.

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 clear context for when to use the tool: for analyzing exported text files, not live PLCs. It states 'Never uploads from a live PLC' and 'reads exactly the named file', which implies when not to use it. It does not explicitly name alternative sibling tools, but the context is strong enough for an agent to infer appropriate usage.

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/industrial-aiops/industrial-aiops-energy'

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