@renanlido/tia-openness-mcp 1.9.2 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -36,7 +36,7 @@ The harness operating guide ships **inside the MCP itself**, in three layers:
36
36
  reinforces itself at the moment a gate is actually hit, not only up front.
37
37
 
38
38
  `tia_guide` is **pure and offline**: it never calls the `serve` API and never returns `isError`, so it works
39
- **even with the `serve` down** (so do `tia_spec_validate`, `tia_spec_plan` and `tia_job_status`). The chapters are
39
+ **even with the `serve` down** (so do `tia_spec_validate`, `tia_spec_plan`, `tia_block_render` and `tia_job_status`). The chapters are
40
40
  generated from `mcp/content/*.md` (the canonical source) into `src/content.gen.ts` via
41
41
  `npm run sync` — see [scripts/sync-guide.mjs](scripts/sync-guide.mjs).
42
42
 
@@ -46,6 +46,15 @@ generated from `mcp/content/*.md` (the canonical source) into `src/content.gen.t
46
46
  hyphens (`tia-init`, `tia-review`); the old dotted skill names were retired.
47
47
  Tools and skills are separate interfaces; `tia.ping` is not a tool name.
48
48
 
49
+ **Compatibility with the app (`serve`).** The MCP and the Windows app are released separately. MCP 1.10.0 publishes all 158
50
+ tools (62 of them class R). The 53 it added (epic #74: the tools this page marks "added by epic #74" or "(epic #74)") call
51
+ `serve` routes that app 1.7.0 adds, so they need app 1.7.0 or later. Against an older app each of them returns an error
52
+ result (`isError: true`) with `status: 404`, `kind: "route_not_found"`, an `error` that starts with `Route not found` and a
53
+ hint to update the app; nothing is changed. The one exception is `tia_block_render`, which renders SimaticML you pass in and
54
+ never calls the `serve`. The other 105 tools work with the released app. An option that relies on 1.7.0 behavior of an older
55
+ tool's route differs on an older app: for example `expectedContentHash` (the stale-write guard), where the older `serve`
56
+ returns no `contentGuard` and the tool says the write was not guarded.
57
+
49
58
  ### Diagnostics + M1 read-only (class R, auto-approvable)
50
59
  | Tool | Endpoint | Description |
51
60
  |---|---|---|
@@ -53,23 +62,36 @@ Tools and skills are separate interfaces; `tia.ping` is not a tool name.
53
62
  | `tia_readiness` | `GET /readiness` | Environment readiness **on the serve host** (x64, Windows group, PublicAPI, registry, instances). |
54
63
  | `tia_guide` | — (bundled content, no HTTP call) | Returns the operating guide (see "Operating guide embedded" above). Topics: `toc` (default) \| `full` \| `codex` (sized for Codex, no recipes) \| `brief` \| `gates-guards` \| `gui-gates` \| `gotchas` \| `pipeline` \| `recipes` \| `spec-format`. Pure/offline — works with the `serve` down. |
55
64
  | `tia_job_status` | — (does not call `serve`) | Waits (up to `waitSeconds`, default 20, max 25) for a long tool's background job: returns its final result if the job ends within the wait, otherwise `status:"running"` again; an unknown or forgotten `jobId` answers `not_found` (see "Long operations run as jobs" below). |
65
+ | `tia_block_render` | — (pure, no HTTP call) | Renders ONE SimaticML block export (the content of an exported `.xml`, e.g. the versioned file in git) as readable pseudo-SCL, network by network: LAD/FBD networks become SCL-like statements, SCL networks are rebuilt from their tokens, STL/GRAPH networks are marked not rendered; anything it cannot translate stays visible as `(* unsupported: ... *)` and is listed in `unsupported`, as are a duplicate UId, edge memory shared by several edge parts, a negated operand on an S/R/P/N coil and an invalid name or UId: that part is ambiguous, read it in the XML or report it as not reviewed. A network where one call, system block or box writes a destination whose address (an index or the same variable) depends on another output of the same part is marked `not rendered ... output destinations overlap`: read it in the XML or report it as not reviewed. Notation: `RLO_<UId>` is a temporary holding one value evaluated once (several targets of one value are all assigned from one capture); `TMP_<UId>` is the output of a MOVE/arithmetic box that only runs under its `IF <EN>` (stale when EN is false); `TMP_<UId>_<pin>` is the output or return value of ONE call that has several targets or, for an FC (no instance), that another part reads or that is negated, bound in that call with the targets and readers copying from it (two calls never share a value; a call with an instance and one target is written directly or read as `#inst.pin`); an edge (`P_TRIG`/`N_TRIG`) runs every scan and is evaluated before the `IF` that uses it (`RLO_<UId> := P_TRIG(...);`), so it is not conditional on that EN; `NOT` is a negated output pin; `TYPE#(x)` is `x` read as TYPE (an absolute address of a non-natural type, or an operand of a comparator, arithmetic box or Inc/Dec that is not a constant, a boolean or already of the instruction type, including a value forwarded through MOVE or produced by another box or call such as `INT#(RLO_40)` or `INT#(TMP_41)`, shown with the instruction type because the export does not carry a symbol's declared type; constants and written places are never cast); hidden and bidirectional characters appear as `<U+XXXX>`; ENO is shown as EN. For reading and review only: not importable, layout not preserved. `{ text, blocks, unsupported, note }`; malformed or non-block XML answers `invalid_xml`. Works with the `serve` down. |
56
66
 
57
67
  **M1 (read-only, 1:1 with the API's GET endpoints):** `tia_instances`, `tia_status`, `tia_projects`, `tia_project_info`,
58
68
  `tia_project_languages`, `tia_plcs`, `tia_devices`, `tia_device_tree`, `tia_device_connections`,
59
69
  `tia_plc_blocks/types/tags/watchtables`, `tia_catalog`, `tia_connections_diagnose`, `tia_subnets`,
60
70
  `tia_obj_roots/get/items/info/creationinfos/services`, `tia_pg_interfaces` (connection modes/PG-PC
61
71
  interfaces the CPU sees, plus each adapter's OS status — **no network scan**, unlike
62
- `tia_accessible_devices`; use it to pick `tia_download`'s connection params). None of them mutate state.
72
+ `tia_accessible_devices`; use it to pick `tia_download`'s connection params). None of them mutate state. `tia_status` reports
73
+ `boundProjectPath` (the project this session is bound to, `null` when none) and `bindingDrift` (`null`, or `{ actual, reason }` when the
74
+ project open in the bound TIA is no longer that one); `tia_project_info` reports `boundProjectPath` and `modified` (the project has
75
+ unsaved changes) and, like every project-bound call, answers `409 binding_conflict` on that drift — ask the human which project is
76
+ intended, then `tia_connect` to the bound path (go back) or to the path open now (adopt it).
77
+
78
+ The reads added by epic #74 are documented next to the writes they serve: cross-references, type exports and the PLC writes in "M3" below; the multiuser reads in the "Libraries, HMI, CAx and PLC security" table; the subnet, IO-system, I/O-map, WinCC Unified HMI and VCI reads in [WinCC Unified HMI, network lifecycle, I/O map and version control (epic #74)](#wincc-unified-hmi-network-lifecycle-io-map-and-version-control-epic-74).
63
79
 
64
80
  ### M2 — lifecycle (class M-off) + trust GATE (G1)
65
81
  | Tool | Endpoint | Description |
66
82
  |---|---|---|
67
83
  | `tia_start` | `POST /tia/start` | Starts/attaches TIA **without a project** (optional `headless`). |
68
84
  | `tia_show_ui` | `POST /tia/show-ui` | Relaunches a headless TIA as **visible** to render the trust dialog (enables G1). |
69
- | `tia_connect` | `POST /connect` | Opens/attaches a project. Idempotent for the already-open project (`alreadyOpen:true`) and REUSES a running TIA instance for a different one (`reusedPortal:true`, closing foreign projects — `closedForeign`); `withUserInterface` only applies when a NEW instance is started. **May block on GATE G1** → returns a `requires_human_action` envelope (no retry storm) with a `resumeToken`. UMAC (G6) only if a human provides it. |
70
- | `tia_disconnect` | `POST /disconnect` | The explicit teardown for the TIA instance the serve created (an attached one is only detached) — but not the only path that can end an owned instance (`tia_show_ui`, `tia_project_create` and a `tia_connect` needing a fresh connect also end/replace it). Gd3: use `tia_project_close` to just release the project lock. |
71
- | `tia_project_create` | `POST /project/create` | Creates a project (Gd4: empty directory → otherwise 409). |
72
- | `tia_project_save` / `tia_project_saveas` / `tia_project_close` / `tia_project_archive` | `POST /project/*` | Project lifecycle. `tia_project_close` KEEPS the TIA process alive (`portalKept`/`pid`) — the next `tia_connect` reuses it; nothing is saved. |
85
+ | `tia_connect` | `POST /connect` | Opens/attaches a project. Idempotent for the already-open project (`alreadyOpen:true`) and REUSES a running TIA instance for a different one (`reusedPortal:true`). In an instance serve started, the open project and any foreign project are closed to make room (`closedForeign` lists the foreign ones; an instance you had open yourself is never closed — serve only detaches): 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 — data loss, only on an explicit human decision). `savedProjects`/`discardedProjects` report what was saved or discarded. The response carries `boundProjectPath` and `modified`. `withUserInterface` only applies when a NEW instance is started. **May block on GATE G1** → returns a `requires_human_action` envelope (no retry storm) with a `resumeToken`. UMAC (G6) only if a human provides it. |
86
+ | `tia_disconnect` | `POST /disconnect` | The explicit teardown for the TIA instance the serve created (an attached one is only detached — nothing to save or discard) — but not the only path that can end an owned instance (`tia_show_ui`, `tia_project_create` and a `tia_connect` needing a fresh connect also end/replace it). Ending an instance serve started loses the unsaved changes of its projects, so a modified project is REFUSED with `409 unsaved_changes` unless the call carries `saveUnsavedChanges:true` (saves, then disconnects; recommended) or `discardUnsavedChanges:true` (data loss, only on an explicit human decision); `savedProjects`/`discardedProjects` report the outcome. Gd3: use `tia_project_close` to just release the project lock. |
87
+ | `tia_project_create` | `POST /project/create` | Creates a project (Gd4: empty directory → otherwise 409). A project already open in the session is closed to make room: with unsaved changes the call is REFUSED with `409 unsaved_changes` unless it carries `saveUnsavedChanges:true` (saves it first; recommended) or `discardUnsavedChanges:true` (data loss, only on an explicit human decision). The response carries `boundProjectPath` and `modified` for the new project, and `savedProjects`/`discardedProjects`. |
88
+ | `tia_project_save` / `tia_project_saveas` / `tia_project_close` / `tia_project_archive` | `POST /project/*` | Project lifecycle. `tia_project_close` KEEPS the TIA process alive (`portalKept`/`pid`) — the next `tia_connect` reuses it. 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); the response lists `savedProjects`/`discardedProjects`. |
89
+
90
+ **Unsaved changes (`unsaved_changes`).** `tia_connect`, `tia_disconnect`, `tia_project_create` and `tia_project_close` take two optional
91
+ booleans, `saveUnsavedChanges` and `discardUnsavedChanges` (never both). Without either, a call that would close a modified project is
92
+ refused before anything changes: `details.projects` lists the modified projects, and the error hint tells the agent to ask the human
93
+ first. `discardUnsavedChanges:true` is the data-loss choice — the client's confirmation dialog (see below) asks the human before the call
94
+ is sent — and is never a way past the refusal. If nothing is modified, both flags are no-ops.
73
95
 
