xae_library_add
Adds a library reference to a TwinCAT XAE PLC project, completing missing version or distributor from installed libraries and rejecting invalid or duplicate references.
Instructions
Add a library reference (AddLibrary): library by name, version ('' = '*', the newest installed) and distributor, or by display name 'Tc2_Math, * (Beckhoff Automation GmbH)'. XAE refuses a bare name: a missing distributor / version is completed from the installed libraries (ScanLibraries) — refused when the library is not installed, is installed from several distributors and none is given, or a pinned version is not installed. Refused when it is already referenced. Runs once; the result has the references before / after, XAE's messages, and build_required — it never builds. guarded: confirmation tc_request_confirmation(action='xae_library_add', target=':').
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": {
"library": "<library>"
},
"name": "xae_library_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| library | Yes | ||
| version | No | ||
| distributor | No | ||
| confirm_token | No | ||
| plc_project_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||