Skip to main content
Glama

lib_reload_library

Reload a PCB library to refresh cached text bounding boxes after edits, so subsequent reads return current extents. Save changes first; reloading does not save.

Instructions

Close and reopen a PcbLib so Altium rebuilds its caches from disk.

IPCB_Text.BoundingRectangle is populated when the document loads and is NOT refreshed when a text moves or is resized, not even by GraphicallyInvalidate. Anything that reads a text's extent after writing to it therefore gets the OLD box. Reload between a write and the next read.

SAVE FIRST: this does not save, and closing a dirty document loses the edits or raises a prompt. lib_fix_designators already does this.

Input Schema

NameRequiredDescriptionDefault
library_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so well: it discloses that the tool closes and reopens the document, rebuilds caches, does not save, and can lose edits or trigger a prompt if the document is dirty. The stale BoundingRectangle explanation also clarifies the underlying side effect driving the need to reload.

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 purpose is front-loaded, followed by a focused explanation of why reload is needed and the critical save warning. The technical detail about IPCB_Text.BoundingRectangle earns its place by justifying the tool's existence.

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

Completeness4/5

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

The description is nearly complete for invocation: it covers the cache-refresh rationale, save caveat, and usage timing, and an output schema exists to cover return values. The main remaining gap is that the required library_path parameter is not described.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for the lone required library_path parameter. It mentions a PcbLib generally but never explains expected path format, whether it must be absolute, or whether the library must already be open.

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 first sentence states a specific verb and resource: close and reopen a PcbLib so Altium rebuilds caches from disk. This clearly distinguishes it from sibling tools that create, edit, or inspect libraries.

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

Usage Guidelines5/5

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

It explicitly says to reload between a text write and the next extent read, warns to save first, and notes that lib_fix_designators already performs this reload. This gives strong when-to-use, when-not-to-use, and alternative 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