74
96
  **Trust GATE (G1):** setup pre-registers eligible installed executables (Program Files, admin-only ACLs) in the
75
97
  Openness allow-list. If the executable is not covered by a current entry, connecting can require a human to
@@ -84,11 +106,11 @@ until the job ends) — keep polling `tia_job_status`. After the human confirms,
84
106
  the `resumeToken`.
85
107
 
86
108
  ### M3 — creation/authoring (class M-off) + guards
87
- A **compliant-by-construction** creation surface (32 tools) with schema validation (Gd13); every tool except
109
+ A **compliant-by-construction** creation surface (45 tools) with schema validation (Gd13); every tool except
88
110
  `tia_export_block`, `tia_block_compare` and `tia_obj_service` takes `dryRun` (Gd11):
89
- - **Hardware/network:** `tia_device_create`/`plug`/`unplug`, `tia_device_change_version` (changes the CPU firmware version in place, keeping the program), `tia_device_group_create`, `tia_subnet_create`, `tia_network_connect`/`address`/`disconnect`.
90
- - **Tags/constants:** `tia_tagtable_create`, `tia_tag_create`/`delete`, `tia_constant_create`.
91
- - **Blocks/types:** `tia_fb_create`, `tia_instancedb_create`, `tia_block_delete`/`set_attribute`, `tia_block_group_create`, `tia_type_group_create`/`type_delete`.
111
+ - **Hardware/network:** `tia_device_create`/`plug`/`unplug`, `tia_device_change_version` (changes the CPU firmware version in place, keeping the program), `tia_device_group_create`, `tia_subnet_create`/`update`/`delete`, `tia_network_connect`/`address`/`disconnect`, `tia_pn_name_set`, `tia_io_system_create`/`update`/`connect`/`disconnect` (`tia_subnet_update`/`delete`, `tia_pn_name_set` and the `tia_io_system_*` tools: [network lifecycle](#wincc-unified-hmi-network-lifecycle-io-map-and-version-control-epic-74)).
112
+ - **Tags/constants:** `tia_tagtable_create`/`delete`, `tia_tag_create`/`update`/`delete`, `tia_constant_create`/`update`/`delete`.
113
+ - **Blocks/types:** `tia_fb_create`, `tia_instancedb_create`, `tia_ob_create`, `tia_block_delete`/`set_attribute`, `tia_block_group_create`/`delete`, `tia_type_group_create`/`type_delete`.
92
114
  - **Code:** `tia_source_put` (textual SCL — Gd6), `tia_import_xml`/`tia_types_import` (graphical SimaticML — Gd6/Gd7), `tia_export_xml`.
93
115
  - **Project-as-code proof (#26/#28):** `tia_export_block` (exports ONE block inline as SimaticML — `sha256`/`normalizedSha256`/`bytes`, no file on the serve host) and `tia_block_compare` (compares a block against the SimaticML you pass, e.g. the file in git — normalized, ignores BOM/formatting/`<Created>`/UIds — `verdict:"equal"|"different"` is the actual roundtrip proof; a raw hash is not). Both read-mostly: exporting an inconsistent block first compiles it (export requires consistency), which can regenerate its instance DB.
94
116
  - **Watch tables:** `tia_watchtable_create`/`delete`.
@@ -97,6 +119,22 @@ A **compliant-by-construction** creation surface (32 tools) with schema validati
97
119
  model only with the `deploy` license scope, and refuses a download through them for every license — use
98
120
  `tia_download`.
99
121
 
122
+ **PLC writes added by epic #74 (ADR 0034) and the reads around them.** Every write is class `author` (the `author` or `deploy` license scope), offline, and takes `dryRun` (Gd11), which the serve answers: it runs the same guards and returns the plan WITHOUT changing anything (needs an open project). A new or renamed tag, constant or block whose name matches, ignoring case, another tag, constant or block of the PLC is `409 name_collision` (`details.collidesWith`). Bench run of 2026-10-19 (`docs/ROADMAP.md` section 10): these writes pass on a real S7-1200 project; V21 accepted every candidate used to provoke a rejected update, so the atomic-rejection paths are covered by unit tests only.
123
+
124
+ | Tool | Endpoint | Class / notes |
125
+ |---|---|---|
126
+ | `tia_tagtable_delete` | `DELETE /plcs/{plc}/tagtables/{table}` | M-off — deletes the table with every tag and constant in it (the `dryRun` lists them); the default tag table is `409 default_tag_table`, an unknown table `404 not_found`. |
127
+ | `tia_tag_update` | `POST /plcs/{plc}/tagtables/{table}/tags/{tag}` | M-off — rename, `dataType`, `address`, external accessible/visible/writable flags; only fields that differ are written (none passed: `400 missing_param`; all unchanged: `200` with `changes:[]`). The result carries `changes` and `overlaps` (other tags whose address overlaps: informational, never a refusal). |
128
+ | `tia_constant_update` | `POST /plcs/{plc}/tagtables/{table}/constants/{constant}` | M-off — rename, `dataType`, `value`, with the same `missing_param` and `changes` rules; an unknown table or constant is `404 not_found`. |
129
+ | `tia_constant_delete` | `DELETE /plcs/{plc}/tagtables/{table}/constants/{constant}` | M-off — unknown table or constant `404 not_found`; the `dryRun` plan is `{dataType, value}`. |
130
+ | `tia_ob_create` | `POST /plcs/{plc}/obs` | M-off — an OB by `eventClass` (one of 15; `400 invalid_event_class` lists them) with an optional `number` (`400 invalid_ob_number` when not permitted for the class, `409 ob_number_in_use`, `409 ob_number_exhausted`); a singleton class (Status, Update, Profile, ...) holds ONE OB: `409 ob_singleton_exists`. Put the logic in afterwards with `tia_source_put` or `tia_import_xml`. |
131
+ | `tia_block_group_delete` | `DELETE /plcs/{plc}/blockgroups/{group}?recursive=true` | M-off — `group` is a user group name or a `/` path such as `Motors/Conveyor`; a group that holds blocks or subgroups is `409 group_not_empty` (`details.blocks`, `details.groups`) unless `recursive:true`. |
132
+ | `tia_export_type` | `GET /plcs/{plc}/types/{type}/xml` | R, job — one UDT as inline SimaticML with `sha256`, `normalizedSha256`, `bytes` and `contentHash`; it never compiles: an inconsistent type is `409 inconsistent` (run `tia_compile`), an unknown one `404 not_found`. |
133
+ | `tia_type_source` | `GET /plcs/{plc}/types/{type}/source` | R, job — one UDT as SCL source with the `sha256` of the code and `bytes`; its `contentHash` is that of the SimaticML export of the same type, so what you read as SCL can guard a `tia_source_put` TYPE source or a `tia_types_import`; same `inconsistent` / `not_found` refusals. |
134
+ | `tia_crossrefs` | `GET /plcs/{plc}/crossrefs?target=&kind=&filter=&limit=&cursor=` | R, job — cross-references of ONE object (`target`; `kind` plc, block, type, tag, constant, tagtable or blockgroup, auto-detected when omitted: several matches `409 ambiguous_target`, none `404 not_found`, `blockgroup` never auto-detected) or, without `target`, of the whole PLC (minutes on a large project: scope the read). `filter` is AllObjects (default), ObjectsWithReferences, ObjectsWithoutReferences or UnusedObjects; UnusedObjects are candidates, not proof (OBs and objects used only from outside the PLC show as unreferenced), so recommend and let the human decide. Paged; each page re-reads the PLC, so paging bounds the size, not the time. Claim that nothing uses an object only when `coverage.complete` is true on every page and every page was read. `409 crossrefs_unavailable` when the target or the TIA/CPU version offers none. |
135
+
136
+ **Stale-write guard (ADR 0036).** The `contentHash` returned by `tia_export_block`, `tia_export_type` and `tia_type_source` is the hash a guarded write checks. Pass it unchanged as `expectedContentHash` (64 hex characters) to `tia_import_xml`, `tia_source_put` or `tia_types_import` (`tia_vci_import` takes it too): before anything is written the serve compares it with the object's current `contentHash`. `409 state_changed` (`details.expected`, `details.actual`; `actual:null` means the object is gone) means it changed since your read: re-read, merge, retry. `409 inconsistent` (the object is not consistent: compile, read again) and `409 unverifiable` (its current export is not well-formed XML) also write nothing; a match adds `contentGuard` to the result. `contentHash`, `normalizedSha256` and `sha256` are different hashes: never substitute one for another. The `dryRun` of the three write tools is a client-side plan: the hash is verified only when the write really runs.
137
+
100
138
  **Guards (client-side, before touching Openness):** **Gd5** — a versioned `typeIdentifier` uses `/V<fw>` (slash),
101
139
  never `:V`: a `:V<digit>` is rejected with `kind:"guard_violation"`; the guard does not check that the identifier
102
140
  exists (resolve the value via `tia_catalog`). **Gd11** — `dryRun:true` validates the guards
@@ -116,19 +154,79 @@ is a path **on the serve host**.
116
154
  | `tia_block_from_mastercopy` | `POST /plcs/{plc}/blocks/frommastercopy` | M-off — needs a master copy holding PLC blocks; a device copy is refused (`409 mastercopy_not_blocks` after app 1.6.3; up to 1.6.3 a 500). |
117
155
  | `tia_global_libraries` | `GET /globallibraries` | R — global libraries open in the TIA Portal session. |
118
156
  | `tia_global_library_create` / `_open` / `_save` / `_close` | `POST /globallibraries` (+ `/open` `/save` `/close`) | M-off (create/open/save run as jobs). Save/close take the name from `tia_global_libraries` (exact name first, then ignoring case); a name that picks no single open user library is refused, nothing saved or closed — `404 not_found` (`details.userLibraries` lists the names that work), or `409 conflict` for a system/corporate library or an ambiguous name — after app 1.6.3 (up to 1.6.3 a success even for an unknown name). A library opened read-only cannot be saved: `409 conflict` (`details.readOnly`) after app 1.6.3, a 500 up to 1.6.3. |
119
- | `tia_hmis` / `tia_hmi_screens` | `GET /hmi` · `GET /hmi/{hmi}/screens` | R — HMIs (`classic`/`unified`) and their screens. |
157
+ | `tia_hmis` / `tia_hmi_screens` | `GET /hmi` · `GET /hmi/{hmi}/screens` | R — HMIs (`classic`/`unified`) and their screens; a WinCC Unified HMI has its own tools (next section). |
120
158
  | `tia_hmi_screen_export` / `tia_hmi_screens_import` | `POST /hmi/{hmi}/screens/{screen}/export` · `…/screens/import` | M-off, job — WinCC **Classic** only; the import overwrites same-named screens. |
121
159
  | `tia_cax_export` / `tia_cax_import` | `POST /cax/export` · `POST /cax/import` | M-off, job — AutomationML of one device or the whole project; import `option` `RetainTiaDevice` (default) / `OverwriteTiaDevice` / `MoveToParkingLot`. Returns the transfer `state`/counts/`messages`; a failed transfer is `500 cax_transfer_failed` after app 1.6.3 (up to 1.6.3 only an opaque `result` string, even on failure). |
122
160
  | `tia_certificates` / `tia_certificate_template` | `GET /plcs/{plc}/certificates` (+ `/template?usage=`) | R — the CPU's local certificate store (409 on a CPU without the manager). |
123
161
  | `tia_certificate_import` / `_export` / `_delete` | `POST …/certificates/import` · `POST …/{id}/export` · `DELETE …/{id}` | M-off — the import's file password is **GATE G6** (from a human; `[redacted]` in dryRun plans). |
124
162
  | `tia_password_policy` / `tia_password_policy_set` | `GET`/`POST /plcs/{plc}/passwordpolicy` | R / M-off + **GATE G6** — the policy values are a human decision; on a modern-only CPU just `enabled` applies and the dropped fields come back in `ignoredFields`. |
125
163
  | `tia_block_protect` | `POST /plcs/{plc}/blocks/{block}/protect` | M-off + **GATE G6** — know-how protection on/off; the password comes from a human, never retried with a guess. |
126
- | `tia_local_sessions` | `GET /multiuser/localsessions` | R — local multiuser sessions (empty in a single-user project). |
164
+ | `tia_local_sessions` | `GET /multiuser/localsessions` | R — local multiuser sessions as `{sessions, total}` (empty in a single-user project): name, path, `handle`, `isModified`, `isUpToDate`; a session's `handle` reaches its objects through `tia_obj_*`. |
165
+ | `tia_project_servers` / `tia_project_server_groups` | `GET /multiuser/servers` · `GET /multiuser/servers/{server}/groups` | R — the Project Server connections configured on the serve host and their groups; needs a running portal but no open project; an unreachable server is `502 project_server_error`. |
166
+ | `tia_server_projects` | `GET /multiuser/servers/{server}/projects?group=&limit=&cursor=` | R — the projects of a server with their lock state (`lockState.isLocked`/`owner`/`error`), paged like `tia_plc_blocks`. |
167
+ | `tia_server_project_sessions` | `GET /multiuser/servers/{server}/projects/{project}/sessions` | R — the local sessions (`.alsNN` files) that exist for a server project. |
168
+ | `tia_markings` / `tia_mark_state` | `GET /multiuser/localsessions/markings?session=&conflicted=&limit=&cursor=` · `GET …/markstate?session=&handles=` | R — the objects marked for check-in in a session (paged; `conflicted:true` lists the conflicts) and the mark state of given object handles. |
169
+ | `tia_local_session_open` | `POST /multiuser/localsessions/open` | M-off, job — opens a `.alsNN` session; needs a portal with NO open project (`tia_start`, not `tia_connect`), refused with `409 project_open` / `409 session_open`; a UMAC-protected session may wait on a Siemens logon dialog that a human must answer (G6). `dryRun` is answered by the serve. Nothing is ever checked in to the Project Server. |
170
+ | `tia_local_session_save` / `tia_local_session_close` | `POST /multiuser/localsessions/save` · `POST /multiuser/localsessions/close` | M-off, job — save works for multiuser/exclusive sessions only (`409 save_not_supported`); close never commits: a session with unsaved changes, or whose modified state cannot be read, is refused with `409 unsaved_changes` unless `save` or `discard` is given. |
171
+ | `tia_objects_mark` / `tia_objects_unmark` | `POST /multiuser/localsessions/markings/mark` · `POST /multiuser/localsessions/markings/unmark` | M-off, job — select (or deselect) objects of your session for check-in; marking is not exclusive: an object another session marked and this session has not marked is `409 marked_by_others` unless `allowConflict:true`; an object this session already marked is skipped. |
172
+
173
+ ### WinCC Unified HMI, network lifecycle, I/O map and version control (epic #74)
174
+ Reads (class R) and offline changes (class M-off) added by epic #74. Every change is class `author` (the `author` or `deploy` license scope), offline, and takes `dryRun` (Gd11), which the serve answers: it runs the same guards and returns the plan WITHOUT changing anything (needs an open project). Bench run of 2026-10-19 (`docs/ROADMAP.md` section 10): the network lifecycle, the I/O map, the HMI Unified tools and the VCI tools pass on a real S7-1200 project after the fixes that run found; the HMI steps that need an HMI connection, a classic HMI or a Unified screen were skipped because the bench project has none.
175
+
176
+ **Network lifecycle (ADR 0035).** `tia_device_network` returns each interface's `item`, the `interface` value that `tia_pn_name_set` and the `tia_io_system_*` tools take (default: the primary network interface). The reads list `inventoryGaps` [{kind, subject, reason}] — reads that failed during the scan; a non-empty list means the nodes and IO systems may be incomplete. A write answers a `postcheck` (the serve re-reads); a mismatch is `409 postcheck_failed` (`details.mismatches`, and `details.rollback` where the write can be undone): re-read before anything else. `tia_network_connect`, `tia_network_address` and `tia_network_disconnect` carry a `postcheck` too.
177
+
178
+ | Tool | Endpoint | Class / notes |
179
+ |---|---|---|
180
+ | `tia_subnet_get` | `GET /subnets/{subnet}` | R — one subnet: attributes, `updatable` (what `tia_subnet_update` can change), the connected `nodes` and the `ioSystems` on it; unknown subnet `404 not_found`. Read it before updating or deleting. |
181
+ | `tia_device_network` | `GET /devices/{device}/network` | R — per interface: subnet, node (name, address, mask), `pn` (PROFINET device name, auto-generation), `ioController` / `ioConnector` IO system; unknown device `404 not_found`. |
182
+ | `tia_io_systems` | `GET /iosystems` | R — every IO system `{name, number, subnet, controller, devices}`. |
183
+ | `tia_subnet_update` | `POST /subnets/{subnet}` | M-off — rename and/or set the attributes allow-listed for the net type (`updatable` in `tia_subnet_get`); only differing values are written. A rename takes at most 24 characters: a longer name is `400 invalid_subnet_name` (`details.name`, `length`, `maxLength`; a `dryRun` too, nothing changed) although `tia_subnet_create` accepts longer names; a name equal to the current one is not a rename, and the serve counts UTF-16 code units, spaces included (how TIA counts other characters is not verified). `409 subnet_name_in_use`, `400 unsupported_subnet_attribute`, `409 subnet_not_writable`; the result carries `changes`. |
184
+ | `tia_subnet_delete` | `DELETE /subnets/{subnet}?disconnectNodes=true` | M-off — a subnet with nodes or IO systems is `409 subnet_not_empty` (`details.nodes`, `details.ioSystems`) unless `disconnectNodes:true`, which disconnects every node and removes the IO systems first. `409 subnet_delete_incomplete`: the project is partially changed, re-read with `tia_subnet_get`. |
185
+ | `tia_pn_name_set` | `POST /devices/{device}/pn-name` | M-off — the PROFINET device name of one interface and/or its auto-generation (an explicit name turns auto-generation off: a node in its default state, auto-generation on and `PnDeviceName` read-only, takes a `name` that way). The name is DNS-style and lower case (`400 invalid_pn_device_name`); `409 pn_name_in_use`, `409 pn_names_unverifiable`, `409 pn_name_unsupported` (the interface is not a PROFINET interface, or an attribute the request writes is not writable). The `dryRun` cannot prove that the name becomes writable after the switch, so a `plan_ok` can still be followed by `409 pn_name_unsupported` from the real call: the serve then writes the previous auto-generation back and verifies it (the error says "Nothing was changed." only when that read-back confirms it, otherwise `409 conflict` names `autoGeneration` as NOT restored: re-read with `tia_device_network`). |
186
+ | `tia_io_system_create` | `POST /iosystems` | M-off — the IO system of a controller interface; `number` 100–115 (`400 invalid_io_system_number`, `409 io_system_number_in_use`). `409 not_io_controller`, `409 interface_not_connected` (connect it with `tia_network_connect` first), `409 io_system_exists` (use `tia_io_system_update`); `409 io_system_create_incomplete` may leave an IO system behind: re-read with `tia_io_systems`. |
187
+ | `tia_io_system_update` | `POST /iosystems/update` | M-off — rename and/or renumber the IO system of a controller interface; `409 no_io_system` (create it first), `409 not_io_controller`, the number refusals above. |
188
+ | `tia_io_system_connect` | `POST /iosystems/connect` | M-off — assigns an IO device interface to the controller's IO system; both must be on the SAME subnet (`409 cross_subnet_assignment`), the controller needs an IO system (`409 no_io_system`), `409 not_io_device`, `409 already_assigned` (on a DIFFERENT IO system: disconnect first); assigning the one it is already on is a no-op. |
189
+ | `tia_io_system_disconnect` | `POST /iosystems/disconnect` | M-off — removes an IO device interface from its IO system (to leave the subnet use `tia_network_disconnect`); `409 not_io_device`. |
190
+
191
+ **I/O channel map (ADR 0037).**
192
+
193
+ | Tool | Endpoint | Class / notes |
194
+ |---|---|---|
195
+ | `tia_io_map` | `GET /plcs/{plc}/io-map?limit=&cursor=` | R, job — the base of a FAT/SAT I/O list: for the PLC's own modules and the devices on its PROFINET IO systems, the address ranges, the channels with logical addresses, the PLC tags that sit on them and the I/O tags that sit on nothing, as ordered `entries` (`kind` range, channel or tag; `status` matched, unmatched, conflict, unresolved, channels or unparsed). Channel addresses are DERIVED from the range and the channel number, never read from TIA: verify them against the hardware configuration. A `range`'s `start` is a byte number and its `length` is in BYTES (Openness reports address lengths in bits and the map converts them, rounding up to whole bytes), `from` and `to` are its first and last bit; the raw `addresses[].length` of `tia_device_tree` is in BITS. The map, and any list built from it, is complete only when `coverage.complete` is true on every page, nothing is unresolved, unparsed or unreadable, and every page was read; `coverage.limits` says what is never read (PROFIBUS DP, devices outside the PLC's PROFINET IO systems). Paged: start with `limit` 100–200 (a larger page may arrive with an omission marker and no `nextCursor`: retry with a smaller `limit`). |
196
+
197
+ **WinCC Unified HMI (ADR 0032).** `hmi` is the name from `tia_hmis`, matched ignoring case; it needs an open project and a WinCC **Unified** HMI: a classic HMI is `409 hmi_not_unified`, an unknown one `404 not_found`, two HMIs with the same name `409 ambiguous_name`. The lists page (`limit` 1–1000, `cursor`; see "Response size budget and paging") and carry `inventoryGaps` [{kind, subject, reason}]: a null next to a gap means unreadable. A write answers the re-read values and a `postcheck`; `409 postcheck_failed` (`details.mismatches`, `details.rollback` `restored`, `not_restored` or `not_attempted`) means re-read before anything else. A refused write changes nothing (`400 invalid_name`, `409 name_collision`). Writes do not scan screens, scripts or logging for references: run `tia_hmi_validate` afterwards.
198
+
199
+ | Tool | Endpoint | Class / notes |
200
+ |---|---|---|
201
+ | `tia_hmi_tag_tables` | `GET /hmi/{hmi}/tagtables` | R — tag tables `{name, group, tagCount}`. |
202
+ | `tia_hmi_tags` | `GET /hmi/{hmi}/tags?table=` | R — tags: internal (`connection`, `plcName`, `plcTag`, `address`, `accessMode`, `acquisitionMode` and `acquisitionCycle` all null: TIA reads the connection of an internal tag back as a placeholder such as `<Internal tag>`, which the serve answers as null), or external with their `connection` and the PLC tag or address they read; `table` limits the list (unknown table `404 not_found`). |
203
+ | `tia_hmi_connections` | `GET /hmi/{hmi}/connections` | R — connections; `plc` is the one PLC the partner resolves to (null when none or several), so it says whether `plcName` can be left out of an external tag. |
204
+ | `tia_hmi_alarms` | `GET /hmi/{hmi}/alarms?kind=` | R — discrete alarms, then analog ones (`kind` limits the list), with their `eventText` per project language, read as plain text (TIA stores rich text: an item without text is `""`, a language without an item null, and markup other than one plain paragraph comes back raw). |
205
+ | `tia_hmi_alarm_classes` | `GET /hmi/{hmi}/alarmclasses` | R — the names an alarm's `alarmClass` must be; `commonAlarmClass` is null when TIA reports a placeholder such as `<No alarm class>`. |
206
+ | `tia_hmi_screen_items` | `GET /hmi/{hmi}/screens/{screen}/items` | R — the items of ONE screen (flat: the V21 API exposes no nested items); unknown screen `404 not_found`. |
207
+ | `tia_hmi_validate` | `GET /hmi/{hmi}/validate?scope=` | R, job — `Validate()` of every tag, alarm, connection and screen (with its items) the `scope` selects (`all` default, `tags`, `alarms`, `connections`, `screens`); `findings`, `errors`, `warnings`. NOT a compile (V21 has none for Unified): a clean answer is not a compiled HMI. A big HMI can take minutes: narrow with `scope`. |
208
+ | `tia_hmi_tag_table_create` | `POST /hmi/{hmi}/tagtables` | M-off — `{name}`; the name is unique among all tag tables, ignoring case. |
209
+ | `tia_hmi_tag_table_delete` | `DELETE /hmi/{hmi}/tagtables/{table}?recursive=true` | M-off — the default table is `409 default_tag_table`; a table with tags is `409 tag_table_not_empty` unless `recursive:true`; `409 tag_in_use` when an alarm references one of its tags; `409 tag_table_delete_incomplete`: the project is partially changed, re-read with `tia_hmi_tags`. |
210
+ | `tia_hmi_tag_create` / `tia_hmi_tag_update` | `POST /hmi/{hmi}/tags` · `POST /hmi/{hmi}/tags/{tag}` | M-off — an internal tag needs `dataType`; an external tag names a `connection` (from `tia_hmi_connections`) and exactly one of `plcTag` (a PLC tag or `DB.Member` path) or `address`. `400 invalid_data_type`, `409 reference_not_found`, `409 plc_unresolved`, `409 plc_reference_unresolved`. `table` defaults to the default tag table; the update changes only the fields passed (none: `400 missing_param`) and cannot move a tag to another table. |
211
+ | `tia_hmi_tag_delete` | `DELETE /hmi/{hmi}/tags/{tag}` | M-off — `404 not_found`; `409 tag_in_use` (`details.references`) while an alarm references it. |
212
+ | `tia_hmi_alarm_create` / `tia_hmi_alarm_update` | `POST /hmi/{hmi}/alarms/{kind}` · `POST /hmi/{hmi}/alarms/{kind}/{alarm}` | M-off — `kind` is `discrete` (raised by `triggerBit` of the trigger tag, with `triggerMode`) or `analog` (`condition` and ONE `conditionValue`; pass a whole number of 2^53 or more as a string). TIA stores the condition value as a double, so a whole value above 2^53 in absolute value on an `LInt`, `ULInt` or `LWord` trigger tag is `409 condition_value_out_of_range` (a `dryRun` too; 2^53 itself is accepted). `alarmClass` and `triggerTag` must exist (`409 reference_not_found`); `409 tag_type_mismatch`, `409 trigger_bit_out_of_range`, `409 condition_value_out_of_range`; `eventText` cultures must be active project languages and the text is plain single-paragraph text (the serve wraps it as the rich text TIA stores and escapes `&`, `<` and `>`; a blank text, one over 1024 characters, a line break or a character XML cannot hold is `400 bad_request`, and a text cannot be cleared). The attribute list of an alarm itself is never read: `409 hmi_attribute_list_unavailable` and `409 hmi_attribute_not_writable` apply to the event text item of each culture, not to another alarm attribute. The update changes only the fields passed (none: `400 missing_param`). |
213
+ | `tia_hmi_alarm_delete` | `DELETE /hmi/{hmi}/alarms/{kind}/{alarm}` | M-off — `404 not_found`. |
214
+
215
+ **Version control (VCI, ADR 0029).** A VCI workspace is a folder on the serve host that mirrors project objects as files, so that an external tool can version them. Only leaf objects go through these tools: PLC blocks (OB, FB, FC, data blocks), PLC data types and tag tables (`kind` `block`, `type`, `tagtable`); any other object is `409 vci_not_leaf`. `workspace` is the name from `tia_vci_workspaces`; a name that several groups share is `409 workspace_ambiguous` (never guessed: ask the human); a TIA without VCI is `409 vci_unavailable`. Export and import take 1 to 50 objects (`400 batch_too_large` above that), run `dryRun:true` first, and are NOT transactions: they stop at the first failure, `409 vci_batch_incomplete` (`details.done`, `failed`, `notAttempted`) means the objects in `done` WERE written, and any other failure may be partial: re-read with `tia_vci_status` before repeating.
216
+
217
+ | Tool | Endpoint | Class / notes |
218
+ |---|---|---|
219
+ | `tia_vci_workspaces` | `GET /vci/workspaces` | R — `{name, group, rootPath, mappedObjects}` sorted by name; a null `rootPath` means no root folder is configured (`tia_vci_status` then answers `409 workspace_unconfigured`). |
220
+ | `tia_vci_status` | `GET /vci/workspaces/{workspace}/status?limit=&cursor=` | R, job — compares every mapped object with its file: `equal`, `projectChanged`, `workspaceChanged`, `conflict`, `workspaceFileMissing`, `unknown`, `unequal`, `statusFailed` or `unsupported`. `unsupported`, `statusFailed` and `unknown` rows and `coverage.complete:false` mean NOT verified. A block row becomes `projectChanged` through an edit that keeps the project object (a block attribute, `tia_block_set_attribute`); regenerating the block from SCL (`tia_source_put`) replaces the object and V21 drops its mapping: the row disappears and `tia_vci_import` answers `409 not_mapped`. Paged (recommended `limit` 100; only the rows of the page are compared): fold `summary` and `coverage` across ALL pages before saying the workspace is in sync. |
221
+ | `tia_vci_workspace_create` | `POST /vci/workspaces` | M-off — `{name, rootPath}`, `rootPath` an absolute local drive path on the serve host (`400 invalid_workspace_path`); the same name with the same root is `reused`; `409 workspace_exists` (a DIFFERENT root), `409 workspace_root_in_use`. |
222
+ | `tia_vci_export` | `POST /vci/workspaces/{workspace}/export` | M-off, job — writes the objects to the workspace files; a mapped object is synchronized and its workspace file is OVERWRITTEN with the project content; a new export creates its target folder when it is missing (a dry run lists `willCreateDirectory` per object). `409 vci_path_collision`, `409 vci_path_too_long`, `409 vci_unsupported_object`. An object whose mapping V21 dropped (a block regenerated from SCL) is exported again as a new object, which is `409 vci_path_collision` (`reason:"file_exists"`) until its old workspace file is removed. No status check runs inside the export: verify with `tia_vci_status`. |
223
+ | `tia_vci_import` | `POST /vci/workspaces/{workspace}/import` | M-off, job — OVERWRITES each project object with its workspace file, with no undo. The object must be mapped (`409 not_mapped`) and its file must exist (`409 workspace_file_missing`); an `equal` object is skipped. Takes `expectedContentHash` for blocks and types (the stale-write guard above, verified in a `dryRun` too; a tag table has none). A real import REPLACES the project object (the old one is disposed): a `tia_obj_*` handle or a value read before is stale, so re-read the block by name (`tia_export_block`, `tia_plc_blocks`). The serve verifies the new object by name too: one it cannot find again, or whose mapping the replacement dropped, is `409 import_unverified`, like any failed postcheck: the project object WAS ALREADY WRITTEN, review it and never report the import as done. In a batch, an object that can no longer be found or mapped when its turn comes stops the batch there (`409 vci_batch_incomplete`, or `409 conflict` when nothing was imported yet). |
127
224
 
128
225
  ### M4 — verification + GATED deploy (hardware)
129
226
  | Tool | Endpoint | Gate/class |
130
227
  |---|---|---|
131
228
  | `tia_compile` | `POST /plcs/{plc}/compile` | M-off — **the verifier**. Flattens the message tree + `verification:{compiled,errors,warnings}` + `nextHints` (Gd8: only ERRORs block). `blockChanges` (#28) lists blocks whose fingerprint changed since the compile's own before/after snapshot — a regenerated instance DB shows up here. |
229
+ | `tia_block_compile` | `POST /plcs/{plc}/blocks/{block}/compile` | M-off, job — compiles ONE block and answers the same message tree, Gd8 `verification`, `located[]` and `nextHints` as `tia_compile`; a clean block compile is NOT the Gd9 precondition for download or S7 connections (run `tia_compile` for the PLC). `404 not_found`; the `dryRun` (answered by the serve) resolves the block `{block, blockType, isConsistent}` without compiling. |
132
230
  | `tia_connection_create` | `POST /connections` | M-off — S7 connection (G2: requires ≥2 consistent CPUs; failure attaches diagnostics). |
133
231
  | `tia_download` | `POST /plcs/{plc}/download/plan` + `POST /plcs/{plc}/download` | **GATE G3** — never downloads without human approval bound to the `planHash`. |
134
232
  | `tia_upload` | `POST /stations/upload/plan` · `POST /stations/upload` | **GATE G4** (+G6 read password) — single-use planHash bound to the open project; runs as a job. |
@@ -163,22 +261,24 @@ The auto-confirmed selections (StopAll/Overwrite/Start/…) remain visible in th
163
261
  ### M5 — project-spec ingestion (orchestrates M1–M4)
164
262
  Accepts the structured **project-spec** (`docs/TIA-BEST-PRACTICES.md` §13.2; JSON Schema at `schemas/project-spec.schema.json` in the repository):
165
263
  - **`tia_spec_validate`** (R, deterministic, **no serve needed**): validates shape + cross-field rules — R-NAMES (unique names), R-TYPEID (`OrderNumber:<MLFB>/V<fw>`), R-SUBNET (IP∈CIDR, CPU+IO on the same subnet, 1 IO-system), R-LANGFAM (STL/GRAPH only on S7-1500), R-MODLIMIT, and **G5** (`safety.required && autonomous ⇒ REJECT`).
166
- - **`tia_spec_plan`** (no serve needed): turns a valid spec into the ordered operation sequence (subnets→devices→modules→network→tags→blocks→compile; the compile step is dropped when an explicit `verification.ladder` leaves `"compile"` out).
167
- - **`tia_spec_apply`**: orchestrates the OFFLINE build on an open project (validate → G5 → execute serially → compile, as planned), **stops at the 1st failed step** unless `continueOnError:true` (then it applies the rest and reports `applied_with_errors`), and **never downloads** (download is GATE G3, always human). `dryRun:true` returns the plan.
264
+ - **`tia_spec_plan`** (no serve needed): turns a valid spec into the ordered operation sequence (subnets→devices→modules→network→tags→blocks→compile; the compile step is dropped when an explicit `verification.ladder` leaves `"compile"` out). TIA names the PlcSoftware of a CPU after its CPU device item (default `PLC_1`), not after the device, so the PLC-scoped steps carry a `{plc}` placeholder and the answer has a `plc` field (`{device, resolvedAtApply}`); `devices[].plcName` names the CPU item.
265
+ - **`tia_spec_apply`**: orchestrates the OFFLINE build on an open project (validate → G5 → execute serially → compile, as planned), **stops at the 1st failed step** unless `continueOnError:true` (then it applies the rest and reports `applied_with_errors`), and **never downloads** (download is GATE G3, always human). The PLC-scoped steps use the PlcSoftware it reads from the serve right after the device step (recorded in `applied` as `plc.resolve`); when it cannot identify exactly one it stops with kind `plc_unresolved` instead of guessing. `dryRun:true` returns the plan.
168
266
 
169
- > **MCP M0–M5 COMPLETE** (105 tools), **runtime-validated** against a real TIA Portal V21 (including a
170
- > **hardware deploy** to an S7-1200) and **published to npm**. Roadmap and milestones in `docs/ROADMAP.md` §3.
267
+ > **MCP M0–M5 COMPLETE** (158 tools, 62 of them class R, published to npm in MCP 1.10.0). The first 105 are **runtime-validated** against a real TIA Portal V21 (including a
268
+ > **hardware deploy** to an S7-1200); the 53 added by epic #74 (23 of them class R) were exercised on the bench on 2026-10-19 (`docs/ROADMAP.md` §10; whole-PLC `tia_crossrefs` reads can exceed 300 s on a large project, card #156). Roadmap and milestones in `docs/ROADMAP.md` §3.
171
269
 
172
270
  ### Long operations run as jobs (ADR 0009)
173
271
 
174
272
  Opening a project takes 40–80 s in the field, and a compile/download of a large project can take just
175
- as long — well past the ~30 s ceiling most MCP clients enforce per call. **24 tools** run through a
273
+ as long — well past the ~30 s ceiling most MCP clients enforce per call. **38 tools** run through a
176
274
  soft-deadline job runner instead of blocking the call: `tia_connect`, `tia_start`, `tia_show_ui`,
177
275
  `tia_project_create`, `tia_project_save`, `tia_project_saveas`, `tia_project_close`, `tia_project_archive`,
178
- `tia_compile`, `tia_source_put`, `tia_download` (plan and real), `tia_upload`, `tia_export_xml`, `tia_spec_apply`,
179
- `tia_export_block`, `tia_block_compare`, `tia_cax_export`, `tia_cax_import`, `tia_hmi_screen_export`,
180
- `tia_hmi_screens_import`, `tia_global_library_create`, `tia_global_library_open`, `tia_global_library_save` and
181
- `tia_library_mastercopy_create`.
276
+ `tia_compile`, `tia_block_compile`, `tia_source_put`, `tia_download` (plan and real), `tia_upload`, `tia_export_xml`,
277
+ `tia_spec_apply`, `tia_export_block`, `tia_export_type`, `tia_type_source`, `tia_block_compare`, `tia_crossrefs`,
278
+ `tia_io_map`, `tia_cax_export`, `tia_cax_import`, `tia_hmi_screen_export`, `tia_hmi_screens_import`, `tia_hmi_validate`,
279
+ `tia_global_library_create`, `tia_global_library_open`, `tia_global_library_save`, `tia_library_mastercopy_create`,
280
+ `tia_local_session_open`, `tia_local_session_save`, `tia_local_session_close`, `tia_objects_mark`, `tia_objects_unmark`,
281
+ `tia_vci_status`, `tia_vci_export` and `tia_vci_import`.
182
282
 
183
283
  - If the operation finishes before `TIA_SOFT_DEADLINE_MS` (default 20 s, capped at 25 s), the call
184
284
  returns the normal result — nothing changes for the fast case.
@@ -188,7 +288,7 @@ soft-deadline job runner instead of blocking the call: `tia_connect`, `tia_start
188
288
  operation ended in one. Never repeat the original call.
189
289
  - **Single-flight:** while a job is running, every OTHER ordinary serve-bound tool answers `kind:"busy"` (with
190
290
  `details.jobId`) immediately instead of queuing behind the worker — go back to `tia_job_status`.
191
- `tia_guide`, `tia_spec_validate`, `tia_spec_plan` and `tia_job_status` itself never answer busy (they
291
+ `tia_guide`, `tia_spec_validate`, `tia_spec_plan`, `tia_block_render` and `tia_job_status` itself never answer busy (they
192
292
  don't call `serve`). `tia_ping` is the diagnostic exception: it probes `/health` (which bypasses the
193
293
  busy guard) and returns a reachability report instead of `busy` — with no `details.jobId`, so it cannot
194
294
  be used to obtain the job ID. The same long tool called again with the same arguments (the key is the tool plus
@@ -197,20 +297,203 @@ soft-deadline job runner instead of blocking the call: `tia_connect`, `tia_start
197
297
  - If a `tia_connect`/`tia_start`/`tia_show_ui` job stays `running` for minutes, a **trust dialog (G1)**
198
298
  may be waiting on the serve host — ask a human to look.
199
299
 
300
+ ### Tool annotations, structured output and confirmation dialogs (ADR 0026)
301
+
302
+ **Annotations.** Every tool publishes the four MCP hints, all derived from its class in `src/tool-classes.json` (none is set
303
+ by hand per tool): `readOnlyHint` is true only for class R, `openWorldHint` only for class GATE (it reaches the physical
304
+ world), `destructiveHint` says the tool may overwrite or remove existing content, and `idempotentHint` that an identical repeat
305
+ leaves the same state. Class R tools are read-only, non-destructive, idempotent and closed-world, so a client can auto-approve
306
+ exactly class R. Class M-off and GATE tools default to destructive and not idempotent; the tools that deviate do so only where
307
+ the serve source shows it (the table with its evidence is in `docs/adr/0026-mcp-tool-contract-annotations-structured-output-elicitation.md`
308
+ in the repository). The hints are for clients, not enforcement: the gates stay on the serve.
309
+
310
+ **Structured output.** Seven read tools (`tia_status`, `tia_project_info`, `tia_plcs`, `tia_plc_blocks`, `tia_plc_tags`,
311
+ `tia_devices`, `tia_device_tree`) publish an `outputSchema` and return `structuredContent`; the one text item is that same object
312
+ serialized, so a client that shows both prints the data once. Lists are wrapped in an object, because `structuredContent` must be one:
313
+ `tia_plcs` → `{plcs}`, `tia_plc_blocks` → `{blocks}`, `tia_plc_tags` → `{tagTables}`, `tia_devices` → `{devices}`, in the text too
314
+ (the serve's bare array is not repeated); the other three are objects already, and their text is the serve's JSON, unchanged.
315
+ A page of `tia_plc_blocks`, `tia_plc_tags` or `tia_device_tree` (see [Response size budget and paging](#response-size-budget-and-paging))
316
+ is an object already, so it is returned as it is and never wrapped again, with the optional `total` and `nextCursor` next to the
317
+ list (and `parentPath` on a tree node). Every array and every object below the top level of these outputs can hold a
318
+ size-budget marker instead of its value; the schema accepts it there. The schemas are open (extra fields are
319
+ accepted). A serve answer that does not match is an `isError` result with
320
+ `kind:"unexpected_response"` and the raw body in `details.body`; errors, `busy` and `503 installing` keep their usual error results.
321
+
322
+ The multiuser reads (`tia_local_sessions`, `tia_project_servers`, `tia_project_server_groups`, `tia_server_projects`, `tia_server_project_sessions`, `tia_markings`, `tia_mark_state`) and six WinCC Unified HMI reads (`tia_hmi_tag_tables`, `tia_hmi_tags`, `tia_hmi_connections`, `tia_hmi_alarms`, `tia_hmi_alarm_classes`, `tia_hmi_screen_items`) publish an `outputSchema` too, 20 tools in all, with the same `structuredContent` and `unexpected_response` behavior.
323
+
324
+ **Confirmation dialog (elicitation).** When the client advertises form elicitation, the four crossing calls (`tia_download` with
325
+ `approved:true`; `tia_upload`, `tia_online` and `tia_accessible_devices` with `confirm:true`) first ask the human in the client's
326
+ own dialog, with the plan, the connection and the effect. Accepting continues the call as before. Declining, cancelling or accepting
327
+ without ticking the box answers `status:"declined_by_human"` / `"cancelled_by_human"` (not an error): nothing reached serve or the
328
+ PLC, and the `planHash` stays valid. A dialog that cannot be shown or answered answers `elicitation_failed` (`isError`) and
329
+ nothing is sent. The dialog only checks the human's answer: dryRun → approval → `planHash`, the flag and serve's approval token are
330
+ unchanged and stay the authority. A client without elicitation behaves exactly as before. Passwords (the master secret, the upload
331
+ password) are never asked in a dialog. The only other dialog is the one `tia_connect`, `tia_disconnect`, `tia_project_create` and
332
+ `tia_project_close` open when called with `discardUnsavedChanges:true`: it names the tool and the target and says every unsaved change in
333
+ the open project(s) is lost for good; declining or cancelling answers `declined_by_human` / `cancelled_by_human` with nothing sent to serve.
334
+
335
+ ### Response size budget and paging
336
+
337
+ A large project can answer with more than a model should read in one go. Every tool result passes through a size budget in this
338
+ MCP process (the serve is not involved, so it works with any serve), and the biggest lists can be read in pages.
339
+
340
+ **The budget.** Two caps, counted in characters of the indented JSON the result carries (the same text the tool returns):
341
+ one **value** may be at most `TIA_MCP_MAX_VALUE_CHARS` characters (default `60000`), and one **response** at most
342
+ `TIA_MCP_MAX_RESPONSE_CHARS` (default `180000`). Both are read when the MCP starts, as digits only with a minimum of `4000`;
343
+ anything else (unset, empty, a sign, a decimal, a number below `4000`) means the default, and the value cap is clamped to the
344
+ response cap. The text and the `structuredContent` are budgeted separately, and the arguments you send to a tool are not
345
+ counted.
346
+
347
+ **What happens to an oversized value.** It is omitted **whole**, never cut: the value is replaced by a marker object and the
348
+ rest of the result is left as it was, still valid JSON. A value over the value cap is replaced first; if the response is still
349
+ over the response cap, the largest remaining values of the top-level object are replaced, largest first, until it fits. The
350
+ marker has exactly these fields (shown for an export tool; the `hint` is shortened):
351
+
352
+ ```json
353
+ {
354
+ "omitted": true,
355
+ "reason": "value_too_large",
356
+ "path": "$.xml",
357
+ "valueType": "string",
358
+ "chars": 412873,
359
+ "limitChars": 60000,
360
+ "hint": "The XML is too large for the response budget. sha256, normalizedSha256 and bytes stay in this result. ..."
361
+ }
362
+ ```
363
+
364
+ | Field | Meaning |
365
+ |---|---|
366
+ | `omitted` | always `true`; this is how a marker is recognised |
367
+ | `reason` | `value_too_large` (the value alone is over the value cap) or `response_too_large` (the response was over its cap and this was among the largest values) |
368
+ | `path` | JSON path of the omitted value from the root of the result: `$` is the whole result, then `$.xml`, `$.blocks`, `$.items[3].addresses` |
369
+ | `valueType` | `string`, `array` or `object` |
370
+ | `chars` | the size, in characters, of what was omitted |
371
+ | `items` | the number of elements or keys; present only when `valueType` is `array` or `object` |
372
+ | `limitChars` | the cap that was exceeded: the value cap for `value_too_large`, the response cap for `response_too_large` |
373
+ | `hint` | what to do about it, specific to the tool |
374
+
375
+ A result that carries a marker is the answer, not a transient failure: calling the same tool again with the same arguments
376
+ omits the same value again. Follow the `hint`. A result that fits is returned exactly as the tool produced it.
377
+
378
+ **Never omitted.** An error result (`isError: true`) is delivered whole, whatever its size: the `kind`, `details` and `hint`
379
+ of an error are what you need to recover. So is every control result, because a gate or a job is only safe if its
380
+ instructions arrive whole. A control result is one the MCP's own producers mark through a single internal registry
381
+ (`markControl` in `src/control.ts`) that nothing in a serve body can set; the exemption is never granted by a `status` or by
382
+ key names. The marked results are the gate handoffs (`status:"requires_human_action"`: `youMustDo`, `nextSteps`, `canDo`,
383
+ `caveat`, `plan`, `planHash`, `resumeToken`), the refusals of a confirmation dialog (`status:"declined_by_human"` /
384
+ `"cancelled_by_human"`), the running job (`status:"running"` with its `jobId`), and the plans and outcomes of `tia_download` /
385
+ `tia_upload` (`approvedPlanHash`, `fingerprint`, `result`), whether the tool answered directly or the result arrives through
386
+ `tia_job_status` (which carries the mark from the stored result to the delivered one). A control result may therefore be
387
+ larger than the caps; the budget never trades a gate instruction or a recovery step for context. A serve body that happens
388
+ to carry `gate`, `jobId`, `planHash`, `youMustDo` or `requires_human_action` is not a control result and is budgeted like
389
+ any other.
390
+
391
+ **How to narrow.**
392
+
393
+ - `tia_plc_blocks`, `tia_plc_tags`, `tia_device_tree`: read the list in pages (below).
394
+ - `tia_export_block`, `tia_export_type`: only the `xml` is omitted; `name`, `options`, `sha256`, `normalizedSha256` and `bytes`
395
+ stay, which is enough to check a block against a file in git. To get the XML itself, `tia_export_xml` writes the blocks and
396
+ types to a directory on the serve host and returns the file paths; `tia_block_compare` checks a block against SimaticML you
397
+ already hold without returning XML (both are class M-off, so they are not registered in read-only mode).
398
+ - `tia_catalog`: pass a more specific filter or `typeIdentifier` and keep verbose off. `tia_compile`: compile one block with
399
+ `tia_block_compile`, or read the messages from the compile summary. Any other tool: ask for something more specific.
400
+ - Or raise the two caps in the MCP's environment (table below).
401
+
402
+ Every array and every object below the top level of the read tools' `outputSchema` accepts a marker in place of its value (the
403
+ lists at the top of the result, each element of a list, the `tags` of a tag table, the `items` and `addresses` of a device-tree
404
+ node, the `plcs` and `closedForeign` of `tia_project_info`), so the oversized `tags` of one table, one whole device or the `items`
405
+ of one device item become a marker and the rest of the result, `total` included, stays. Only a string field the schema
406
+ types as a plain string cannot hold one: such a value over the cap answers with an `isError` result of `kind:"response_too_large"`
407
+ instead, with `details` `{chars, valueChars, responseChars, issues}` and a hint.
408
+
409
+ **Paging the big lists.** `tia_plc_blocks`, `tia_plc_tags` and `tia_device_tree` accept two optional inputs:
410
+
411
+ - `limit`: the page size, an integer from 1 to 1000. Outside that range it is refused before the serve is called.
412
+ - `cursor`: the `nextCursor` of the previous page, passed back unchanged. It is opaque: never build, edit or guess one.
413
+
414
+ With neither input the whole list comes back as before (the MCP sends no `limit` of its own). With either, the body is an
415
+ object:
416
+
417
+ | Tool | Page |
418
+ |---|---|
419
+ | `tia_plc_blocks` | `{blocks, total, nextCursor}` |
420
+ | `tia_plc_tags` | `{tagTables, total, nextCursor}` |
421
+ | `tia_device_tree` | `{device, typeIdentifier, items, total, nextCursor}` |
422
+
423
+ - `total` is the number of units of the whole list, not of the page: blocks for `tia_plc_blocks`; tags for `tia_plc_tags`
424
+ (a tag table with no tags counts as one, and a table that spans two pages appears on both with the tags that fall on each);
425
+ device item nodes for `tia_device_tree`.
426
+ - `nextCursor` is the string to pass as `cursor` for the next page, or `null` on the last page. A `cursor` without a `limit`
427
+ pages by 100.
428
+ - A page of `tia_device_tree` is a forest: a node nests under its parent when the parent is on the same page; a node whose
429
+ parent is on another page sits at the top level of `items` with `parentPath`, the names of its ancestors, outermost first.
430
+
431
+ To read a whole list: call with `limit`, then call again with `cursor` set to the `nextCursor` of the page you just got, until
432
+ `nextCursor` is `null`.
433
+
434
+ **A page that is itself too large.** If any part of a page is omitted by the budget (the whole list of `blocks`, one table's
435
+ `tags`, one node's `items`), that result carries **no `nextCursor`**: the key is removed, never set to `null` (which would mean the
436
+ last page), because following the cursor would skip what the marker replaced. `total` stays. Retry the SAME request (the same
437
+ `cursor`, or none for the first page) with a smaller `limit`, for example half, and only follow the `nextCursor` of a page that
438
+ arrives without a marker.
439
+
440
+ **Recovering from a cursor error.**
441
+
442
+ - `cursor_stale` (HTTP 409): the project changed since the cursor was issued (an item was added, removed, renamed or
443
+ reordered, or another project is open), or the cursor came from another PLC, device or list. Start again from the first
444
+ page: call the tool without `cursor` (keep `limit`) and follow the new `nextCursor` values. Nothing is ever skipped or
445
+ repeated silently.
446
+ - `invalid_cursor` (HTTP 400): the serve did not issue this cursor, or it points past the end of the list. Pass the
447
+ `nextCursor` of the previous page unchanged and whole; to start over, omit `cursor`.
448
+
449
+ Paging needs a serve that supports it (`docs/API-HTTP.md`, "Paging (`limit` and `cursor`)"); an older serve does not read the
450
+ two inputs and answers the whole list, without `total` or `nextCursor`. The decision record is
451
+ `docs/adr/0031-payload-budgets-and-cursor-paging-for-large-reads.md` in the repository.
452
+
453
+ **Other paged reads.** `tia_crossrefs`, `tia_io_map`, `tia_vci_status`, `tia_server_projects`, `tia_markings` and the WinCC Unified HMI reads (`tia_hmi_tag_tables`, `tia_hmi_tags`, `tia_hmi_connections`, `tia_hmi_alarms`, `tia_hmi_alarm_classes`, `tia_hmi_screen_items`, `tia_hmi_validate`) take the same `limit` and `cursor` and answer `total` and `nextCursor`, each counting its own units (see the tool's row). `cursor_stale` and `invalid_cursor` are recovered as above, and a page over the budget loses its `nextCursor`.
454
+
200
455
  ## Configuration (env)
201
456
 
202
457
  | Var | Default | Purpose |
203
458
  |---|---|---|
204
459
  | `TIA_API_BASE` | `http://localhost:5000` | Base URL of the `serve` API. |
205
460
  | `TIA_API_TIMEOUT_MS` | `15000` | Per-request timeout (fail fast if the host/VM does not respond). |
206
- | `TIA_SLOW_TIMEOUT_MS` | `120000` | Timeout for slow/cold ops (catalog, download plan and other slow M1–M3 calls). `tia_project_create` uses `TIA_CONNECT_TIMEOUT_MS`; `tia_compile` does NOT use this variable — it has a separate fixed 120 s timeout. |
461
+ | `TIA_SLOW_TIMEOUT_MS` | `120000` | Timeout for slow/cold ops (catalog, download plan and other slow M1–M3 calls). `tia_project_create` uses `TIA_CONNECT_TIMEOUT_MS`; `tia_compile` does NOT use this variable — it has a separate fixed 120 s timeout. `tia_crossrefs` waits up to 3 900 000 ms (the serve Long timeout of 3600 s plus five minutes, so the serve's own timeout answer arrives first): a larger value here raises that wait, a smaller one never lowers it. |
207
462
  | `TIA_CONNECT_TIMEOUT_MS` | `180000` | Timeout for the calls that start a new TIA (`tia_connect`, `tia_project_create`, `tia_start`, `tia_show_ui`) before a wait is treated as a possible G1 trust-dialog gate. |
208
- | `TIA_SOFT_DEADLINE_MS` | `20000` | Soft deadline for the 24 long tools before they answer `status:"running"` (capped at `25000`). |
463
+ | `TIA_SOFT_DEADLINE_MS` | `20000` | Soft deadline for the 38 long tools before they answer `status:"running"` (capped at `25000`). |
209
464
  | `TIA_PLAN_TTL_MS` | `900000` | Validity of a G3 download `planHash` (15 min); the token lives only in this MCP process. |
465
+ | `TIA_MCP_MODE` | `full` | `full` registers every tool; `read-only` registers only the class R tools (see [Read-only mode](#read-only-mode-tia_mcp_mode)). Unset, empty or blank means `full`; any other value stops the MCP at start. |
466
+ | `TIA_MCP_MAX_VALUE_CHARS` | `60000` | Largest single value a tool result may carry. A larger value is omitted whole and replaced by a marker (see [Response size budget and paging](#response-size-budget-and-paging)). Digits only, minimum `4000`; anything else (unset, empty, a sign, a decimal, below `4000`) means the default. Clamped to `TIA_MCP_MAX_RESPONSE_CHARS`. |
467
+ | `TIA_MCP_MAX_RESPONSE_CHARS` | `180000` | Largest whole tool response (the text of a result). When it is exceeded, the largest values are omitted whole until it fits. Digits only, minimum `4000`; anything else means the default. Error results are never omitted. |
210
468
 
211
469
  > **The MCP sends no host activation key.** The API is **activated by a license** configured in the GUI ("License"
212
470
  > tab). Human-provided operation credentials travel in tool calls, not in the MCP launch configuration.
213
471
 
472
+ ## Read-only mode (`TIA_MCP_MODE`)
473
+
474
+ Start the MCP with `TIA_MCP_MODE=read-only` to try it with no write risk.
475
+
476
+ - **What it registers.** Only the class R tools of `src/tool-classes.json` (62 of the 158 tools), the one source of truth for every tool's class (no
477
+ list of names lives in code). `tools/list` shows only them, each with `readOnlyHint: true`, and a `tools/call` of any other tool
478
+ name gets the SDK's unknown-tool error. The handshake `instructions` start with a short read-only notice: what the mode is, that
479
+ only read tools exist, that a hint naming another tool refers to a tool that is not available, and that a change needs the human
480
+ to switch the MCP to full mode. In full mode the instructions are the brief, unchanged. The ready line on stderr says
481
+ `read-only mode`.
482
+ - **Values.** `full` and `read-only`, trimmed and case-insensitive. Unset, empty or blank means `full`, so an existing install does
483
+ not change. Anything else (`readonly`, `read_only`, `ro`, ...) is refused: the MCP prints one line on stderr that names the value
484
+ and the valid ones, exits with code 1 before it registers a tool or opens stdio, and writes nothing on stdout. A typo can never
485
+ silently leave the write tools on.
486
+ - **Where to set it.** In the `env` of the client's server entry. The Claude Code plugin asks for it as `tia_mcp_mode` (default
487
+ `full`), the Claude Desktop bundle as the *MCP mode* field, the Gemini extension as the *MCP mode* setting; the Codex plugin and
488
+ the repository's `.mcp.json` read `TIA_MCP_MODE` from your environment. Pre-approval of the class R tools in each agent does not
489
+ depend on the mode.
490
+ - **A guard against the agent, not a security boundary.** It lives in this process. The license scopes on `serve` stay the
491
+ authority; another client of the same `serve`, or a direct HTTP call, is not limited by it.
492
+ - **Needs the MCP release that includes it.** An older release ignores the variable and registers every tool. Check `tools/list`
493
+ (or the ready line) before you rely on it.
494
+ - **It cannot open a project.** `tia_start` and `tia_connect` are class M-off, so in read-only mode the agent cannot start TIA or open
495
+ a project: the reads work on whatever project `serve` already has open.
496
+
214
497
  ## Mac → Windows VM scenario (pointing at the server)
215
498
 
216
499
  1. **On the Windows VM**, do everything through the **tray GUI** ("TIA Openness API" shortcut):
@@ -251,7 +534,7 @@ npm run build # typecheck + esbuild -> dist/index.js (self-contained)
251
534
  The same self-contained bundle is staged for Claude Desktop (double-click install, API URL asked in a form):
252
535
 
253
536
  ```bash
254
- npm run mcpb:stage -- ../.mcpb-stage # build + manifest (version from package.json, tools from the code) + server/index.mjs
537
+ npm run mcpb:stage -- ../.mcpb-stage # build + manifest (version from package.json, tools from the code) + server/index.mjs + LICENSE + THIRD-PARTY-NOTICES.md
255
538
  npm run mcpb:verify -- ../.mcpb-stage # starts the staged server over stdio and compares its tools with the manifest
256
539
  ```
257
540
 
@@ -259,6 +542,9 @@ Packing (`mcpb validate` / `mcpb pack`) and attaching the file to the release is
259
542
  `.github/workflows/release-mcpb.yml`. Not yet verified inside Claude Desktop; see the Claude Desktop section of
260
543
  `docs/INSTALL.md` and ADR 0022.
261
544
 
545
+ `THIRD-PARTY-NOTICES.md` ships next to `LICENSE` in the npm package and in the `.mcpb`: it carries the MIT notice of
546
+ Czarnak/tia-portal-mcp, from which the OB event-class names of `tia_ob_create` were adapted.
547
+
262
548
  ## Installation
263
549
 
264
550
  ### A) From public npm (normal use, Mac/Windows/Linux)
@@ -315,7 +601,7 @@ to match npm. [`CHANGELOG.md`](CHANGELOG.md) is frozen at 1.7.0; later notes are
315
601
  **Several agents at once: the guided setup (once published).** `@renanlido/plcware-setup` connects this server to Claude Code,
316
602
  Claude Desktop, Codex, Gemini CLI, Cursor and VS Code in one run (`npx @renanlido/plcware-setup`: it asks the API address,
317
603
  previews every change and confirms once), and where the agent takes them also installs the harness skills and subagents.
318
- Setup adds preapproval allowances for the read-only tools (class R: 39 of the 105 `tia_*` tools, listed in
604
+ Setup adds preapproval allowances for the read-only tools (class R: 62 of the 158 `tia_*` tools, listed in
319
605
  `src/tool-classes.json`) where the chosen registration route supports them. Existing user permissions are
320
606
  preserved: deny/ask rules can still prompt for reads, and existing allow rules can already permit mutations.
321
607
  Linked Claude settings files are not modified; Codex's command-registration route installs no preapprovals.
@@ -0,0 +1,46 @@
1
+ # Third-party notices
2
+
3
+ This file lists third-party material incorporated in `@renanlido/tia-openness-mcp` (the `tia` MCP server) and the
4
+ license notices that come with it. The package itself is distributed under the license in [LICENSE](LICENSE); the
5
+ notices below apply only to the material named in each section. The same file ships in the npm package and in the
6
+ Claude Desktop bundle (`.mcpb`).
7
+
8
+ ## Czarnak/tia-portal-mcp
9
+
10
+ - Repository: https://github.com/Czarnak/tia-portal-mcp
11
+ - License: MIT
12
+ - Upstream commit: the upstream `main` was at commit `043e1a72f3632185ca36531566aa647e0989a50e`
13
+ (2026-10-17) when the license text below was re-verified on 2026-10-18. The exact commit the
14
+ adaptation was read from was not recorded.
15
+ - Upstream file adapted:
16
+ - `TiaMcpServer.Contracts/Block/ObEventClasses.cs`
17
+ - Adapted in this package:
18
+ - `mcp/src/tools/authoring.ts`: the names of the Siemens OB event classes (the `OB_EVENT_CLASSES` list, which is
19
+ the `eventClass` input of `tia_ob_create`) and the list of singleton classes in the `tia_ob_create` description.
20
+ Both are embedded in the bundled `dist/index.js` (and in `server/index.mjs` of the `.mcpb`).
21
+
22
+ The upstream license text, verbatim:
23
+
24
+ ```
25
+ MIT License
26
+
27
+ Copyright (c) 2026 Łukasz Czarnacki
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining a copy
30
+ of this software and associated documentation files (the "Software"), to deal
31
+ in the Software without restriction, including without limitation the rights
32
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33
+ copies of the Software, and to permit persons to whom the Software is
34
+ furnished to do so, subject to the following conditions:
35
+
36
+ The above copyright notice and this permission notice shall be included in all
37
+ copies or substantial portions of the Software.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
+ SOFTWARE.
46
+ ```