Skip to main content
Glama

analyze_ldr

Read-only

Explains an existing .ldr ladder file by network, showing device read/write references, timer settings, decoded counts, and completeness warnings for validation and review.

Instructions

Explain the behavior and device usage of one existing valid .ldr file.

    Use this for per-network meaning, decoded counts, device read/write references, timer
    settings and completeness warnings. Use read_ldr when full decoded logic or raw payloads
    are needed, or inspect_ldr for framing and CRC evidence. Bad CRC or unknown framing returns
    an error; opaque networks produce an explicit incomplete-analysis warning. Nothing is
    written or sent to a PLC.
    

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "analyze_ldr"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesExisting .ldr path that must resolve inside the configured workspace.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.1
    • addedInput schema / properties / path / description
      Added value: +"Existing .ldr path that must resolve inside the configured workspace."
  2. Addedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

The annotations already state that this is a read-only, non-destructive, closed-world operation, so the description's real contribution is failure behavior: bad CRC or unknown framing returns an error, opaque networks yield an explicit incomplete-analysis warning, and nothing is written or sent to a PLC. That is meaningful context beyond the annotations, though it does not address scale or performance.

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 front-loaded with the core action, then moves through scope, sibling alternatives, and error semantics in four sentences. Every sentence adds information.

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?

An output schema is provided, so return values need not be described, and the failure and warning behavior is covered. The tool is simple, and the definition matches that complexity well; little is missing for an agent to call it correctly.

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?

There is only one parameter, and the schema documents it at 100% coverage, including the workspace-resolution constraint. The description reinforces the requirement that the file be existing and valid, but adds little beyond what the schema and annotations already state.

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 definition leads with a specific verb and resource: 'Explain the behavior and device usage of one existing valid .ldr file.' It then names what that explanation covers (per-network meaning, decoded counts, read/write references, timer settings, completeness warnings), which is concrete enough to separate it from read_ldr and inspect_ldr.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly routes the agent to alternatives and gives the condition that selects each: use read_ldr when full decoded logic or raw payloads are needed, and inspect_ldr for framing and CRC evidence. This defines both when to use it and when to use something else.

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