Skip to main content
Glama
TIA Portal MCP Server

TIA Portal MCP Server

by BJM1122

Get Current TIA Block

tia_get_current_block
Read-onlyIdempotent

Retrieves details of the block currently selected or open in TIA Portal from a live project or exact export, including attributes, interface, body, and references.

Instructions

Details of the block currently selected/open in TIA Portal. source=live (default) reads it from the exact running V20 project: official attributes, cross references and, from one temporary block export, interface and program body; nothing is persisted. source=export resolves it through an exactly matching existing export instead: offline metadata, call relations, interface members and existing non-stale reference results; never creates or refreshes an export.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tia_get_current_block"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoexport only: call relations returned, default 100.
rootsNoexport only: bounded export roots to search.
sourceNolive
exportDirNoexport only: disambiguates several exact snapshots.
processIdNo
timeoutMsNoDefault 20000 (live) or 10000 (export, at most 30000).
maxResultsNolive only: cross references returned, default 500.
includeRawXmlNolive only; needs includeProgramBody.
interfaceLimitNoInterface members returned; default 1000 (live) or 500 (export, at most 2000).
includeInterfaceNoDefault true.
bodyEvidenceLimitNolive only; default 1000.
includeProgramBodyNolive only; default true.
includeCrossReferencesNolive only; default true.
includeExistingReferencesNoexport only; default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds genuine side-effect detail: live mode performs one temporary block export, nothing is persisted, and export mode never creates or refreshes an export. It does not say what happens when no block is selected/open or when no exact snapshot matches, which are the main remaining behavioral gaps.

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?

Two sentences, purpose front-loaded, then the live/export split in matching clauses. Dense but every clause carries information; the nested sub-clauses make it slightly heavy to parse at a glance.

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?

For a 14-parameter, dual-mode tool with no output schema, the description covers both modes' data sources and non-persistence clearly. Missing are failure conditions (no open block, no matching export) and any pointer to when a different block-reading tool is the right call.

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?

Schema coverage is 86%, so per-parameter mechanics are largely documented already. The description still adds the one thing the schema cannot: the semantic distinction between the two source values and which payload categories (cross references, interface, program body vs. existing references) each produces.

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 — returns 'Details of the block currently selected/open in TIA Portal' — and the 'currently selected/open' scope inherently separates it from by-name readers such as tia_read_block. It does not explicitly name that sibling as the alternative, so it stops just short of full differentiation.

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 clear, decision-relevant context for the one real choice the caller faces: source=live for exact running-project data at the cost of a temporary export, source=export for an offline snapshot resolved through an exactly matching existing export. It states the default and that exports are never created or refreshed, but offers no explicit when-not conditions or sibling routing.

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