Skip to main content
Glama

Read a PcbLib

read_pcblib
Read-only

Reads an Altium .PcbLib file and returns its footprints with primitives (pads, tracks, arcs, etc.) as structured JSON. Use to inspect existing footprint styles or preserve data for round-trip edits.

Instructions

Read an Altium .PcbLib file and return its contents including footprints with their primitives (pads, vias, tracks, arcs, regions, fills, text, component_bodies). Returns structured data that can be used to understand existing footprint styles. All coordinates and dimensions are in millimetres (mm). Fields such as guid, unique_id, raw_tail, raw_block, raw_geometry, raw_layer_id, param_key_order and primitive_order are fidelity carriers: pass them back unchanged to write_pcblib or update_component and the rewrite is byte-identical to the source; omit them when authoring from scratch. Each footprint is the same JSON shape get_component, export_library and write_pcblib use; a list with no entries and an optional field with no value are omitted rather than empty/null. For large libraries, use component_name to fetch specific footprints, or use limit/offset for pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional: maximum number of footprints to return, 1 or more (default: all)
offsetNoOptional: skip the first N footprints, 0 or more (default: 0)
compactNoIf true (default), omit per-layer pad data when stack_mode is Simple. Set to false for full output.
filepathYesPath to the .PcbLib file
component_nameNoOptional: fetch only this footprint, by name in any case; a name the library does not hold is an error naming the available footprints

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint, openWorldHint, destructiveHint), the description reveals important behavioral details: fidelity carriers guarantee byte-identical rewrites when passed back, empty lists and optional fields are omitted rather than null, and the output shape matches get_component, export_library, and write_pcblib. These details are not present in the annotations and meaningfully set expectations for how the tool behaves.

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 well-organized, covering purpose, output format, fidelity carriers, empty-field handling, and pagination advice in a logical sequence. Each sentence contributes specific value, and there is no redundant phrasing. The length is justified given the complexity of the output and the need to convey byte-identical rewrite guarantees and JSON shape consistency.

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?

With no output schema provided, the description compensates by detailing the footprint JSON shape, fidelity carriers, omission of empty values, and pagination. It explicitly references the shared JSON shape with get_component, export_library, and write_pcblib, which anchors the expected structure. This gives an agent sufficient information to understand what the tool returns and how to handle the data, making the description contextually complete.

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

Parameters5/5

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

All five parameters are described in the schema with 100% coverage, including default values for limit, offset, and compact. The description reinforces the semantics of component_name and pagination ('For large libraries, use component_name to fetch specific footprints, or use limit/offset for pagination'). It also adds context that the output shape is consistent with other tools, which indirectly clarifies parameter expectations. No parameter is left ambiguous.

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 clearly states the tool reads an Altium .PcbLib file and returns its contents, including footprints with primitives. It is specific about the resource (PcbLib), action (read), and output (structured footprint data). It also distinguishes itself from write_pcblib by mentioning that passing fidelity carriers back enables byte-identical rewrites, clarifying its read-only role.

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?

The description provides explicit guidance on when to use this tool, such as paginating large libraries with limit/offset or fetching a specific footprint by component_name. It also instructs on fidelity carriers ('pass them back unchanged to write_pcblib or update_component') and when to omit them ('when authoring from scratch'), which directly informs usage in different workflows. This guidance is actionable and goes beyond simple verb definition.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/embedded-society/altium-designer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server