build_project
Compile a CLASS 2 project or download it to a PLC; supports async polling and configurable timeout.
Instructions
Compile the CLASS 2 project or download it to the PLC. Compilation closes this project's CLASS 2 IDE; an IDE opened for another project is reported, not killed. Download pings the PLC first. Supports async: true — the call then returns immediately with a jobId and you MUST poll check_job_status until it reports status completed/failed (the result is delivered there).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "build_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| async | No | Run in the background: returns { status: 'pending', jobId } — poll with check_job_status. Default false. | |
| action | Yes | 'compile' builds the project; 'download' transfers it to the PLC. | |
| options | No | Compile mode (compile only). RebuildAll is safest; BuildChanges is faster for incremental work. | RebuildAll |
| lcp_path | No | Absolute path to the .lcp file. Omit to use the selected project. | |
| timeout_s | No | Timeout in seconds for compile or download. Omit for default (600s). | |
| connection | No | Connection string (e.g. 'TCPIP:192.168.1.100') or address-book name (download only). Omit to use the connection saved in the .lss file. | |
| add_loader_anyway | No | Force loader download even if the target OS already has a compatible loader (download only). Default: auto — the loader is sent for local LARS/loopback targets, skipped otherwise. Set false to disable, true to force. |