Skip to main content
Glama

Read a SchLib

read_schlib
Read-only

Parse an Altium .SchLib file into structured JSON containing all symbols, primitives, parameters, and footprint links, for studying library style or preparing editable data.

Instructions

Read an Altium .SchLib file: every symbol with its primitives (pins, rectangles, round_rects, lines, polylines, polygons, arcs, pies, images, text_frames, beziers, ellipses, elliptical_arcs, labels, ieee_symbols), parameters and footprint links as structured JSON. Coordinates are in schematic units (10 units = 1 grid square, not mm). Use it to study a library's symbol style or to fetch data for a read-modify-write. For one symbol whose name you know, get_component is cheaper; to find symbols by name pattern across libraries, search_components; for names alone, list_components. Each symbol is the same JSON shape get_component, export_library and write_schlib use, so a symbol read here can be passed to write_schlib or update_component as it is. Fields such as unique_id, primitive_order, header_params, raw_params, all_pin_count, extra_streams and storage_name are fidelity carriers: pass them back unchanged and the rewrite is byte-identical to the source; omit them when authoring from scratch. A list with no entries and an optional field with no value are omitted rather than empty or null. For a large library, page with limit and offset: the result reports total_count, returned_count, offset and has_more. component_name fetches one symbol and turns paging off.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoOptional: maximum number of symbols to return, 1 or more (default: all)
offsetNoOptional: skip the first N symbols, 0 or more (default: 0)
filepathYesPath to the .SchLib file
component_nameNoOptional: fetch only this symbol, by name in any case; a name the library does not hold is an error naming the available symbols

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint and destructiveHint annotations, the description reveals important behavior: coordinate units (10 units = 1 grid square), fidelity-carrier fields that must be passed back unchanged for byte-identical rewrites, omission semantics for empty fields, and paging behavior with total_count/has_more. There is no contradiction with the annotations.

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 long but every sentence carries new operational information: usage intent, coordinate units, sibling alternatives, fidelity requirements, empty-field conventions, and paging details. It is front-loaded with the read purpose and scoping, with no filler or repetition of the schema.

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, the description compensates well by specifying the returned content (primitives, parameters, footprint links), the JSON shape shared with other tools, omission conventions, and paging result fields. An agent has enough context to call read_schlib correctly and interpret its results.

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?

The schema already covers all four parameters at 100%, so the baseline is 3. The description adds meaningful semantics by explaining that component_name fetches one symbol and disables paging, that limit/offset are for paging large libraries, and that a missing component_name errors out with the available symbol names. This clearly exceeds the schema-only baseline.

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 names a specific verb ('Read') and resource ('Altium .SchLib file') and enumerates exactly what is returned: symbols with primitives, parameters, and footprint links as structured JSON. This clearly differentiates it from the PcbLib-oriented read_pcblib and related symbol tools like get_component.

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 explicitly states when to use this tool ('study a library's symbol style' or 'fetch data for a read-modify-write') and names concrete alternatives: get_component for a known symbol, search_components for name-pattern lookup, and list_components for names only. This gives an agent clear selection criteria.

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