PLCWare - TIA Portal (tia)

v1.13.1
io.github.renanlido/tia-openness Checked 1 day ago Published 7 days ago

Drive Siemens TIA Portal V21 from AI: author, compile, export and gated download via Openness.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

tia_ping TIA — connection diagnostics

Diagnoses connectivity to the TIA Openness `serve` API and whether the server is ACTIVATED. Tests GET /health (reachability) and GET /readiness (license activation). Ideal for the MCP-on-Mac-pointing-at-a-`serve`-on-a-Windows-VM scenario. Read-only. Returns { base, reachable, activated, latencyMs, hint }.

tia_readiness TIA — environment readiness

Readiness diagnostic for the TIA Openness V21 environment ON THE SERVE HOST (x64 process, Windows 'Siemens TIA Openness' group, PublicAPI, selected host/API registry key, and TIA instances). Call BEFORE connecting. Maps to GET /readiness. Read-only (class R). Returns { ready, checks:[{ name, status, detail, remediation }], version }; version reports the selected host/API and installed host inventory without claiming legacy runtime support.

tia_guide TIA — the operating guide (READ FIRST)

THE OPERATING GUIDE for driving the tia_* tools — read the relevant topic BEFORE authoring, changing hardware or preparing a deploy. Returns bundled markdown: gates vs guards (G1..G7 are human-only), the build pipeline (validate→plan→scaffold→verify→handoff), runtime-validated gotchas, GUI-gate handoffs, the bare-CPU protection recipe, and the project-spec format. The pipeline/recipes topics distinguish host/API/firmware, observed API minVersion evidence and unverified legacy SimaticML imports; App 1.8.0 ships the V21 baseline only. Default topic 'toc' lists the chapters; 'full' retu…

ParameterTypeDescription
topicstringone of: toc | full | codex | brief | gates-guards | gui-gates | gotchas | pipeline | recipes | spec-format (default "toc")

tia_job_status TIA — long-operation status

