Skip to main content
Glama

Export a library

export_library
Read-only

Export Altium .PcbLib or .SchLib files as JSON or CSV text in the response, enabling library backup, version control, and migration without writing to disk.

Instructions

Export a .PcbLib or .SchLib as text in the response — nothing is written to disk. JSON carries every component in the same shape read_pcblib/read_schlib and write_pcblib/write_schlib use, plus for a PcbLib the embedded 3D models its bodies reference (embedded_models, base64 STEP data keyed by model GUID), so import_library can rebuild the library elsewhere; CSV is a summary table: name, description (and a symbol's designator), one count column per primitive kind, and the external 3D model / footprint link count. Use JSON to version-control, back up or move a library and CSV for an inventory; use read_pcblib/read_schlib instead to inspect components with pagination, and list_components with details for a quick overview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatYesExport format: 'json' for full data, 'csv' for summary table
compactNoFor PcbLib JSON export: if true (default), omit per-layer pad data when stack_mode is Simple
filepathYesPath to the .PcbLib or .SchLib file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Even though annotations already declare readOnlyHint=true and destructiveHint=false, the description adds meaningful behavioral context: nothing is written to disk, output is returned as text, JSON includes embedded 3D models as base64 STEP data keyed by model GUID, and CSV is a summary table. This gives the agent a clear model of side effects and output behavior far beyond the annotation flags.

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

Conciseness4/5

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

The description is long but information-dense, and the key behavior ('nothing is written to disk') is front-loaded. The JSON/CSV breakdown and usage guidance are essential given the tool has no output schema and serves two distinct formats. It could be slightly better structured into shorter sentences, but every clause earns its place.

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 must explain what the tool returns, and it does so thoroughly: JSON component shape, embedded 3D model handling, CSV column layout, and appropriate use cases. The three parameters are all covered by the schema, and the behavioral and usage context provided is sufficient for an agent to call this tool correctly without further inference.

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 description coverage is 100%, so the baseline is 3, but the description adds value by elaborating what each format produces: JSON carries full component data in a shape compatible with read/write tools, while CSV provides a summary with specific columns. This deepens the meaning of the 'format' parameter beyond the schema's brief 'full data' vs 'summary table' phrasing.

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 opens with a specific action and resource: 'Export a .PcbLib or .SchLib as text in the response'. It clearly distinguishes the tool from read_pcblib/read_schlib by noting this is a full export rather than paginated inspection, and it also contrasts the JSON and CSV output roles. The purpose is unmistakable and well differentiated from the sibling tools.

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?

Usage guidance is explicit: use JSON for version-control, backup, or moving a library; use CSV for inventory; use read_pcblib/read_schlib instead for paginated component inspection; and use list_components for a quick overview. The description names concrete alternatives and the conditions that select each one, leaving no ambiguity about when to invoke this tool.

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