---
title: "Agent tools"
---

# Agent tools

The language model tools the PLC module gives the Editor's agents, which ones read and which ones change files or controllers, and how every change is confirmed.

While the PLC environment runs, the Editor's agents get language model tools named `neuralInverse_plc_<name>`. They work through the module's own services, so the agent and the engineer see the same projects, code and values. They reach only what those services can do, and they are removed when the environment stops.

**State:** modelled. The tools are tested against the module's services, with the controller tools over the TwinCAT router model and the models of the engineering host. They have not been called by a language model from a chat in the running Editor, and every underlying capability has the state its own page gives.

## Read-only tools

Never asked; they write nothing and change no state.

| Area | Tools |
|---|---|
| Projects and Structured Text | `listProjects`, `listObjects`, `readObject`, `findSymbol`, `listProblems` (structure checks, said not to be compile results), `listLibraries` (references as each `.plcproj` stores them), `readGraphicalBody` (the editable elements of an LD, FBD, SFC or CFC body), `listTasks`, `listIoLinks` |
| CODESYS and TIA Portal projects | `listCodesysLibraries` (with the installed libraries on request), `listCodesysTasks`, `listTiaTags`, `codesysListApplications` (devices and applications, offline), `tiaListDownloadTargets` (CPUs and connections of the open project, offline), `plcSimListInstances` |
| TwinCAT target | `listTargets`, `connectTarget`, `disconnectTarget`, `readTargetState`, `searchTargetSymbols`, `describeTargetDataType`, `readTargetValues`, `listWatches`, `addWatch`, `removeWatch` |
| Trace | `startTrace`, `stopTrace`, `readTrace` (the trace only adds and deletes ADS notifications) |
| CODESYS values | `codesysReadValues`, only while the Editor knows the application is logged in; says when the controller does not run the project's application |

## State-changing tools on files and projects

Asked every time, with the exact change.

| Tool | What it changes |
|---|---|
| `editObject`, `addObject`, `addMember`, `renameObject`, `renameSymbol` | TwinCAT objects and Structured Text |
| `editLibraryReference` | Add, remove, pin, unpin or set the namespace of a TwinCAT library reference; the confirmation lists the exact lines |
| `editGraphicalElement` | One diagram edit in the stored form; the confirmation lists each text written at its line |
| `editTask` | A TwinCAT task's cycle time, priority or program calls |
| `editCodesysLibrary`, `editCodesysTask` | A CODESYS project's library references or task configuration, saved only when chosen |
| `editTiaTag` | One TIA Portal PLC tag |
| `saveAsLibrary` | Saves a TwinCAT PLC project as a library file |
| `buildProject`, `rebuildProject` (Build PLC Project, Rebuild PLC Project) | Builds through the vendor compiler; a TIA Portal rebuild is refused with the reason before any confirmation |

## State-changing tools on a controller

Asked every time, naming the target, the state read just now, the project and what changes; refused when one of these changed after it was shown or the chat request was cancelled.

| Vendor | Tools |
|---|---|
| TwinCAT | `writeTargetValue`, `activateConfiguration`, `loginAndDownload`, `startPlc`, `stopPlc`, `logoutPlc`, `generateBootProject` |
| CODESYS | `codesysLoginAndDownload`, `codesysLogin`, `codesysOnlineChange`, `codesysStartApplication`, `codesysStopApplication`, `codesysResetWarm`, `codesysResetCold`, `codesysResetOrigin`, `codesysLogout`, `codesysWriteValue` |
| TIA Portal and PLCSIM Advanced | `tiaDownload`, `tiaDownloadToPlcSim`, `plcSimRegister`, `plcSimPowerOn`, `plcSimPowerOff`, `plcSimUnregister` |

## How a change is confirmed

- A state-changing tool carries its own approve and cancel buttons in the chat's confirmation.
- When the chat approved the call without asking (Bypass Approvals, Autopilot, an auto-approve setting or a hook), the tool shows the exact change in a modal dialog of its own before it acts. Declined there, nothing changes.
- A controller action from an agent goes through the same confirmation, binding and logging as one you start yourself (see [Approvals and audit](https://neuralinverse.com/docs/modules/plc/approvals-and-audit/)). An agent never bypasses it.
- No tool accepts the consequences of a TIA Portal download. What TIA Portal asks before a download is accepted only by the engineer, in a modal dialog that names each consequence.
- There is no tool to force a value.
