Skip to main content
Glama
TIA Portal MCP Server

TIA Portal MCP Server

by BJM1122

Trace TIA Call Graph

tia_trace_call_graph
Read-onlyIdempotent

Trace PLC block call relationships downstream, upstream, or both from a selected block; omit block identifiers to list OB entry blocks and their direct calls.

Instructions

Walk downstream, upstream or both directions through indexed call edges from one block. Without name/number/relativePath it lists the OB entry blocks and their direct calls instead.

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": {
      "exportDir": "<exportDir>"
    },
    "name": "tia_trace_call_graph"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
numberNo
maxDepthNoDefault 2.
maxEdgesNoDefault 250; for the entry list, direct calls per OB (default 100, at most 200).
directionNoDefault downstream.
exportDirYes
relativePathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds non-obvious behavior beyond that: traversal runs over pre-indexed call edges (an implicit prerequisite) and the tool silently changes mode when identifiers are absent. It does not mention truncation or maxEdges effects on results.

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?

Two tight sentences, no filler. The primary traversal mode is front-loaded and the fallback mode follows it, matching reading order for decision-making.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Seven parameters, one required, no output schema and no description of return shape. The core usage is well covered, but the undocumented required exportDir and the absence of any note on index dependency or result truncation leave real gaps for a graph-tracing tool.

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?

Schema coverage is only 43%, but the schema itself documents defaults for maxDepth, maxEdges, and direction. The description contributes the meaning of the name/number/relativePath trio as the block selector, yet exportDir (the sole required parameter) is unexplained in both schema and description, and maxEdges truncation semantics are never surfaced.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'walk downstream, upstream or both directions through indexed call edges from one block.' The second sentence clarifies the alternate no-identifier mode (listing OB entry blocks and their direct calls). This is clearly distinguishable from a data-flow trace, though it never names which sibling to prefer.

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?

Gives an explicit conditional: supply name/number/relativePath to trace from a block, omit them to instead list OB entry blocks with their direct calls. That covers two modes without exclusions or named alternatives such as tia_trace_data_flow or tia_get_graph_context.

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