Skip to main content
Glama
TIA Portal MCP Server

TIA Portal MCP Server

by BJM1122

Export TIA Project Index

tia_export_project_index

Exports an exact-session snapshot of PLC blocks, UDTs, and tag tables via TIA Openness, then builds an offline index and execution model without modifying the project.

Instructions

Create one exact-session snapshot of every PLC block, PLC type/UDT, and complete tag table with the official TIA Openness export APIs, then build the existing offline index and execution model. Hardware/network/HMI objects are outside this program-source snapshot. It never modifies, saves, compiles, or downloads the project.

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": {
      "projectPath": "<projectPath>",
      "confirmExport": "<confirmExport>"
    },
    "name": "tia_export_project_index"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNoSummary returns coverage and call samples and incremental counts. Full includes all execution-model lists.summary
processIdNoOptional exact running Portal PID. Required when more than one Portal process is visible.
timeoutMsNo
outputRootNo/app/tia-out
projectPathYesRequired exact project path (.ap20, .ap15_1, .ap17). Selects the matching API without fallback.
confirmExportYes
maxLockRetriesNoLegacy compatibility field; ignored by the exact-session snapshot backend.
reuseUnchangedNoV20: copy objects whose modified state is unchanged from the previous complete snapshot of this project, when no interface, DB, UDT or tag table changed; each copy is SHA-256 checked. false exports everything again.
confirmPortalAuthorizationReadyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnly=false, idempotent=false, destructive=false; the description adds substantive context beyond that, clarifying that the tool never modifies, saves, compiles, or downloads the project, so the non-readOnly flag comes from writing export artifacts rather than touching the PLC program. 'Exact-session' also hints at the Portal PID/lock semantics that drive the backend, though cost, duration, and where artifacts land are left unstated.

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 sentences, zero padding, with the snapshot scope front-loaded before the exclusion and the no-side-effects guarantee. Each sentence carries distinct information an agent needs.

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?

For a 9-parameter, no-output-schema export tool this covers purpose and safety adequately but leaves gaps an agent must resolve: what the returned coverage/samples look like, where files go under outputRoot, and what confirmExport / confirmPortalAuthorizationReady actually guard. The heavyweight confirmation parameters in particular deserve a word of rationale.

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 56%: detail, processId, projectPath, maxLockRetries, and reuseUnchanged carry their own descriptions, while timeoutMs, outputRoot, confirmExport, and confirmPortalAuthorizationReady are undocumented. The description's 'exact-session' phrasing loosely motivates processId but adds no meaning for the confirmation token, output location, or timeout behavior.

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?

States a precise verb and resource set: 'Create one exact-session snapshot of every PLC block, PLC type/UDT, and complete tag table' via the official TIA Openness export APIs, plus the downstream artifact ('offline index and execution model'). It also draws an explicit scope boundary (hardware/network/HMI objects excluded), which lets an agent separate it from the HMI export siblings.

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?

Usage context is clear: it is the program-source snapshot step that precedes reading/building an offline index, and HMI/hardware/network work belongs elsewhere. It does not name a specific alternative (e.g. tia_read_export_index, tia_query_live_project) for the case where a live read rather than an export is wanted, so routing is inferred rather than stated.

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