Waits (up to waitSeconds, default 20, max 25) for a background job started by a long tool that answered status:"running" (tia_connect, tia_start, tia_show_ui, tia_project_create/save/saveas/close/archive, tia_compile, tia_source_put, tia_device_create, tia_import_xml, tia_types_import, tia_download, tia_upload, tia_export_xml, tia_export_block, tia_block_compare, tia_crossrefs, tia_io_map, tia_spec_apply, tia_cax_export/import, tia_hmi_screen_export, tia_hmi_screens_import, tia_hmi_validate, tia_global_library_create/open/save, tia_library_mastercopy_create, tia_device_from_mastercopy, tia_vci…

ParameterTypeDescription
jobId *stringjobId returned by the long tool (or by a busy error's details.jobId)
waitSecondsintegerhow long this call may wait (default 20, max 25)

tia_instances TIA — running instances

Lists TIA Portal sessions exposed by Openness and native Siemens.Automation.Portal.exe processes on the serve host. Native-only rows include the PID with mode and project path set to null. Maps to GET /instances. Read-only (class R).

tia_status TIA — connection status

Current status of serve's connection to TIA Portal (attached instance, active project). `boundProjectPath` is the project this session is bound to (null when unbound); `bindingDrift` is null, or `{ actual, reason }` when the project open in the bound TIA is no longer that one (reason: project_closed | other_project | project_object_stale): ask the human which project is intended, then tia_connect to rebind. The additive `version` field reports selected host/API majors, PublicAPI path and installed host/API inventory; legacy detection is not runtime support. Maps to GET /tia. Read-only (class R…

tia_projects TIA — projects in a folder

Lists TIA project files (.ap*) in a folder on the serve host. Maps to GET /tia/projects?folder=<folder>. Read-only (class R).

ParameterTypeDescription
folder *stringpath of the folder to scan on the serve host (required)

tia_project_info TIA — active project info

Information about the currently connected project (name, path, author, `modified` = it has unsaved changes, `boundProjectPath`). Requires a connected project; answers 409 `binding_conflict` when the project open in the bound TIA is no longer the bound one (tia_status shows `bindingDrift`). Maps to GET /project. Read-only (class R).

tia_project_languages TIA — project languages

Lists the languages (cultures) configured in the active project. Requires a connected project. Maps to GET /project/languages. Read-only (class R).

tia_plcs TIA — list of PLCs

Lists the PLCs (PlcSoftware) of the active project as {name, device}: name is the PLC software name for plc arguments, device is its owning station name for device arguments. Requires a connected project. Maps to GET /plcs. Read-only (class R).

tia_devices TIA — list of devices

Lists the project's devices and their items. Requires a connected project. typeIdentifier prefers the station value, then the first readable DeviceItem.TypeIdentifier (including HMI panels). typeIdentifierSource is device, deviceItem or unavailable; if none can be read, typeIdentifier is null and typeIdentifierUnavailableReason explains the missing metadata. Maps to GET /devices. Read-only (class R).

tia_device_tree TIA — device tree

Hardware tree of a device (racks/slots/modules). Requires a connected project. For a large device read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is null. A page is {device, typeIdentifier, items, total, nextCursor}; total is the number of tree nodes of the whole device. A page is a forest: an item whose parent is on another page is listed at the top level of items with parentPath (the names of its ancestors, outermost first). Without limit and cursor the whole tree is returned. Each item's addresses [{start, length, ioType}] are the raw…

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_device_connections TIA — device connections

Lists the communication connections (S7 etc.) of a device. Requires a connected project. Maps to GET /devices/{device}/connections. Read-only (class R).

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name

tia_plc_blocks TIA — blocks of a PLC

Lists the blocks of a PLC (name, type, language, number, isConsistent, isKnowHowProtected). Requires a connected project. For a large project read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is null. A page is {blocks, total, nextCursor}; total is the number of blocks of the whole PLC. Without limit and cursor the whole list is returned. Maps to GET /plcs/{plc}/blocks?limit=&cursor= (both optional). Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_plc_types TIA — types (UDTs) of a PLC

Lists the user data types (UDTs) of a PLC. Requires a connected project. Maps to GET /plcs/{plc}/types. Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_plc_tags TIA — tag tables of a PLC

Lists the tag tables and their tags for a PLC. Requires a connected project. For a large project read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is null. A page is {tagTables, total, nextCursor}; total counts the tags of all tables (an empty table counts as one) and a table split across pages appears on both with the tags that fall on each. Without limit and cursor the whole list is returned. Maps to GET /plcs/{plc}/tags?limit=&cursor= (both optional). Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_plc_watchtables TIA — watch tables of a PLC

Lists the watch tables of a PLC. Requires a connected project. Maps to GET /plcs/{plc}/watchtables. Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_catalog TIA — search the hardware catalog

Searches the hardware catalog (article number, type identifier, version). Requires TIA connected. By default the (long) 'description' is OMITTED — on broad filters it blows up the payload (description × firmware variants); pass verbose:true WITH a specific filter to include it. Maps to GET /catalog?filter=&typeIdentifier=&verbose=. Read-only (R).

ParameterTypeDescription
filterstringfilter text: article no., description, etc. (optional)
typeIdentifierstringtype identifier to filter by (optional)
verbosebooleaninclude the full 'description' (off by default; on broad filters it blows up the payload — use with a specific filter)

tia_connections_diagnose TIA — S7 connection diagnostics

Diagnostic for an S7 connection between two devices: available interfaces, nodes, and creationinfos. Requires a connected project. Maps to GET /connections/diagnose?localDevice=&partnerDevice= (both required). Read-only (class R).

ParameterTypeDescription
localDevice *stringlocal device station name from tia_devices.name or tia_plcs.device, not the PLC software name (required)
partnerDevice *stringpartner device station name from tia_devices.name or tia_plcs.device, not the PLC software name (required)

tia_subnets TIA — list of subnets

Lists the active project's subnets. Requires a connected project. Maps to GET /subnets. Read-only (class R).

tia_subnet_get TIA — subnet details

Reads ONE subnet: name, typeIdentifier, netType, every readable attribute, `updatable` (the attribute names tia_subnet_update can change on it, plus Name when it is writable), the connected `nodes` [{device, interface, node, address, subnetMask}] and the `ioSystems` [{name, number, controller, devices}] on it. Read it before tia_subnet_update or tia_subnet_delete: the nodes and IO systems listed (all pages of a paged read) are what a delete would disconnect or remove. An unknown subnet is 404 not_found. Requires a connected project. `inventoryGaps` [{kind, subject, reason}] lists every read th…

ParameterTypeDescription
subnet *stringsubnet name, as listed by tia_subnets
cursorstringopaque nextCursor of the previous intact page; omit for the first page
limitintegerpage size, 1..1000 node or IO-assignment units

tia_device_network TIA — device network configuration

Reads the network configuration of ONE device, per network interface: `item` (the interface item name, the `interface` value the network write tools take), operatingMode, subnet, node {name, address, subnetMask}, pn {deviceName, autoGeneration, setDirectly, convertedName} (null when the PROFINET attributes are not readable, as on an interface that is not PROFINET), ioController {ioSystem} and ioConnector {ioSystem}. Read it before tia_pn_name_set, tia_io_system_connect or tia_io_system_disconnect. An unknown device is 404 not_found with details.validDevices; a PLC software name also identifies…

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name

tia_io_systems TIA — IO systems of the project

Lists every IO system of the project: {name, number, subnet, controller {device, interface} or null, devices [{device, interface}]}, plus `inventoryGaps` [{kind, subject, reason}] (reads that failed during the scan; empty when all succeeded, otherwise the list may be incomplete; a gap of kind `io_system_subnet` also carries `ioSystem` {number, controller}, the identity the serve decides on, while `subject` is only the name). Pass limit (1..1000) and each nextCursor as cursor to page IO-device assignments; an empty system is one unit. A split system repeats its header with only that page's devi…

ParameterTypeDescription
cursorstringopaque nextCursor of the previous intact page; omit for the first page
limitintegerpage size, 1..1000 IO-assignment or empty-system units

tia_obj_roots TIA — object model roots

Handles of the roots of the generic object model (project, devices, subnets). Requires a connected project. Maps to GET /obj/roots. Read-only (class R).

tia_obj_get TIA — object by handle

Details of an object by handle (type, name, attributes, compositions). Requires a connected project. Maps to GET /obj/{handle}. Read-only (class R).

ParameterTypeDescription
handle *stringinteger handle of the object (obtained from /obj/roots or /obj/{h}/items/{comp})

tia_obj_items TIA — children of a composition

Handles of an object's children in a composition. Requires a connected project. Maps to GET /obj/{handle}/items/{composition}. Read-only (class R).

ParameterTypeDescription
composition *stringname of the composition to enumerate
handle *stringinteger handle of the parent object

tia_obj_info TIA — object info

Available compositions and invocations of an object. Requires a connected project. Maps to GET /obj/{handle}/info. Read-only (class R).

ParameterTypeDescription
handle *stringinteger handle of the object

tia_obj_creationinfos TIA — creation info for a composition

Creatable types in a composition and their parameters (mandatory/supported types). Requires a connected project. Maps to GET /obj/{handle}/creationinfos/{composition}. Read-only (class R).

ParameterTypeDescription
composition *stringcomposition name
handle *stringinteger handle of the parent object

tia_obj_services TIA — services of an object

Lists the services (GetService<T>) available on an object. Requires a connected project. Maps to GET /obj/{handle}/services. Read-only (class R).

ParameterTypeDescription
handle *stringinteger handle of the object

tia_pg_interfaces TIA — PG/PC interfaces (no scan)

Lists the connection modes and PG/PC interfaces TIA Portal sees for this PLC's CPU — name, number, target interfaces — plus each adapter's status in the serve host's OS (Up/Down/… or not_found_in_os: a DISABLED adapter is invisible). NO network scan (unlike tia_accessible_devices, GATE G7). Use it to pick connectionMode/pcInterfaceName/targetInterfaceName for tia_download. Requires app ≥ v1.6.0. Maps to GET /plcs/{plc}/pginterfaces. Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_crossrefs TIA — cross-references of an object or a whole PLC

Cross-references of ONE object or of a whole PLC: for every source object, the objects that use it or that it uses, each with its locations (block, network, address, access such as Read, Write or Call). Use it to see who calls, reads or writes a tag, block, type or constant before changing it, and to find objects nothing refers to. target names ONE object (block, type, tag, constant or tag table; with kind=blockgroup a user group name or a path such as Motors/Conveyor); without target the whole PLC is read. kind is plc, block, type, tag, constant, tagtable or blockgroup. Without kind the name…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
filterstringwhich sources to list: AllObjects (default), ObjectsWithReferences, ObjectsWithoutReferences or UnusedObjects (candidates, not proof)
kindstringwhat target names: plc, block, type, tag, constant, tagtable or blockgroup; omit to auto-detect across block, type, tag, constant and tagtable (blockgroup is never auto-detected)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)
targetstringname of ONE object (block, type, tag, constant or tag table; with kind=blockgroup a user group name or a path such as Motors/Conveyor); omit or leave empty for the whole PLC

tia_io_map TIA — I/O channel map of a PLC with tag matches

I/O channel map of ONE PLC, the base of a FAT/SAT I/O list: for every I/O device item reachable from the PLC (its own modules and onboard I/O, and the devices on its PROFINET IO systems) the address ranges with logical notation, the channels with logical addresses, the PLC tags that sit on them, and the I/O tags that sit on nothing. entries is one ordered list; kind is range (device, path, ioType, length, from, to, channels, status), channel (device, path, channel, address, bits, addressBasis, status, flags, tags) or tag (an I/O tag on no channel or range: table, name, address, status, reason)…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_start TIA — start/attach (no project)

Starts TIA Portal (or attaches to an idle instance) WITHOUT opening a project. Class M-off (offline mutation). `headless` only applies when CREATING a new instance (when attaching, it inherits the existing mode). Step 1 of the proactive trust-GATE flow: tia_start → tia_show_ui → tia_connect. Maps to POST /tia/start. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
headlessbooleantrue = no window (fast offline authoring); false (default) = with window. Only when creating a new instance.

tia_show_ui TIA — make visible (enables the trust GATE)

Relaunches the HEADLESS instance we started as VISIBLE, reopening the same project, to RENDER the 1st-connection trust dialog on screen (the concrete handoff of GATE G1) — so a human can confirm it. Only works if serve owns the portal (not on an attached instance). Maps to POST /tia/show-ui. Use BEFORE tia_connect when you started headless. Long operation: may answer status:"running" + jobId — then call tia_job_status.

tia_connect TIA — connect/open project (trust GATE G1)

Opens/attaches a TIA project (.ap*) on the serve host. Class M-off. Idempotent for the ALREADY-OPEN project (response `alreadyOpen:true`, no-op) and reuses a running TIA instance for a DIFFERENT project (`reusedPortal:true`). In an instance serve started, the open project and any foreign project are closed to make room (or the instance is restarted): if one has unsaved changes the call is REFUSED with 409 `unsaved_changes` and nothing is changed, unless it carries `saveUnsavedChanges:true` (saves each modified project first; recommended) or `discardUnsavedChanges:true` (closes WITHOUT saving:…

ParameterTypeDescription
projectPath *stringpath to the project file (.ap*) on the serve host (required)
discardUnsavedChangesbooleanDATA LOSS: close the modified project(s) WITHOUT saving; every unsaved change is lost for good. Only when a human explicitly decided to throw that work away, NEVER to get past an unsaved_changes refus…
resumeTokenstringtoken returned by the GATE handoff; re-call with it AFTER a human has confirmed the dialog
saveUnsavedChangesbooleanRECOMMENDED choice when a modified project would be closed: save every modified project this call closes, then close it. Without a flag such a call is refused with unsaved_changes and nothing is chang…
tiaVersionstringOptional TIA host major: '21', 'V21' or '21.0'. Without it the project .apNN hint applies, otherwise V21 is preferred. This application ships only the V21 layer; legacy selections are refused before s…
umacPasswordstringUMAC password (GATE G6; only if a human provided it — never make it up)
umacTypestringUMAC credential type (default "Project")
umacUserstringUMAC user (GATE G6; only if a human provided it — never make it up)
withUserInterfacebooleanopen with the TIA UI visible (default true)

tia_disconnect TIA — disconnect

Disconnects from TIA. This is the explicit teardown for the TIA instance the serve itself created (an instance we merely ATTACHED to is only detached, never killed) — but not the only path that can end an owned instance: tia_show_ui (relaunch visible), tia_project_create, and a tia_connect needing a fresh connect also end/replace it. Ending an instance serve started would lose the unsaved changes of its projects, so if one has any the call is REFUSED with 409 `unsaved_changes` (nothing is changed) unless it carries `saveUnsavedChanges:true` (saves each modified project, then disconnects; rec…

ParameterTypeDescription
discardUnsavedChangesbooleanDATA LOSS: close the modified project(s) WITHOUT saving; every unsaved change is lost for good. Only when a human explicitly decided to throw that work away, NEVER to get past an unsaved_changes refus…
saveUnsavedChangesbooleanRECOMMENDED choice when a modified project would be closed: save every modified project this call closes, then close it. Without a flag such a call is refused with unsaved_changes and nothing is chang…

tia_project_create TIA — create project

Creates a new TIA project. Guard Gd4: the target directory must be EMPTY — if it isn't, serve returns 409 conflict (this tool passes the error through; rediscover/choose another directory). A project already open in this session is closed to make room: if it has unsaved changes the call is REFUSED with 409 `unsaved_changes` (nothing is changed) unless it carries `saveUnsavedChanges:true` (saves it first; recommended) or `discardUnsavedChanges:true` (DATA LOSS: only on an explicit human decision, never to get past the refusal; the client asks the human to confirm first). The response carries…

ParameterTypeDescription
directory *stringtarget directory (must be empty — Gd4) (required)
name *stringproject name (required)
discardUnsavedChangesbooleanDATA LOSS: close the modified project(s) WITHOUT saving; every unsaved change is lost for good. Only when a human explicitly decided to throw that work away, NEVER to get past an unsaved_changes refus…
saveUnsavedChangesbooleanRECOMMENDED choice when a modified project would be closed: save every modified project this call closes, then close it. Without a flag such a call is refused with unsaved_changes and nothing is chang…
withUserInterfacebooleancreate with the TIA UI visible (default true)

tia_project_save TIA — save project

Saves the open project. Maps to POST /project/save. Long operation: may answer status:"running" + jobId — then call tia_job_status.

tia_project_saveas TIA — save project as

Saves the open project to another directory. Maps to POST /project/saveas. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
directorystringtarget directory for 'save as'

tia_project_close TIA — close project

Closes the open project and RELEASES the lock (Gd3: use this, not tia_disconnect, to release the project). KEEPS the TIA process alive (response `portalKept`/`pid`) — the next tia_connect reuses it instead of paying the 40-80s cold start. A project with unsaved changes is never closed silently: the call is REFUSED with 409 `unsaved_changes` (nothing is changed) unless it carries `saveUnsavedChanges:true` (saves it, then closes; recommended, or call tia_project_save first) or `discardUnsavedChanges:true` (closes WITHOUT saving: DATA LOSS, only on an explicit human decision, never to get past…

ParameterTypeDescription
discardUnsavedChangesbooleanDATA LOSS: close the modified project(s) WITHOUT saving; every unsaved change is lost for good. Only when a human explicitly decided to throw that work away, NEVER to get past an unsaved_changes refus…
saveUnsavedChangesbooleanRECOMMENDED choice when a modified project would be closed: save every modified project this call closes, then close it. Without a flag such a call is refused with unsaved_changes and nothing is chang…

tia_project_archive TIA — archive project

Archives the open project (.zap*). Maps to POST /project/archive. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
directorystringtarget directory for the archive
modestringarchive mode (e.g., Compressed)
namestringarchive file name

tia_device_create TIA — create device

Creates a device (CPU/HMI/IO) by typeIdentifier. Optional group is an existing device user-group path (Area/Line, case-insensitive); omitted means project level. For group, GET /status must advertise supportsDeviceGroupCreation:true (app 1.8.1+); older serves are refused before creation. Uses typed CreateWithItem, never the unsafe generic CreateDevices call. The successful receipt identifies the canonical group; missing or different placement is an error naming the created station when available: inspect before retrying, never retry automatically. A dryRun preview does not check serve support.…

ParameterTypeDescription
typeIdentifier *stringOrderNumber:<MLFB>/V<fw> (Gd5; resolve via tia_catalog)
deviceItemNamestringdevice-item name; for an HMI, names the panel item (for a single-item device, use this as its name)
deviceNamestringstation name; may be read-only on some device types
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
groupstringexisting device user-group path from the project root, e.g. Area/Line; omitted: project level (app 1.8.1+)

tia_device_change_version TIA — change CPU firmware (in-place)

Changes the CPU's FIRMWARE version IN-PLACE (wraps DeviceItem.ChangeType), PRESERVING the program — an alternative to delete+recreate (enables 'auto-FW-match'). Guard Gd5: the typeIdentifier follows 'OrderNumber:<MLFB>/V<fw>' with '/V' (slash), never ':V' — resolve via tia_catalog. Rule: the PROJECT's firmware version must be ≤ the physical DEVICE's (project FW ≤ device FW). dryRun (Gd11) returns the plan without mutating. Maps to POST /plcs/{plc}/device/changeversion. Class M-off. API minVersion evidence: V18 (V17 lacks ChangeType; V18–V20 metadata binds, not legacy runtime acceptan…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name whose CPU firmware will be changed, not the device station name
typeIdentifier *stringOrderNumber:<MLFB>/V<fw> of the target firmware (Gd5; resolve via tia_catalog) — e.g.: "OrderNumber:6ES7 214-1HG40-0XB0/V4.4"
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_device_plug TIA — plug module

Plugs a module into an existing device by typeIdentifier (Gd5: '/V', never ':V'; resolve via tia_catalog). Maps to POST /devices/{device}/plug. M-off.

ParameterTypeDescription
device *stringtarget device station name from tia_devices.name or tia_plcs.device, not the PLC software name
typeIdentifier *stringOrderNumber:<MLFB>/V<fw> of the module (Gd5)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
hoststringdevice item host (rack/rail), if applicable
namestringname of the plugged module (default: Module_<position>)
positionintegerslot/position (default: the first free position of the host that accepts the module)

tia_device_unplug TIA — unplug module

Removes a device item (module). Maps to DELETE /devices/{device}/items/{item}. M-off.

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name
item *stringname of the device item to remove
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_device_group_create TIA — create device group

Creates a device group. Maps to POST /devicegroups. M-off.

ParameterTypeDescription
name *stringgroup name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_subnet_create TIA — create subnet

Creates a subnet by typeIdentifier (Gd5: '/V', never ':V'). Refused with 409 subnet_name_in_use (details.existing) when the name matches another subnet, ignoring case. The result carries a `postcheck` (the serve re-reads the project after the write); a mismatch is 409 postcheck_failed (details.mismatches): re-read with tia_subnets before retrying. Maps to POST /subnets. M-off.

ParameterTypeDescription
typeIdentifier *stringsubnet typeIdentifier (Gd5)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
namestringsubnet name

tia_network_connect TIA — connect to subnet

Connects a device's interface to a subnet (with IP; optionally creates an IO-system). CPU and IO-devices MUST be on the SAME subnet. The result carries a `postcheck` (the serve re-reads the connection after the write); a mismatch is 409 postcheck_failed (details.mismatches): re-read with tia_device_network before retrying. Before connecting or writing an IP, the serve checks Address metadata and its current value: 409 node_attribute_list_unavailable or node_attribute_unreadable means nothing changed. dryRun uses POST /network/connect/plan and runs the same address guards without changing the p…

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name
subnet *stringsubnet name
createIoSystembooleancreate an IO-system on this connection
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
ioSystemNamestringIO-system name (if createIoSystem)
ipstringIP address (e.g., 192.168.0.1)

tia_network_address TIA — set network address

Sets address attributes (IP/mask/etc.) of a device's interface. The result carries a `postcheck` (the serve re-reads the attributes after the write); a mismatch is 409 postcheck_failed (details.mismatches; details.rollback says whether the previous values were restored; details.restoreFailures lists every field that is NOT back at its previous value, re-read after the rollback): re-read with tia_device_network before retrying. Refused before anything is written, nothing changed: 409 node_attribute_list_unavailable (details.attributes, details.reason: the attribute list of the node could not be…

ParameterTypeDescription
attributes *objectaddress attributes (e.g., { Address: '192.168.0.1' })
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_network_disconnect TIA — disconnect from subnet

Disconnects a device's interface from the subnet. The result carries a `postcheck` (the serve re-reads the interface after the write); a mismatch is 409 postcheck_failed (details.mismatches): re-read with tia_device_network before retrying. Maps to POST /network/disconnect. M-off.

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_subnet_update TIA — update subnet

Updates ONE subnet: rename it (`name`) and/or set attributes from the serve's allow-list for its net type (Ethernet: DefaultSubnet; Mpi: HighestAddress, TransmissionSpeed; Profibus: HighestAddress, TransmissionSpeed, BusProfile; tia_subnet_get lists `updatable` for the subnet; SubnetId is never updatable). Only the fields that differ from the current value are written (none passed: 400 missing_param; all unchanged: 200 with changes:[]). A rename takes at most 24 characters: a longer name is 400 invalid_subnet_name (details.name, length, maxLength), a dryRun included, after the subnet is found…

ParameterTypeDescription
subnet *stringcurrent subnet name, as listed by tia_subnets
attributesobjectname→value map of the subnet attributes to set (only the allow-listed ones of its net type, e.g., { DefaultSubnet: true })
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
namestringnew subnet name (rename)

tia_subnet_delete TIA — delete subnet

Deletes a subnet. A subnet that still has nodes or IO systems is refused with 409 subnet_not_empty (details.nodes and details.ioSystems list everything that would be disconnected or removed) unless disconnectNodes:true, which disconnects every node from it and removes the IO systems on it first; an unknown subnet is 404 not_found. Read it with tia_subnet_get first. The result carries `disconnected`, `removedIoSystems` and a `postcheck` (the serve re-reads: the subnet is gone and no node is connected to it); a mismatch is 409 postcheck_failed: re-read with tia_subnets and tia_device_network bef…

ParameterTypeDescription
subnet *stringsubnet name, as listed by tia_subnets
disconnectNodesbooleanconfirm deleting a non-empty subnet: every node is disconnected from it and every IO system on it is removed
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_pn_name_set TIA — set PROFINET device name

Sets the PROFINET device name of ONE interface and/or its automatic name generation. `interface` is the interface item name from tia_device_network. Pass `name` (an explicit name turns auto-generation off, so the plan lists both changes) and/or `autoGeneration`; neither: 400 missing_param; `name` together with autoGeneration:true: 400 conflicting_params. The name must be DNS-style: labels of a-z, 0-9 and '-' separated by '.', each label 1-63 octets and 240 octets in all, no label starting or ending with '-', the first label not `port-xyz` or `port-xyz-abcde`, the whole not shaped like an IPv4…

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name
autoGenerationbooleanturn the automatic generation of the PROFINET device name on or off
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
interfacestringinterface item name, as listed by tia_device_network (default: the primary network interface)
namestringnew PROFINET device name (DNS-style, lower case)

tia_io_system_create TIA — create IO system

Creates the IO system of a PROFINET controller interface; connect the IO devices to it afterwards with tia_io_system_connect. `controllerInterface` is the interface item name from tia_device_network (default: the primary network interface). `name` and `number` are optional (left out, TIA chooses); a number outside 100-115 is 400 invalid_io_system_number and one another IO system already has is 409 io_system_number_in_use (details.usedBy); when a number is passed and the IO systems of a subnet could not be listed it is 409 subnet_inventory_incomplete (details.gaps). Also refused, nothing change…

ParameterTypeDescription
controller *stringcontroller device station name from tia_devices.name or tia_plcs.device, not the PLC software name
controllerInterfacestringcontroller interface item name, as listed by tia_device_network (default: the primary network interface)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
namestringIO system name (default: chosen by TIA)
numberintegerIO system number, 100-115 (default: chosen by TIA)

tia_io_system_update TIA — update IO system

Renames the IO system of a controller interface and/or changes its number (neither passed: 400 missing_param). `controllerInterface` is the interface item name from tia_device_network (default: the primary network interface). A number outside 100-115 is 400 invalid_io_system_number and one another IO system already has is 409 io_system_number_in_use (details.usedBy), or 409 subnet_inventory_incomplete (details.gaps) when the IO systems of a subnet could not be listed to check it. Also refused, nothing changed: 409 no_io_system (the controller has no IO system: create it with tia_io_system_crea…

ParameterTypeDescription
controller *stringcontroller device station name from tia_devices.name or tia_plcs.device, not the PLC software name
controllerInterfacestringcontroller interface item name, as listed by tia_device_network (default: the primary network interface)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
namestringnew IO system name
numberintegernew IO system number, 100-115

tia_io_system_connect TIA — connect device to IO system

Assigns the interface of an IO device to the IO system of a controller interface. `interface` and `controllerInterface` are interface item names from tia_device_network (default: the primary network interface). The controller must already have an IO system (409 no_io_system: create it with tia_io_system_create) and the device interface must be on the SAME subnet as that IO system (409 cross_subnet_assignment, details.deviceSubnet and details.ioSystemSubnet: connect the device to that subnet with tia_network_connect first; 409 subnet_inventory_incomplete, details.gaps: the subnet of an IO syste…

ParameterTypeDescription
controller *stringcontroller device station name from tia_devices.name or tia_plcs.device that owns the IO system, not the PLC software name
device *stringIO device station name from tia_devices.name, not the PLC software name
controllerInterfacestringcontroller interface item name, as listed by tia_device_network (default: the primary network interface)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
interfacestringIO device interface item name, as listed by tia_device_network (default: the primary network interface)

tia_io_system_disconnect TIA — disconnect device from IO system

Removes the interface of an IO device from its IO system (to leave the subnet use tia_network_disconnect). `interface` is the interface item name from tia_device_network (default: the primary network interface). Refused, nothing changed: 409 not_io_device, 404 not_found. The result carries `ioSystem:null`, `changes` and a `postcheck` (the serve re-reads the assignment after the write); a mismatch is 409 postcheck_failed (details.mismatches): re-read with tia_device_network. dryRun (Gd11) is answered by the serve (needs an open project): it runs the same guards and returns the plan WITHOUT chan…

ParameterTypeDescription
device *stringIO device station name from tia_devices.name, not the PLC software name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
interfacestringIO device interface item name, as listed by tia_device_network (default: the primary network interface)

tia_tagtable_create TIA — create tag table

Creates a tag table on a PLC. Maps to POST /plcs/{plc}/tagtables. M-off.

ParameterTypeDescription
name *stringtable name
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_tagtable_delete TIA — delete tag table

Deletes a tag table with every tag and constant in it (a user table group is searched; exact name first, then ignoring case). The DEFAULT tag table is refused with 409 default_tag_table (details.table, isDefault:true); an unknown table is 404 not_found. dryRun (Gd11) is answered by the serve (needs an open project): it runs the same guards and lists the tags and constants that would go, WITHOUT deleting. Maps to DELETE /plcs/{plc}/tagtables/{table}. M-off.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
table *stringtag table name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_tag_create TIA — create tag

App 1.8+ serve returns 400 bad_request (details.field, rule) for quote-bearing names or malformed/type-mismatched/out-of-range absolute addresses. Creates a tag in a table. Refused with 409 name_collision (details.collidesWith = the colliding tag, constant or block) when the name matches, ignoring case, any tag, constant or block of the PLC. The result carries `overlaps`: the OTHER tags whose logical address overlaps this one (informational, never a refusal). Maps to POST /plcs/{plc}/tags. M-off.

ParameterTypeDescription
dataType *stringdata type (e.g., Bool, Int, Word)
name *stringtag name
plc *stringPLC software name from tia_plcs.name, not the device station name
addressstringaddress (e.g., %I0.0, %M10.0)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
tablestringtag table (default: the standard one)

tia_tag_delete TIA — delete tag

Deletes a tag from a table. Maps to DELETE /plcs/{plc}/tagtables/{table}/tags/{tag}. M-off.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
table *stringtag table
tag *stringtag name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_tag_update TIA — update tag

App 1.8+ serve returns 400 bad_request (details.field, rule) for quote-bearing names or malformed/type-mismatched/out-of-range absolute addresses, including previews. Updates ONE tag: rename, data type, logical address and the external accessible/visible/writable flags. Only the fields you pass change, and only those that differ from the current value are written (none passed: 400 missing_param; all unchanged: 200 with changes:[]). A rename is refused with 409 name_collision (details.collidesWith = the colliding tag, constant or block) when the new name matches, ignoring case, another tag, con…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
table *stringtag table that holds the tag
tag *stringcurrent tag name
addressstringnew logical address (e.g., %I0.0, %MW10)
dataTypestringnew data type (e.g., Bool, Int, Word)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
externalAccessiblebooleannew ExternalAccessible flag
externalVisiblebooleannew ExternalVisible flag
externalWritablebooleannew ExternalWritable flag
namestringnew tag name (rename)

tia_constant_create TIA — create constant

App 1.8+ serve returns 400 bad_request (details.field, rule) for quote-bearing names or invalid decimal integer literals; typed/radix literals pass through. Creates a user constant in a tag table. Refused with 409 name_collision (details.collidesWith = the colliding tag, constant or block) when the name matches, ignoring case, any tag, constant or block of the PLC. Maps to POST /plcs/{plc}/constants. M-off.

ParameterTypeDescription
dataType *stringdata type
name *stringconstant name
plc *stringPLC software name from tia_plcs.name, not the device station name
value *stringvalue
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
tablestringtag table (default: the standard one)

tia_constant_update TIA — update constant

App 1.8+ serve returns 400 bad_request (details.field, rule) for quote-bearing names or invalid decimal integer literals, including previews; typed/radix literals pass through. Updates ONE user constant: rename, data type and value. Only the fields you pass change, and only those that differ from the current value are written (none passed: 400 missing_param; all unchanged: 200 with changes:[]). A rename is refused with 409 name_collision (details.collidesWith = the colliding tag, constant or block) when the new name matches, ignoring case, another tag, constant or block of the PLC; an unknown…

ParameterTypeDescription
constant *stringcurrent constant name
plc *stringPLC software name from tia_plcs.name, not the device station name
table *stringtag table that holds the constant
dataTypestringnew data type
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
namestringnew constant name (rename)
valuestringnew value (numbers as their text)

tia_constant_delete TIA — delete constant

Deletes a user constant from a tag table; an unknown table or constant is 404 not_found. dryRun (Gd11) is answered by the serve (needs an open project): it resolves the constant and returns the plan {dataType, value} WITHOUT deleting. Maps to DELETE /plcs/{plc}/tagtables/{table}/constants/{constant}. M-off.

ParameterTypeDescription
constant *stringconstant name
plc *stringPLC software name from tia_plcs.name, not the device station name
table *stringtag table that holds the constant
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_fb_create TIA — create FB

Creates an EMPTY Function Block (empty interface, no logic) by importing a minimal SimaticML skeleton. Supported languages: SCL (the default when `language` is omitted), LAD, FBD, STL or ProDiag, in any case; any other value is refused with 400 bad_request listing them, and a CPU family can still refuse one it does not support. Gd6: for LOGIC use a textual language (SCL) via tia_source_put, or graphical (LAD/FBD) via tia_import_xml. Refused with 409 name_collision (details.collidesWith = the colliding tag, constant or block) when the name matches, ignoring case, any tag, constant or block of t…

ParameterTypeDescription
name *stringFB name
plc *stringPLC software name from tia_plcs.name, not the device station name
autoNumberbooleanaccepted for compatibility and ignored: without 'number' the serve picks the number itself
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
groupstringtarget block group
languagestringSCL (default when omitted), LAD, FBD, STL or ProDiag; any case
numberintegerblock number ≥1, used as given (a number another FB holds is refused by TIA); omitted or 0 ⇒ the serve picks the lowest free number from 1 in the FB family (409 block_number_exhausted when none is…

tia_instancedb_create TIA — create instance DB

Creates an instance DB of an FB. Refused with 409 name_collision (details.collidesWith = the colliding tag, constant or block) when the name matches, ignoring case, any tag, constant or block of the PLC. Maps to POST /plcs/{plc}/instancedbs. M-off.

ParameterTypeDescription
instanceOf *stringname of the FB to instantiate from
name *stringinstance DB name
plc *stringPLC software name from tia_plcs.name, not the device station name
autoNumberbooleanaccepted for compatibility and ignored: without 'number' the serve picks the number itself
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
groupstringtarget block group
numberintegerblock number ≥1, used as given (a number another DB holds is refused by TIA); omitted or 0 ⇒ the serve picks the lowest free number from 1 in the DB family (409 block_number_exhausted when none is…

tia_ob_create TIA — create OB by event class

Creates an organization block (OB) of an event class (eventClass is one of the 15 listed). Gd6: put the LOGIC in afterwards via tia_source_put (SCL/STL) or tia_import_xml (LAD/FBD). `number` optional: omitted → the class's base number when free, else the lowest free one in 123..32767 (non-singleton classes only). An explicit number must be one Siemens permits for the class: ProgramCycle 1 or 123+, Startup 100 or 123+, TimeOfDay 10-17 or 123+, TimeDelayInterrupt 20-23 or 123+, CyclicInterrupt 30-38 or 123+, HardwareInterrupt 40-47 or 123+. Singleton classes (Status, Update, Profile, TimeError…

ParameterTypeDescription
eventClass *stringOB event class
name *stringOB name
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
groupstringtarget block group (default: the program-blocks root)
languagestringprogramming language (default SCL)
numberintegerOB number ≥1, permitted for the class (omitted ⇒ chosen from the event class)

tia_block_delete TIA — delete block

Deletes a block. Maps to DELETE /plcs/{plc}/blocks/{block}. M-off.

ParameterTypeDescription
block *stringblock name
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_block_set_attribute TIA — set block attribute

Sets an attribute of a block (e.g., optimized access). Maps to POST /plcs/{plc}/blocks/{block}/attributes. M-off.

ParameterTypeDescription
block *stringblock name
name *stringattribute name
plc *stringPLC software name from tia_plcs.name, not the device station name
value *attribute value
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_block_group_create TIA — create block group

Creates a block group. Maps to POST /plcs/{plc}/blockgroups. M-off.

ParameterTypeDescription
name *stringgroup name
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_block_group_delete TIA — delete block group

Deletes a block group. `group` is a user group name or a '/'-separated path from the program-blocks root (e.g. Motors/Conveyor; sent as ONE encoded path segment); each level matches the exact name first, then ignoring case. A group that holds any block or subgroup (recursively) is refused with 409 group_not_empty (details.blocks and details.groups list everything that would go) unless recursive:true, which deletes them all; an unknown group is 404 not_found. dryRun (Gd11) is answered by the serve (needs an open project): it returns the same blocks/groups list as the plan WITHOUT deleting. Maps…

ParameterTypeDescription
group *stringblock group name or '/'-separated path (e.g., Motors/Conveyor)
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
recursivebooleanconfirm deleting a non-empty group together with every block and subgroup in it

tia_type_group_create TIA — create type group

Creates a type group (UDTs). Maps to POST /plcs/{plc}/typegroups. M-off.

ParameterTypeDescription
name *stringgroup name
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_type_delete TIA — delete type

Deletes a type (UDT). Maps to DELETE /plcs/{plc}/types/{type}. M-off.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
type *stringtype name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_source_put TIA — write/compile SCL source

Writes a block from textual SCL source and (optionally) compiles it. Gd6: use THIS for TEXTUAL language (SCL/STL); for graphical (LAD/FBD/GRAPH) use tia_import_xml. With compile:true, the raw compile DTO is nested under 'compile' (same as tia_compile's response), and 'located[]' plus a nextHint are merged at the TOP LEVEL of the result — same place tia_compile puts them — when the compile regenerated blocks, e.g. an instance DB after an FB interface change. `generatedOrUpdated` lists every block the source created or regenerated (app ≥ v1.6.0; older serves list only new ones) — TIA reg…

ParameterTypeDescription
code *stringSCL source code
name *stringblock/source name
plc *stringPLC software name from tia_plcs.name, not the device station name
compilebooleancompile after generating (default false)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
expectedContentHashstringStale-write guard (optional): the `contentHash` of the object as you last read it (tia_export_block, tia_export_type or tia_type_source; 64 hex characters). `contentHash`, `normalizedSha256` and `sha2…
trackChangesboolean

tia_import_xml TIA — import block (SimaticML XML)

Imports a block in SimaticML XML (the only path for LAD/FBD/GRAPH — Gd6). PREFER `xml` inline (tested up to ~300 KB: 280 KB imported in 1–5 s); use `path` ONLY for a file that is already on the serve host — never copy files to the host to import them. Gd7: author from a real export for the selected target version; no cross-version import matrix is established. V21 import behavior is unchanged (no new version preflight refusal). See tia_guide recipes, 'TIA version evidence and SimaticML'. Import UDTs FIRST (tia_types_import). Returns, per block, type/number/created/interfaceChanged/affect…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
expectedContentHashstringStale-write guard (optional): the `contentHash` of the object as you last read it (tia_export_block, tia_export_type or tia_type_source; 64 hex characters). `contentHash`, `normalizedSha256` and `sha2…
overridebooleanoverwrite if it already exists (default true)
pathstringpath to the .xml on the serve host (alternative to xml)
xmlstringSimaticML XML content (alternative to path)

tia_types_import TIA — import type/UDT (SimaticML XML)

Imports a UDT in SimaticML XML. Use a real export for the selected target; cross-version import compatibility is unverified, and V21 import behavior is unchanged (no new version preflight refusal). See tia_guide recipes, 'TIA version evidence and SimaticML'. Import UDTs BEFORE the blocks that use them (Gd6). Stale-write guard: pass the type's `contentHash` from tia_export_type (or tia_type_source) as `expectedContentHash` and the serve checks it against the type's current export BEFORE importing — a mismatch is 409 state_changed and NOTHING is imported; a match adds `contentGuard` to the res…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
expectedContentHashstringStale-write guard (optional): the `contentHash` of the object as you last read it (tia_export_block, tia_export_type or tia_type_source; 64 hex characters). `contentHash`, `normalizedSha256` and `sha2…
overridebooleanoverwrite if it already exists (default true)
pathstringpath to the .xml on the host (alternative to xml)
trackChangesboolean
xmlstringSimaticML XML content of the UDT (alternative to path)

tia_export_xml TIA — export blocks/types (SimaticML XML)

Exports the PLC's blocks and types to SimaticML XML files in a directory (project-as-code). Maps to POST /plcs/{plc}/export. M-off. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
directory *stringtarget directory on the serve host
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_watchtable_create TIA — create watch table

Creates a watch table. Maps to POST /plcs/{plc}/watchtables. M-off.

ParameterTypeDescription
name *stringwatch table name
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_watchtable_delete TIA — delete watch table

Deletes a watch table. Maps to DELETE /plcs/{plc}/watchtables/{wt}. M-off.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
watchtable *stringwatch table name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_obj_service TIA — acquire service (GetService→handle)

Acquires a service from an object by handle (generic GetService<T>) and returns a service HANDLE, to then invoke methods via tia_obj_invoke. E.g.: PlcMasterSecretConfigurator.Protect — unlocks a bare CPU (offline confidential-data password; generates the certificate). The acquisition itself does NOT mutate the project. Maps to POST /obj/{handle}/service {type}. M-off.

ParameterTypeDescription
handle *stringobject handle (e.g., the CPU's device item)
type *stringservice type name (e.g., Siemens.Engineering.HW.Features.PlcMasterSecretConfigurator)

tia_obj_set_attributes TIA — set attributes (generic)

Sets attributes of any model object by handle. Maps to POST /obj/{handle}/attributes. M-off. Use the handles from the read-only obj tools (M1).

ParameterTypeDescription
attributes *objectname→value map of attributes to set
handle *stringobject handle (from the read-only tia_obj_* tools)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_obj_invoke TIA — invoke method (generic)

Invokes a method of a model object by handle (args coerced to the parameter types; {"$handle":N} passes another object). Maps to POST /obj/{handle}/invoke. M-off. Powerful — combine with tia_obj_info to see the signature. dryRun (Gd11) is answered by the serve (needs an open project): it runs every guard the real call runs (the member policy, the overload and argument checks and, on a Version Control object, the leaf guard: a container argument is 409 vci_not_leaf) and answers {dryRun:true, status:"plan_ok", handle, type, member, parameters} WITHOUT invoking the member; the plan never echoes…

ParameterTypeDescription
handle *stringobject handle
name *stringname of the method to invoke
argsarraypositional arguments (coerced to the parameter types)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_obj_create TIA — create object (generic)

Creates an object in a composition of a parent object by handle. Maps to POST /obj/{handle}/create. M-off. See the creatable types in tia_obj_creationinfos. DeviceUserGroup.Devices creation is refused with 409 unsafe_object_creation before V21 CreateDevices can terminate TIA; use tia_device_create with group instead (app 1.8.1+).

ParameterTypeDescription
composition *stringcomposition name (e.g., 'Blocks')
handle *stringparent object handle
type *stringtype to create (Siemens type)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
parametersobjectconstructor parameters (name→value)

tia_export_block TIA — export one block (SimaticML, inline)

Exports ONE block as SimaticML XML and returns it INLINE with sha256, normalizedSha256 and bytes — no file on the serve host. `contentHash` is the stale-write guard hash: the SHA-256 of this block's export with the DEFAULT options after removing volatile noise (Created, InstalledProducts, formatting tokens, line endings, layout whitespace between tags; whitespace INSIDE text, comments and string values is part of the hash) and renumbering the UIds canonically, so a renumbering by TIA never changes it while a rewiring does; the serve computes it, so it stays the default-options hash even when…

ParameterTypeDescription
block *stringblock name
plc *stringPLC software name from tia_plcs.name, not the device station name
optionsstringExportOptions: None (default), WithDefaults, WithReadOnly (comma-separated)

tia_block_compare TIA — compare a block with given SimaticML

Exports the block from the project and compares it with the SimaticML you pass (e.g. the file committed in git). Like tia_export_block, this may compile an inconsistent block first (export requires consistency), which can regenerate its instance DB; read-mostly, treated as read for agent tool policy. Normalized: ignores BOM, line endings, indentation, blank lines, <Created>, <InstalledProducts> and — unless ignoreFormatting:false — <NewLine/>/<Blank/> formatting tokens (see the result's `ignored` field for the exact list). UIds are renumbered by first appearance across definitions and refe…

ParameterTypeDescription
block *stringblock name
plc *stringPLC software name from tia_plcs.name, not the device station name
xml *stringSimaticML XML to compare against (e.g. the committed file's content)
ignoreFormattingbooleanignore <NewLine/>/<Blank/> code-formatting tokens (default true)
optionsstringExportOptions used for the project side (default None)

tia_block_render TIA — render a block as readable pseudo-SCL (LAD/FBD)

Class R, pure/offline: never calls serve. Pass XML text, not a file path: use the inline xml field of tia_export_block {plc, block}. Renders ONE SimaticML block as readable pseudo-SCL: LAD/FBD contacts, coils, logic boxes, comparators, MOVE/arithmetic, timers, counters, edges and block calls become SCL-like statements; SCL networks are rebuilt from their tokens; STL/GRAPH networks are marked not rendered. A value read by several statements or assigned to several targets is evaluated once: held in an RLO_<UId> temporary (UId of the part producing it) or read back from the first coil that wrote…

ParameterTypeDescription
xml *stringXML text of ONE SimaticML block export, NOT a file path. Get it from the inline xml field of tia_export_block {plc, block}

tia_export_type TIA — export one type/UDT (SimaticML, inline)

Exports ONE user data type (UDT) as SimaticML XML and returns it INLINE with sha256, normalizedSha256 and bytes — hashed exactly like tia_export_block, no file on the serve host. `contentHash` is the stale-write guard hash, defined as in tia_export_block (SHA-256 of the default-options export with volatile noise removed and UIds renumbered canonically; it exists only for a well-formed XML export: otherwise the XML is still returned, `contentHash` is absent and `contentHashError` says why). `contentHash`, `normalizedSha256` and `sha256` are different hash contracts over different normalizatio…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
type *stringtype (UDT) name
optionsstringExportOptions: None (default), WithDefaults, WithReadOnly (comma-separated)

tia_type_source TIA — read one type/UDT as SCL source

Reads the SCL source of ONE user data type (UDT) and returns it INLINE with the sha256 of the code (UTF-8) and bytes. It never compiles: a type that is not consistent is refused with 409 inconsistent (compile the PLC first with tia_compile) and an unknown type with 404 not_found. `contentHash` is the stale-write guard hash of the SimaticML export (default options) of the SAME type, not of this SCL text, so what you read as SCL can be guarded like with like: pass it as `expectedContentHash` to tia_source_put (a TYPE source) or tia_types_import. The `sha256` it returns is the hash of the SCL cod…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
type *stringtype (UDT) name

tia_library_mastercopies TIA — project library master copies

Lists the master copies in the open project's library (names, from every folder). Maps to GET /library/mastercopies. Read-only (class R).

tia_library_mastercopy_create TIA — master copy from a device

Creates a master copy of a DEVICE (station) in the open project's library and returns its name. Only a device is accepted as the source — a PLC block cannot become a master copy through this route. Maps to POST /library/mastercopies {device}. Class M-off. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
device *stringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_device_from_mastercopy TIA — station from a prepared master copy

Requires app ≥ v1.8.0. Creates a new station from a device master copy in the open project's library (name from tia_library_mastercopies), returning {device: actualName}; TIA may rename the copy and its PLC. Known block-only content is refused with 409 mastercopy_not_device; unknown content goes to Openness. Clones an owner-prepared configuration, including PUT/GET, purchased-license selection and OPC UA interface mappings on the validated 1214C V4.4; it is not a setter for an existing CPU and does not grant license entitlement. Certificates are not copied: inspect the new OPC UA item, regen…

ParameterTypeDescription
masterCopy *stringowner-prepared device master copy in the project library
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_library_types TIA — project library types

Lists the types in the open project's library with their versions as {name, ns, guid, status, versions:[{version, state, isDefault, author, modified, guid}]}. Maps to GET /library/types. Read-only (class R).

tia_block_from_mastercopy TIA — instantiate block from master copy

Creates a PLC block from a master copy of the open project's library (name from tia_library_mastercopies) and returns the new block's name. The master copy must hold PLC blocks: one that holds hardware and no block — e.g. a device master copy, the only kind tia_library_mastercopy_create makes — is refused with 409 kind:"mastercopy_not_blocks" by serves after app 1.6.3 (up to 1.6.3: 500 "Copying from the library failed"); other non-block content (a UDT or tag-table copy) still fails inside Openness. Maps to POST /plcs/{plc}/blocks/frommastercopy {masterCopy}. Class M-off.

ParameterTypeDescription
masterCopy *stringmaster copy name (from tia_library_mastercopies)
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_global_libraries TIA — open global libraries

Lists the names of the global libraries open in the TIA Portal session (system libraries included). Maps to GET /globallibraries. Read-only (class R).

tia_global_library_create TIA — create global library

Creates a new global library on disk (directory on the serve host) and opens it in the TIA Portal session; returns its name. Maps to POST /globallibraries {directory, name}. Class M-off. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
directory *stringparent directory on the serve host
name *stringlibrary name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_global_library_open TIA — open global library

Opens a global library file (.alNN on the serve host, e.g. MyLib.al21 — the file inside the library folder) in the TIA Portal session and returns its name; readWrite defaults to true (pass false to open it read-only). Serves after app 1.6.3 refuse an unusable path before TIA, nothing opened: a missing file is 404 kind:"not_found"; a folder, a file that is not .alNN or a malformed path (e.g. with quotes) is 400 kind:"bad_request" (up to 1.6.3: 500 internal). Maps to POST /globallibraries/open {path, readWrite}. Class M-off. Long operation: may answer status:"running" + jobId — then call tia…

ParameterTypeDescription
path *stringlibrary file path on the serve host
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
readWritebooleanopen read-write (default true) or read-only (false)

tia_global_library_save TIA — save global library

Saves an open user global library by name (from tia_global_libraries; exact name first, then ignoring case) and returns its name as {saved}. Serves after app 1.6.3 refuse a name that picks no single open USER library, nothing saved: an unknown name is 404 kind:"not_found"; a system or corporate library (read-only), or a name several user libraries match only ignoring case, is 409 kind:"conflict"; details.userLibraries / systemLibraries / corporateLibraries list the open libraries (up to 1.6.3: 200 {saved:<name>} even when nothing was saved — confirm the name with tia_global_libraries first).…

ParameterTypeDescription
name *stringlibrary name (from tia_global_libraries)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_global_library_close TIA — close global library

Closes an open user global library by name (from tia_global_libraries; exact name first, then ignoring case; unsaved changes are not saved — call tia_global_library_save first) and returns its name as {closed}. Serves after app 1.6.3 refuse a name that picks no single open USER library, nothing closed: an unknown or already-closed name is 404 kind:"not_found"; a system or corporate library (read-only), or a name several user libraries match only ignoring case, is 409 kind:"conflict"; details.userLibraries / systemLibraries / corporateLibraries list the open libraries (up to 1.6.3: 200 {close…

ParameterTypeDescription
name *stringlibrary name (from tia_global_libraries)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_hmis TIA — HMI devices

Lists the HMIs in the open project as {kind, name}: kind "classic" (WinCC Classic HmiTarget) or "unified" (WinCC Unified). Maps to GET /hmi. Read-only (class R).

tia_hmi_screens TIA — HMI screens

Lists the screen names of an HMI (Classic: every screen folder, recursively; Unified: flat). Maps to GET /hmi/{hmi}/screens. Read-only (class R).

ParameterTypeDescription
hmi *stringHMI name (from tia_hmis)

tia_hmi_screen_export TIA — export HMI screen (Classic)

Exports one screen of a CLASSIC WinCC HMI to an XML file on the serve host. WinCC Unified screens have no file export in the V21 API (the serve refuses them). Writes the file only — the project is not changed. Maps to POST /hmi/{hmi}/screens/{screen}/export {path}. Class M-off. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
hmi *stringClassic HMI name (from tia_hmis)
path *stringtarget .xml file path on the serve host
screen *stringscreen name (from tia_hmi_screens)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_hmi_screens_import TIA — import HMI screens (Classic)

Imports the screens of an XML file on the serve host into the root screen folder of a CLASSIC WinCC HMI; a screen with the same name is OVERWRITTEN. WinCC Unified is refused (no file import in the V21 API). Returns the imported screen names. Maps to POST /hmi/{hmi}/screens/import {path}. Class M-off. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
hmi *stringClassic HMI name (from tia_hmis)
path *stringscreen .xml file path on the serve host
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_cax_export TIA — CAx export (AutomationML)

Exports the hardware configuration as CAx / AutomationML (.aml) to a file on the serve host: one device when `device` is given, otherwise the whole project. Writes the file only — the project is not changed. Returns the transfer state, errors, warnings and messages (capped; messagesTruncated); a transfer whose state is Error or that counts any error is an error (500 cax_transfer_failed, those fields in details), and `unreadable` flags an outcome that could not be fully read. Serves up to app 1.6.3 return only an opaque `result` string even when the transfer failed — check the outcome with…

ParameterTypeDescription
file *stringtarget .aml file path on the serve host
devicestringdevice station name from tia_devices.name or tia_plcs.device, not the PLC software name; omit for the whole project
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_cax_import TIA — CAx import (AutomationML)

Imports a CAx / AutomationML (.aml) file on the serve host into the open project's hardware configuration. `option` decides what happens to a device that already exists: RetainTiaDevice (default — keep the project's device), OverwriteTiaDevice (replace it) or MoveToParkingLot. Archive the project first (tia_project_archive) before an overwrite: a failed import may have applied part of the file. Returns the transfer state, errors, warnings and messages (capped; messagesTruncated); a transfer whose state is Error or that counts any error is an error (500 cax_transfer_failed, those fields in de…

ParameterTypeDescription
file *string.aml file path on the serve host
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
optionstringexisting-device handling (default RetainTiaDevice)

tia_project_servers TIA — Project Server connections

Lists the Project Server connections configured in TIA Portal on the serve host as {servers:[{name, host, port}], total}; an empty list is valid (none configured). Reads the local configuration only. Use `name` as `server` in tia_project_server_groups, tia_server_projects and tia_server_project_sessions. Needs a running TIA Portal on the serve host (tia_start) but no open project. Maps to GET /multiuser/servers. Read-only (class R).

tia_project_server_groups TIA — Project Server groups

Lists the project groups of one Project Server as {server, groups:[{name}], total}; `server` is the connection name from tia_project_servers (exact name first, then ignoring case) and comes back resolved. Contacts the Project Server with the Windows user of the serve. An unknown name is 404 not_found (details.available lists the names that work), a name that matches several is 409 ambiguous_name (details.matches), and a Project Server that is unreachable or refuses the Windows user of the serve is 502 project_server_error (details.server, operation, type, message). Needs a running TIA Portal o…

ParameterTypeDescription
server *stringProject Server connection name (from tia_project_servers)

tia_server_projects TIA — Project Server projects and locks

Lists the projects of a Project Server with their lock state: every project of the server, or only those of `group` (matched like `server`). A page is {server, group, projects:[{projectName, serverAlias, lockState:{isLocked, owner, error}}], total, nextCursor}; the lock state is read for the projects of the returned page only, a failed lock read gives isLocked:null with the reason in error instead of failing the call, and owner is null when the project is not locked. For a large server read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is nu…

ParameterTypeDescription
server *stringProject Server connection name (from tia_project_servers)
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
groupstringproject group name (from tia_project_server_groups); omit for every project of the server
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_server_project_sessions TIA — local sessions of a server project

Lists the local sessions that exist for one server project on the serve host, created by the Windows user of the serve, as {server, project, sessions:[{sessionId, projectFile}], total}; projectFile is the session file (.alsNN) or null. Pass projectFile to tia_local_session_open. `project` is the project name from tia_server_projects (exact name first, then ignoring case). An unknown name is 404 not_found (details.available lists the names that work), a name that matches several is 409 ambiguous_name (details.matches), and a Project Server that is unreachable or refuses the Windows user of the…

ParameterTypeDescription
project *stringserver project name (from tia_server_projects)
server *stringProject Server connection name (from tia_project_servers)

tia_local_sessions TIA — local multiuser sessions

Lists the local multiuser sessions open in the TIA Portal of the serve as {sessions:[{index, name, path, handle, isModified, isUpToDate, upToDateError, attributes}], total}; an empty list is valid (single-user project or no session open). `handle` is the object handle of the session's project: read and edit it with tia_obj_get, tia_obj_items and the other tia_obj_* tools. isUpToDate asks the Project Server and is null with upToDateError when that call failed. Use name or path as `session` in the other session tools. Needs a running TIA Portal on the serve host (tia_start) but no open project.…

tia_markings TIA — objects marked for check-in

Lists the objects marked for check-in in a local session as {session:{index, name, path}, conflictedOnly, markings:[{handle, type, name, markState, isUpToDate, isMarkedByMe, isMarkedByOthers}], total, nextCursor}, read in real time from the Project Server. Marking selects objects of YOUR local session for check-in; other users only see them as marked in another local session. conflicted:true lists only the conflicted markings (an object also marked in another local session, or out of date), which must be resolved before check-in. Every object has a `handle` for the tia_obj_* tools. For a large…

ParameterTypeDescription
conflictedbooleantrue = only the conflicted markings; omit or false = every marking
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)
sessionstringname or full path of the open local session (from tia_local_sessions); optional when exactly one session is open

tia_mark_state TIA — mark state of objects

Reads the mark state of objects of a local session as {session:{index, name, path}, objects:[{handle, type, name, isMarkable, markState, isUpToDate, isMarkedByMe, isMarkedByOthers}]}. markState is the flags text (for example "IsUptoDate, IsMarkedByMe") and the three booleans are its flags; an object with isMarkable:false cannot be marked. Object handles (positive integers) come from the `handle` fields of tia_local_sessions and tia_markings or from the tia_obj_* tools on the session's project; they die with the session. Missing handles is 400 missing_param, malformed or more than 200 is 400 ba…

ParameterTypeDescription
handles *array1 to 200 object handles (positive integers) of objects of the local session
sessionstringname or full path of the open local session (from tia_local_sessions); optional when exactly one session is open

tia_local_session_open TIA — open a local session

Opens a local multiuser session (a .alsNN file on the serve host, for example the projectFile of tia_server_project_sessions) in the TIA Portal of the serve. The portal MUST hold NO open project and no other session: start it without a project (tia_start, not tia_connect). Do NOT call tia_connect first: it opens a project, and an open project is refused with 409 project_open (details.openProjects). No portal running is 409 not_connected: start one with tia_start, never with tia_connect. A different session already open is 409 session_open (details.openSessions); nothing is ever closed to make…

ParameterTypeDescription
path *stringlocal session file path (.alsNN) on the serve host
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_local_session_save TIA — save a local session

Saves the changes of a local session in the session itself with LocalSession.Save(); it never checks in to the Project Server. Only a multiuser or an exclusive session can be saved: a server-project session is refused with 409 save_not_supported and nothing is changed. Returns {saved:true, session:{index, name, path, ...}}. `session` is the name or the full path of an open local session (as listed by tia_local_sessions; the project path first, then the project name ignoring case) and may be left out when exactly one session is open: none open is 409 no_local_session, several open without `sess…

ParameterTypeDescription
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
sessionstringname or full path of the open local session (from tia_local_sessions); optional when exactly one session is open

tia_local_session_close TIA — close a local session

Closes a local session; it NEVER checks in to the Project Server. Closing discards every pending change of the session, so a session with unsaved changes (or whose modified state cannot be read) is refused with 409 unsaved_changes (details.session, details.path) until the call chooses: save:true saves it first (multiuser or exclusive sessions only; otherwise 409 save_not_supported and nothing is closed) or discard:true drops the changes; both together are 400 bad_request. Every object handle of the session dies with it. Returns {closed:true, action, session} with action close, save_then_close…

ParameterTypeDescription
discardbooleanclose it and drop its pending changes; never together with save
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
savebooleansave the session before closing it (multiuser or exclusive sessions only)
sessionstringname or full path of the open local session (from tia_local_sessions); optional when exactly one session is open

tia_objects_mark TIA — mark objects for check-in

Marks objects of a local session for check-in. Marking selects objects of YOUR session: it does not lock them for others, who only see them as marked in another local session, and an object another session also marked is a conflict to resolve before check-in. Object handles (positive integers) come from the `handle` fields of tia_local_sessions and tia_markings or from the tia_obj_* tools on the session's project; they die with the session. 1 to 200 distinct handles. Refused, nothing changed: an object that is not markable is 409 not_markable (details.objects); an object another session marked…

ParameterTypeDescription
handles *array1 to 200 object handles (positive integers) of objects of the local session
allowConflictbooleandefault false; true marks an object another local session also marked and reports it in conflicts (only if the human wants a conflict)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
sessionstringname or full path of the open local session (from tia_local_sessions); optional when exactly one session is open

tia_objects_unmark TIA — unmark objects

Removes the mark for check-in that THIS session put on objects (handles as in tia_objects_mark, for example from tia_markings or the tia_obj_* tools); the mark of other sessions is never touched, so it is never refused because of other users. An object this session did not mark is skipped (not_marked); with nothing to apply the answer is 200 with applied:[]. Returns {action, session, applied, skipped, states}. Refusals: no_local_session, ambiguous_session, 404 not_found for an unresolvable handle. `session` is the name or the full path of an open local session (as listed by tia_local_sessions;…

ParameterTypeDescription
handles *array1 to 200 object handles (positive integers) of objects of the local session
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
sessionstringname or full path of the open local session (from tia_local_sessions); optional when exactly one session is open

tia_hmi_tag_tables TIA — HMI Unified tag tables

Lists the tag tables of a WinCC Unified HMI as {hmi, tagTables:[{name, group, tagCount}], total, nextCursor, inventoryGaps}; group is the "/"-joined path of the tag table group (null at the root) and tagCount the number of tags in the table. Use it before creating or deleting a tag table and to find the table a tag lives in (tia_hmi_tags takes it as `table`). For a large HMI read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is null; total is the number of tag tables of the whole list. Without limit and cursor the whole list is returned with…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_hmi_tags TIA — HMI Unified tags

Lists the tags of a WinCC Unified HMI as {hmi, table, tags:[{name, table, tagType, dataType, connection, plcName, plcTag, address, accessMode, acquisitionMode, acquisitionCycle}], total, nextCursor, inventoryGaps}, every value text or null. Use it to see what exists before creating, updating or deleting a tag or an alarm. An internal tag has connection, plcName, plcTag, address, accessMode, acquisitionMode and acquisitionCycle all null (TIA reads its connection back as a placeholder such as <Internal tag>, which the serve answers as null); an external tag names its connection and the PLC tag o…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)
tablestringonly the tags of this tag table (from tia_hmi_tag_tables); omit for every table

tia_hmi_connections TIA — HMI Unified connections

Lists the connections of a WinCC Unified HMI as {hmi, connections:[{name, communicationDriver, station, partner, node, initialAddress, disabledAtStartup, comment, plc}], total, nextCursor, inventoryGaps}; `plc` is the name of the one PLC the partner resolves to, or null when none or several match. Use it before creating an external tag: the connection must exist and plc says whether plcName can be left out. For a large HMI read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is null; total is the number of connections of the whole list. Withou…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_hmi_alarms TIA — HMI Unified alarms

Lists the alarms of a WinCC Unified HMI as {hmi, kind, alarms:[{kind, name, alarmClass, priority, triggerTag, triggerBit, triggerBitAddress, triggerMode, condition, conditionValue, triggerAddress, eventText}], total, nextCursor, inventoryGaps}. Discrete alarms come first, then analog ones; a discrete alarm fills triggerBit, triggerBitAddress and triggerMode, an analog one fills condition, conditionValue and triggerAddress, and the fields of the other kind are null. eventText is {culture name: plain text or null} for every active project language: TIA stores the text as rich text and the serve…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
kindstringonly discrete or only analog alarms; omit for both
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_hmi_alarm_classes TIA — HMI Unified alarm classes

Lists the alarm classes of a WinCC Unified HMI as {hmi, alarmClasses:[{name, id, priority, stateMachine, log, isSystem, commonAlarmClass}], total, nextCursor, inventoryGaps}; commonAlarmClass is null when TIA reports a placeholder such as <No alarm class> instead of a class. Use it before creating or updating an alarm: its alarmClass must be one of these names. For a large HMI read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is null; total is the number of alarm classes of the whole list. Without limit and cursor the whole list is returned…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_hmi_screen_items TIA — HMI Unified screen items

Lists the items of ONE screen of a WinCC Unified HMI as {hmi, screen, screenNumber, width, height, items:[{name, type, visible, enabled, left, top, width, height}], total, nextCursor, inventoryGaps}; type is the item class (HmiButton, HmiIOField, ...) and the layout values are null for a type that does not offer them. Items are flat: the V21 API exposes no nested items. Use it to inspect a screen (screen names come from tia_hmi_screens); an unknown screen is 404 not_found. For a large HMI read it in pages: pass limit (1-1000), then pass the nextCursor of each page as cursor until nextCursor is…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
screen *stringscreen name, as listed by tia_hmi_screens
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_hmi_validate TIA — validate a HMI Unified

Runs the validation of every tag, alarm, connection and screen (with its items) of a WinCC Unified HMI, as far as the scope selects, and lists what it reports as {hmi, scope, checked:{tags, alarms, connections, screens, screenItems}, errors, warnings, findings:[{objectKind, object, property, errors, warnings}], total, nextCursor, inventoryGaps}. This is NOT a compile: the V21 API has none for Unified, so no result says the HMI compiles, and `checked` counts the objects that were validated (0 for a scope not selected). Use it after tag or alarm writes, which do not scan screens, scripts or logg…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)
scopestringwhat to validate: all (default), tags, alarms, connections or screens

tia_hmi_tag_table_create TIA — create HMI Unified tag table

Creates a tag table in a WinCC Unified HMI. Refused, nothing changed: 400 invalid_name (details.kind, name, rule) for a blank, over-long or malformed name, 409 name_collision (details.existing) for a used name. The result is {hmi, tagTable, created:true, postcheck}. dryRun (Gd11) is answered by the serve: it runs every guard the real write runs and answers {dryRun:true, status:"plan_ok", hmi, ...} with no `postcheck`, changing nothing. A real write answers the re-read values and a `postcheck` {verified:true, requested, actual}; a mismatch is 409 postcheck_failed (details.mismatches, details.ro…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
name *stringtag table name: letters, digits, underscores, spaces and hyphens, at most 128 characters, no trailing space; unique among all tag tables, ignoring case
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_hmi_tag_table_delete TIA — delete HMI Unified tag table

Deletes a tag table of a WinCC Unified HMI. Refused, nothing changed: 404 not_found, 409 default_tag_table for the default table, 409 tag_table_not_empty (details.tags) while it holds tags unless recursive:true, which deletes its tags with it, and 409 tag_in_use (details.references) when an alarm references any of those tags. Screens, scripts and logging that use the tags are NOT scanned: run tia_hmi_validate afterwards. A recursive delete that stops part-way is 409 tag_table_delete_incomplete: the project IS partially changed (the tags already removed stay removed), so re-read with tia_hmi_ta…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
table *stringtag table name, as listed by tia_hmi_tag_tables
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
recursivebooleanconfirm deleting a table that still holds tags: every tag in it is deleted with the table

tia_hmi_tag_create TIA — create HMI Unified tag

Creates a tag in a WinCC Unified HMI, in `table` or the default tag table. A tag WITHOUT `connection` is internal: dataType is required and plcName, plcTag, address, accessMode, acquisitionMode and acquisitionCycle are refused (400 bad_request). A tag WITH `connection` is external: the connection must exist (409 reference_not_found; tia_hmi_connections lists them), exactly one of plcTag or address is given, and dataType is optional. The PLC of a plcTag is plcName, else the one PLC the connection's partner resolves to (none or several: 409 plc_unresolved). A plcTag is a PLC tag or a data block…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
name *stringtag name: a letter or underscore, then letters, digits or underscores, at most 128 characters; unique across every tag table and the system tags, ignoring case
accessModestringexternal tags only: SymbolicAccess or AbsoluteAccess; defaults from whether plcTag or address was given and must agree with it
acquisitionCyclestringexternal tags only: the acquisition cycle as text, only with CyclicOnUse or CyclicContinuous
acquisitionModestringexternal tags only: OnDemand, CyclicOnUse or CyclicContinuous
addressstringexternal tags only: the absolute address of the value in the PLC; give this or plcTag, never both
connectionstringHMI connection name (from tia_hmi_connections) that makes the tag external; omit for an internal tag
dataTypestringtag data type, one of Bool, Byte, Char, DInt, DWord, Int, LInt, LReal, LWord, Real, SInt, String, UDInt, UInt, ULInt, USInt, Word, WChar, WString, DateTime or Time; anything else is 400 invalid_data_t…
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
plcNamestringexternal tags only: the PLC the plcTag belongs to; omit when the connection's partner resolves to exactly one PLC
plcTagstringexternal tags only: a PLC tag name, or a DB.Member path to a real member for symbolic access (struct and UDT members, array indices literal and in bounds); give this or address, never both. A PLC tag…
tablestringtag table to create it in (from tia_hmi_tag_tables); omit for the default tag table

tia_hmi_tag_update TIA — update HMI Unified tag

Updates ONE tag of a WinCC Unified HMI: only the fields passed change (none passed: 400 missing_param). The rules of a create apply to what it changes and to what those changes interact with; the references it carries unchanged are not re-audited: tia_hmi_validate finds dangling ones. Moving a tag to another tag table is not supported. A tag WITHOUT `connection` is internal: dataType is required and plcName, plcTag, address, accessMode, acquisitionMode and acquisitionCycle are refused (400 bad_request). A tag WITH `connection` is external: the connection must exist (409 reference_not_found; ti…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
tag *stringtag name, as listed by tia_hmi_tags
accessModestringexternal tags only: SymbolicAccess or AbsoluteAccess; defaults from whether plcTag or address was given and must agree with it
acquisitionCyclestringexternal tags only: the acquisition cycle as text, only with CyclicOnUse or CyclicContinuous
acquisitionModestringexternal tags only: OnDemand, CyclicOnUse or CyclicContinuous
addressstringexternal tags only: the absolute address of the value in the PLC; give this or plcTag, never both
connectionstringHMI connection name (from tia_hmi_connections) that makes the tag external; omit for an internal tag
dataTypestringtag data type, one of Bool, Byte, Char, DInt, DWord, Int, LInt, LReal, LWord, Real, SInt, String, UDInt, UInt, ULInt, USInt, Word, WChar, WString, DateTime or Time; anything else is 400 invalid_data_t…
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
namestringnew tag name (rename), with the same rules as a create
plcNamestringexternal tags only: the PLC the plcTag belongs to; omit when the connection's partner resolves to exactly one PLC
plcTagstringexternal tags only: a PLC tag name, or a DB.Member path to a real member for symbolic access (struct and UDT members, array indices literal and in bounds); give this or address, never both. A PLC tag…

tia_hmi_tag_delete TIA — delete HMI Unified tag

Deletes a tag of a WinCC Unified HMI. Refused, nothing changed: 404 not_found and 409 tag_in_use (details.references) when an alarm references the tag. Screens, scripts and logging that use the tag are NOT scanned: run tia_hmi_validate afterwards. dryRun (Gd11) is answered by the serve: it runs every guard the real write runs and answers {dryRun:true, status:"plan_ok", hmi, ...} with no `postcheck`, changing nothing. A real write answers the re-read values and a `postcheck` {verified:true, requested, actual}; a mismatch is 409 postcheck_failed (details.mismatches, details.rollback: restored, n…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
tag *stringtag name, as listed by tia_hmi_tags
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_hmi_alarm_create TIA — create HMI Unified alarm

Creates a discrete or analog alarm in a WinCC Unified HMI. Needs name, alarmClass and triggerTag, plus triggerBit (discrete) or condition and conditionValue (analog). alarmClass and triggerTag must exist, else 409 reference_not_found. A discrete alarm raises on a bit of the trigger tag: triggerBit (required on create) and triggerMode; a tag that is not bit-addressable is 409 tag_type_mismatch, a bit past the width 409 trigger_bit_out_of_range (details.tag, dataType, bit, max). An analog alarm compares a numeric trigger tag with ONE conditionValue (there is no second limit) under a condition; t…

ParameterTypeDescription
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
kind *stringdiscrete (raised by a bit of a tag) or analog (raised by comparing a numeric tag with a value)
name *stringalarm name: a letter or underscore, then letters, digits or underscores, at most 128 characters; unique across discrete and analog alarms, ignoring case
alarmClassstringalarm class name (from tia_hmi_alarm_classes)
conditionstringanalog alarms only: LowerLimit, UpperLimit, Equal, NotEqual, LowerLimitOrEqual or UpperLimitOrEqual
conditionValuestring | numberanalog alarms only: the value the condition compares the trigger tag with, a number or numeric text that fits the tag's data type; whole numbers of 2^53 or more must be strings (a number that large is…
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
eventTextobjectevent text per language as { "<culture name>": "text" }; every culture must be an active project language (tia_project_languages); plain single-paragraph text without markup (the serve wraps it as the…
priorityintegeralarm priority, an integer from 0 to 255 (the serve refuses anything else)
triggerBitintegerdiscrete alarms only: the bit of the trigger tag that raises the alarm, from 0 to its bit width minus 1
triggerModestringdiscrete alarms only: OnRisingEdge or OnFallingEdge
triggerTagstringname of the tag that triggers the alarm (from tia_hmi_tags)

tia_hmi_alarm_update TIA — update HMI Unified alarm

Updates ONE alarm of a WinCC Unified HMI: only the fields passed change (none passed: 400 missing_param). The rules of a create apply to what it changes and to what those changes interact with; the references it carries unchanged are not re-audited: tia_hmi_validate finds dangling ones. alarmClass and triggerTag must exist, else 409 reference_not_found. A discrete alarm raises on a bit of the trigger tag: triggerBit (required on create) and triggerMode; a tag that is not bit-addressable is 409 tag_type_mismatch, a bit past the width 409 trigger_bit_out_of_range (details.tag, dataType, bit, max…

ParameterTypeDescription
alarm *stringalarm name, as listed by tia_hmi_alarms
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
kind *stringdiscrete (raised by a bit of a tag) or analog (raised by comparing a numeric tag with a value)
alarmClassstringalarm class name (from tia_hmi_alarm_classes)
conditionstringanalog alarms only: LowerLimit, UpperLimit, Equal, NotEqual, LowerLimitOrEqual or UpperLimitOrEqual
conditionValuestring | numberanalog alarms only: the value the condition compares the trigger tag with, a number or numeric text that fits the tag's data type; whole numbers of 2^53 or more must be strings (a number that large is…
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
eventTextobjectevent text per language as { "<culture name>": "text" }; every culture must be an active project language (tia_project_languages); plain single-paragraph text without markup (the serve wraps it as the…
namestringnew alarm name (rename), with the same rules as a create
priorityintegeralarm priority, an integer from 0 to 255 (the serve refuses anything else)
triggerBitintegerdiscrete alarms only: the bit of the trigger tag that raises the alarm, from 0 to its bit width minus 1
triggerModestringdiscrete alarms only: OnRisingEdge or OnFallingEdge
triggerTagstringname of the tag that triggers the alarm (from tia_hmi_tags)

tia_hmi_alarm_delete TIA — delete HMI Unified alarm

Deletes a discrete or analog alarm of a WinCC Unified HMI; an unknown alarm is 404 not_found, nothing changed. dryRun (Gd11) is answered by the serve: it runs every guard the real write runs and answers {dryRun:true, status:"plan_ok", hmi, ...} with no `postcheck`, changing nothing. A real write answers the re-read values and a `postcheck` {verified:true, requested, actual}; a mismatch is 409 postcheck_failed (details.mismatches, details.rollback: restored, not_restored or not_attempted): re-read before anything else. Needs an open project and a WinCC Unified HMI (hmi = its name from tia_hmis,…

ParameterTypeDescription
alarm *stringalarm name, as listed by tia_hmi_alarms
hmi *stringHMI name, as listed by tia_hmis (a WinCC Unified HMI)
kind *stringdiscrete (raised by a bit of a tag) or analog (raised by comparing a numeric tag with a value)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_vci_workspaces TIA — VCI workspaces

Lists the Version Control Interface (VCI) workspaces of the open project, sorted by name: {name, group, rootPath, mappedObjects}. group is "" for the system group and a path such as G1/G2 for a workspace of a user group (nested groups are included). A workspace is a folder on the serve host that mirrors project objects as files, so that an external tool can version them. rootPath is null when the workspace has no root folder configured (tia_vci_status then answers 409 workspace_unconfigured); mappedObjects counts every mapped object of any kind. Only leaf objects (PLC blocks, PLC data types an…

tia_vci_status TIA — VCI workspace status

Compares every object mapped in a VCI workspace with its file and returns, per object, its state: equal, projectChanged, workspaceChanged, conflict (both changed), workspaceFileMissing, unknown, unequal, statusFailed or unsupported. Use it to verify what tia_vci_export wrote and to see what tia_vci_import would overwrite. Only leaf objects (PLC blocks, PLC data types and tag tables) are compared: any other mapped object is listed as unsupported and is never passed to VCI. unsupported, statusFailed and unknown rows, and coverage.complete:false, mean NOT verified: claim nothing about those objec…

ParameterTypeDescription
workspace *stringworkspace name, as listed by tia_vci_workspaces (the serve matches the exact name first, then ignoring case; a name that several workspace groups share is 409 workspace_ambiguous, details name and gro…
cursorstringthe nextCursor of the previous page, passed back exactly as received; it is opaque, so never invent, build or edit one (omit it for the first page, and omit both limit and cursor for the whole list)
limitintegerpage size, an integer from 1 to 1000; pass it to read the list in pages (omit both limit and cursor for the whole list)

tia_vci_workspace_create TIA — create a VCI workspace

Creates a VCI workspace (a folder on the serve host that mirrors project objects as files) or reuses it: the same name with the same root answers status reused with the EXISTING workspace's root and writes nothing to TIA. It always creates in the system group, and the serve creates the root folder when it is missing (createdDirectory). rootPath must be an absolute local drive path such as C:\TIA\_scratch\ws; a UNC, device or relative path, a . or .. segment or a reserved name is 400 invalid_workspace_path. Refusals, each with nothing changed: 409 workspace_exists (the name exists, in any group…

ParameterTypeDescription
name *stringworkspace name (at most 128 characters, none of < > : " / \ | ? *)
rootPath *stringabsolute local drive path of the root folder on the serve host, for example C:\TIA\_scratch\ws
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_vci_export TIA — export objects to a VCI workspace

Writes 1 to 50 project objects {plc?, kind, name, format?} to the files of a VCI workspace. Only leaf objects are accepted: PLC blocks, PLC data types and tag tables; any other object is refused with 409 vci_not_leaf before VCI is called, nothing changed. An object that is not mapped yet is exported to a new file in the format you chose (action export); an already mapped object keeps its mapping's folder, file and format (a format you pass is not validated for it) and, when its status is not equal, is synchronized: its workspace file is OVERWRITTEN with the project content (action synchronize)…

ParameterTypeDescription
objects *array1 to 50 distinct objects to export; more than 50 is 400 batch_too_large and nothing runs. A new object's target folder is created when it is missing, and a dryRun lists willCreateDirectory per object
workspace *stringworkspace name, as listed by tia_vci_workspaces (the serve matches the exact name first, then ignoring case; a name that several workspace groups share is 409 workspace_ambiguous, details name and gro…
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_vci_import TIA — import objects from a VCI workspace

Imports objects from a VCI workspace's files into the project: it OVERWRITES each project object with its workspace file; there is no undo. Only leaf objects are accepted: PLC blocks, PLC data types and tag tables; any other object is refused with 409 vci_not_leaf before VCI is called, nothing changed. The object must be mapped (409 not_mapped) and its file must exist (409 workspace_file_missing); 409 vci_mapping_outside_workspace: a mapping outside the root is refused before any write (details plc, kind, name, directory, root). An equal object is skipped (action skip, nothing written); the dr…

ParameterTypeDescription
objects *array1 to 50 distinct objects to import; more than 50 is 400 batch_too_large and nothing runs
workspace *stringworkspace name, as listed by tia_vci_workspaces (the serve matches the exact name first, then ignoring case; a name that several workspace groups share is 409 workspace_ambiguous, details name and gro…
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_export_sd TIA — export one block or type (SIMATIC SD, inline)

Exports ONE block (OB, FB, FC, DB) or PLC data type as SIMATIC SD text, INLINE: `s7dcl` (the code; LAD/FBD as NETWORK ... RUNG text) and `s7res` (YAML texts; null when TIA wrote none) with byte counts, state, messages and `contentHash`: the SAME stale-write hash tia_export_block and tia_export_type return (null with contentHashError when the block is not consistent or the object changed while it was exported: read it again), to pass as expectedContentHash to tia_import_sd; it is not a hash of this text, never substitute another hash. TIA V20+ (types V21+). Never compiles or changes the project…

ParameterTypeDescription
kind *stringblock (OB, FB, FC, global or instance DB) or type (a PLC data type)
name *stringblock or type name
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_import_sd TIA — create or replace one block or type from SIMATIC SD text

Creates or REPLACES ONE block or PLC data type from SIMATIC SD text (`s7dcl`, plus `s7res` YAML texts). The only way to create a block or type from SD text (the VCI tools update mapped objects only). An existing object is replaced where it lives; a new one goes to the root group or to `group` (an existing user group, '/'-separated; 404 not_found if missing). No undo. The text must declare exactly the object named by kind and name (400 sd_declaration_mismatch). OBs: an existing OB of ANY event class is refused (409 sd_existing_ob_unsupported): TIA gives every OB imported from SD a new number (a…

ParameterTypeDescription
kind *stringblock (OB, FB, FC, global or instance DB) or type (a PLC data type)
name *stringname of the block or type the text declares
plc *stringPLC software name from tia_plcs.name, not the device station name
s7dcl *stringthe text of the .s7dcl file (LF or CRLF; the serve writes it as UTF-8 with BOM and CRLF)
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
expectedContentHashstringStale-write guard (optional): the `contentHash` of the object as you last read it (64 hex characters). The serve verifies it before writing, in a dryRun too. Omit it when creating a new object.
groupstringuser group for an object that does not exist yet ('/'-separated); omit for the root; for an existing object omit it or name the group it lives in
s7resstringthe text of the .s7res file (YAML multilingual texts); omit when the object has none

tia_certificates TIA — CPU certificates

Lists the certificates in the CPU's local certificate store as {id, subject, validUntil, hasPrivateKey}. A CPU or firmware without a local certificate manager is refused (409). Maps to GET /plcs/{plc}/certificates. Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_certificate_template TIA — certificate template

Reads the CPU's certificate template for a usage (default Tls): subject, usage, signature, validFrom, validUntil. A CPU without a local certificate manager is refused (409). Maps to GET /plcs/{plc}/certificates/template?usage=<usage>. Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
usagestringcertificate usage (default Tls)

tia_certificate_import TIA — import certificate (GATE G6 password)

Imports a certificate file on the serve host into the CPU's local certificate store and returns {id, subject}. A password-protected file (PKCS#12 with its private key) needs `password`: GATE G6 — it comes from a HUMAN, never invented or guessed; the dryRun plan shows it as [redacted]. The password travels to the serve over plain HTTP — keep the serve on this host or a trusted network. Offline change: it reaches the CPU only with a later compile + download. Maps to POST /plcs/{plc}/certificates/import {path, password?}. Class M-off.

ParameterTypeDescription
path *stringcertificate file path on the serve host
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
passwordstringG6: the file's password provided by a HUMAN, never invented

tia_certificate_export TIA — export certificate

Exports one certificate of the CPU's local store (id from tia_certificates) to a file on the serve host. Writes the file only — the project is not changed. Maps to POST /plcs/{plc}/certificates/{id}/export {path}. Class M-off.

ParameterTypeDescription
id *integercertificate id (from tia_certificates)
path *stringtarget file path on the serve host
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_certificate_delete TIA — delete certificate

Deletes one certificate (id from tia_certificates) from the CPU's local store in the project. Offline change: the CPU keeps its certificate until a later compile + download. Maps to DELETE /plcs/{plc}/certificates/{id}. Class M-off.

ParameterTypeDescription
id *integercertificate id (from tia_certificates)
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_password_policy TIA — CPU password policy

Reads the CPU's password policy: `modern` {enabled} and `legacy` {enabled, minLength, minNumeric, minSpecial, requiresMixedCase} — each null when the CPU does not expose that service. Maps to GET /plcs/{plc}/passwordpolicy. Read-only (class R).

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_password_policy_set TIA — set CPU password policy (GATE G6)

Changes the CPU's password policy in the project. GATE G6: the values are the site's security decision — take them from a HUMAN, never choose them yourself. Only the fields you pass change; pass at least one. The length and complexity fields live in the legacy policy service: on a CPU that exposes only the modern service just `enabled` applies — the result then lists the dropped fields in `ignoredFields`. A CPU with neither service is refused (409). Offline change: it reaches the CPU only with a later compile + download. Maps to POST /plcs/{plc}/passwordpolicy. Class M-off.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
enabledbooleanG6 (human decision): enforce the password policy
minLengthintegerG6 (human decision): minimum password length
minNumericintegerG6 (human decision): minimum number of digits
minSpecialintegerG6 (human decision): minimum number of special characters
requiresMixedCasebooleanG6 (human decision): require lower- and upper-case letters

tia_block_protect TIA — protect/unprotect block (GATE G6)

Sets know-how protection on a PLC block with a password (protect:true, the default) or removes it (protect:false, with the same password). GATE G6: the password comes from a HUMAN — never invented, guessed or reused; a password nobody knows locks the block for good. Never retry a rejected password with a guess: after one rejected unprotect, TIA has refused even the correct password for the rest of the session. The dryRun plan shows the password as [redacted]. The password travels to the serve over plain HTTP — keep the serve on this host or a trusted network. Maps to POST /plcs/{plc}/block…

ParameterTypeDescription
block *stringblock name
password *stringG6: the know-how password provided by a HUMAN, never invented
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project
protectbooleantrue = protect (default), false = remove the protection

tia_compile TIA — compile (verifier)

Compiles the PLC and returns the message tree + a verification summary (Gd8: only ERROR blocks, warnings don't) and nextHints. This is the offline VERIFIER: a clean compile is a precondition (Gd9) for download/S7. Maps to POST /plcs/{plc}/compile. M-off. Long operation: may answer status:"running" + jobId — then call tia_job_status.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_block_compile TIA — compile one block

Compiles ONE block (not the whole PLC) and returns the same message tree, Gd8 verification summary (only ERROR blocks, warnings don't), located[] and nextHints as tia_compile. A clean block compile is NOT the Gd9 precondition for download/S7: run tia_compile for the whole PLC before that. 404 not_found when the block does not exist. dryRun (Gd11) is answered by the serve (needs an open project): it resolves the block and returns the plan {block, blockType, isConsistent} WITHOUT compiling. Maps to POST /plcs/{plc}/blocks/{block}/compile. M-off. Long operation: may answer status:"running" + jobI…

ParameterTypeDescription
block *stringblock name
plc *stringPLC software name from tia_plcs.name, not the device station name
dryRunbooleanGd11: plan-without-applying — validates the guards and describes the action WITHOUT mutating the project

tia_download TIA — download to the PLC (GATE G3)

Downloads hardware/software to the PHYSICAL CPU (STOPS and RESTARTS the CPU). GATE G3: does NOT download without human approval. dryRun:true asks serve for a VERIFIED plan (clean compile, PG/PC interface found, software fingerprint) and returns a single-use planHash that expires (TIA_PLAN_TTL_MS, default 15 min). After a human approves that plan, call with approved:true and the SAME planHash; serve re-checks the fingerprint inside the download and refuses (plan_stale) if the project changed. Pick connectionMode/pcInterfaceName/targetInterfaceName with tia_pg_interfaces (no scan). The serve als…

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
allowUpgradeTargetDevicebooleanconfirm TIA's 'upgrade the target device' check (default false). Part of the approved plan — changing it needs a new dryRun + approval
approvedbooleanG3: only true after explicit HUMAN APPROVAL
connectionModestringconnection mode (e.g., "PN/IE") — TIA's LOCALIZED name
dryRunbooleanGd11: returns the plan + planHash WITHOUT downloading
hardwarebooleandownload hardware (default false)
pcInterfaceNamestringPG/PC adapter (localized name)
pcInterfaceNumberintegeradapter number (default 1)
planHashstringG3: the single-use approval token returned by dryRun (issued only by this MCP process; expires)
softwarebooleandownload software (default true)
targetInterfaceNamestringtarget CPU interface (e.g., "1 X1")

tia_upload TIA — station upload (GATE G4)

Station upload (GATE G4): goes ONLINE to the PHYSICAL CPU at `ip` and reads its hardware configuration and program into the OPEN project as a new station — it reads the CPU and does not write or stop it (observed on hardware: the CPU stayed in RUN). Back up into a dedicated EMPTY project, never the working project (skill tia-backup). Without confirm it asks serve for an upload plan (PG/PC interface resolved, the open project's path and devices — no network access) and returns a single-use planHash bound to that project; after a human confirms, call again with confirm:true and that planHash…

ParameterTypeDescription
ip *stringIPv4 of the PHYSICAL CPU
confirmbooleanG4: true only after explicit HUMAN confirmation
connectionModestringconnection mode (e.g., "PN/IE") — TIA's LOCALIZED name
passwordstringG6: the CPU read-access password provided by a HUMAN, never invented
pcInterfaceNamestringPG/PC adapter (localized name)
pcInterfaceNumberintegeradapter number (default 1)
planHashstringG4: the single-use approval token returned by the unconfirmed call (issued only by this MCP process; expires)

tia_connection_create TIA — create S7 connection

Creates an S7 connection between two devices. Guard G2: requires ≥2 CONSISTENT CPUs (compile clean) — a bare CPU fails. On error, the envelope's 'details' carries the diagnostic (or use tia_connections_diagnose). Maps to POST /connections. M-off.

ParameterTypeDescription
localDevice *stringlocal device station name from tia_devices.name or tia_plcs.device, not the PLC software name
partnerDevice *stringpartner device station name from tia_devices.name or tia_plcs.device, not the PLC software name

tia_online TIA — go online (GATE G4)

Connects ONLINE to the physical PLC. GATE G4: pass confirm:true (after a human confirms it's safe to connect to the target machine); without it, returns a handoff. The confirm:true call must repeat the SAME connectionMode, pcInterfaceName, pcInterfaceNumber and targetInterfaceName as the approved plan: without connectionMode or pcInterfaceName it is refused (connection_fields_required) and nothing is sent. Maps to POST /plcs/{plc}/online.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
confirmbooleanG4: true after human confirmation
connectionModestringconnection mode (localized)
pcInterfaceNamestringPG/PC adapter (localized)
pcInterfaceNumberintegeradapter number (default 1)
targetInterfaceNamestringtarget CPU interface

tia_offline TIA — go offline

Disconnects the PLC from online mode. Maps to POST /plcs/{plc}/offline.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_online_state TIA — online state

Reads the PLC's online state (online/offline). Read-only (class R). Maps to GET /plcs/{plc}/online/state.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_accessible_devices TIA — accessible devices (GATE G7)

Scans the network via the PG/PC adapter and lists accessible devices — to see which devices answer on the network — to discover mode/adapter/interface names WITHOUT a scan, use tia_pg_interfaces. GATE G7 (net scan): pass confirm:true. Maps to POST /plcs/{plc}/online/accessibledevices.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name
confirmbooleanG7: true after human confirmation
connectionModestringconnection mode (localized)
pcInterfaceNamestringPG/PC adapter (localized)
pcInterfaceNumberintegeradapter number (default 1)

tia_mastersecret_set TIA — set master secret (GATE G6)

Sets the master secret (password) of a protected CPU, before online/download. GATE G6: the password comes from a HUMAN (or a credential vault) — the AI NEVER makes it up. (Note: P3.7 questions sending the secret over HTTP in plain text; prefer local entry on the host.) Maps to POST /plcs/{plc}/online/mastersecret.

ParameterTypeDescription
password *stringmaster secret provided by a human (NEVER made up by the AI)
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_mastersecret_reset TIA — reset master secret

Removes/resets the CPU's master secret. Maps to DELETE /plcs/{plc}/online/mastersecret.

ParameterTypeDescription
plc *stringPLC software name from tia_plcs.name, not the device station name

tia_spec_validate TIA — validate project-spec (deterministic, R)

Validates a project-spec (docs/TIA-BEST-PRACTICES §13.2) deterministically, WITHOUT touching serve (rung 0): R-NAMES (unique names), R-TYPEID (OrderNumber:<MLFB>/V<fw>), R-SUBNET (IP∈CIDR, same subnet, 1 IO-system), R-LANGFAM (STL/GRAPH S7-1500 only), R-MODLIMIT, and G5 (safety.required && autonomous ⇒ REJECT). Returns { valid, violations:[{rule,severity,detail}], counts }.

ParameterTypeDescription
spec *objectthe project-spec (object conforming to the plugin's JSON Schema)

tia_spec_plan TIA — plan project-spec (without applying)

Validates and transforms a project-spec into the ORDERED SEQUENCE of offline operations (subnets→devices→modules→network→tags→blocks→compile), WITHOUT touching serve. Gated operations (connect/download) are NOT included. Returns { steps, assumptions, plc } or the violations if invalid. PLC-scoped steps (tag tables, tags, FBs, instance DBs, compile) carry the {plc} placeholder: tia_spec_apply resolves the PlcSoftware TIA created for the device (named after the CPU device item, e.g. PLC_1 — not after the device; set the optional plcName on the device to choose it) right after the d…

ParameterTypeDescription
spec *objectthe project-spec

tia_spec_apply TIA — apply project-spec (offline orchestrator)

Orchestrates the OFFLINE build of a project-spec on an ALREADY OPEN project: validates → G5 (rejects safety+autonomous) → serially executes subnets/devices/modules/network/tags/blocks → compiles. STOPS at the 1st error (continueOnError to keep going). NEVER downloads (download is GATE G3, always human). dryRun:true returns the plan without applying. Requires an open project (tia_connect/tia_project_create beforehand). The PLC-scoped steps use the PlcSoftware resolved from the serve after the device step (it is recorded in applied as plc.resolve), never the device name; an unidentifiable…

ParameterTypeDescription
spec *objectthe project-spec
continueOnErrorbooleantrue → keeps applying the remaining steps after an error instead of stopping at the 1st
dryRunbooleantrue → returns the plan without applying