Skip to main content
Glama

xae_library_add

Idempotent

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=':').

Input Schema

NameRequiredDescriptionDefault
libraryYes
versionNo
distributorNo
confirm_tokenNo
plc_project_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.19

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, it discloses important behavior: the call runs once, never builds, may complete missing version/distributor data from installed libraries, and is guarded by tc_request_confirmation. This is exactly the kind of operational context an agent needs for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense but front-loaded, starting with the action and accepted forms before covering validation, refusal conditions, execution behavior, and confirmation. Every sentence adds operational value for a complex tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Although an output schema exists, the description still summarizes the result fields and build_required, and it fully covers mutation behavior, refusal conditions, and confirmation guarding. Nothing essential for correct invocation appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must carry parameter meaning, and it does for library, version, and distributor, including the special version value '' = '*' and display-name syntax. It also implies plc_project_path via the confirmation target format and confirm_token via the guard, but those two parameters are not explicitly named and explained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: add a library reference. It also explains the accepted library forms by name/version/distributor or display name, which distinguishes this from list, installed, and remove siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly describes the operational context and refusal conditions, including ScanLibraries completion, ambiguous distributors, missing pinned versions, and duplicate references. It does not explicitly name sibling alternatives such as xae_library_installed or xae_library_remove, so it stops short of full routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools