Skip to main content
Glama

lib_export_kicad_symbol

Exports a SchLib symbol to a KiCad 6+ .kicad_sym file, converting pins, electrical types, and mils-to-mm coordinates into an S-expression symbol.

Instructions

Export a SchLib symbol to a KiCad .kicad_sym file.

Reads the symbol's pins from the active schematic library and writes a KiCad 6+ S-expression symbol: a body rectangle sized to the pin roots plus one pin per Altium pin (designator -> number, name, electrical type, position, orientation). Coordinates convert mils -> mm. This covers the symbol only; footprint export is separate.

Naming a component SELECTS it in the library, and that outlives the call: exporting is a read, but it leaves the library on the component it exported. Tools called afterwards without a component name act on whatever is current, so a following lib_add_pins would add pins here. The reply reports it in current_component when a name was given.

Args: component_name: LibRef to export. If empty, exports whatever component is currently selected in the SchLib. output_path: Destination .kicad_sym file. Defaults to workspace/.kicad_sym. reference: Reference designator prefix for the symbol (default "U").

Returns: {"output_path", "symbol", "pin_count"} or an error.

Input Schema

NameRequiredDescriptionDefault
referenceNoU
output_pathNo
component_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations at all, the description carries the full burden and does so well: it discloses the non-obvious persistent side effect that naming a component SELECTS it and that selection outlives the call, and that the reply reports it in current_component. It also states the mils -> mm coordinate conversion and the source of the pin data, which an agent could not infer from the schema.

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?

Front-loaded with the action, then behavior, then a structured Args/Returns block — easy to scan. The Returns block largely restates what the output schema already declares, so it is mildly redundant, but it is short and the rest of the text earns its space.

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?

For a zero-annotation tool with an output schema, the description covers source of data, transformation, output artifact, defaults, and the surprising selection side effect. Nothing an agent needs in order to call this correctly is missing.

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?

Schema description coverage is 0%, so the description must compensate — and it does, documenting all three parameters: component_name (LibRef semantics, empty = current selection), output_path (default workspace/<name>.kicad_sym), and reference (default "U"). This adds meaning well beyond the bare typed properties in the schema.

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?

Opens with a specific verb+resource+format: "Export a SchLib symbol to a KiCad .kicad_sym file." It also enumerates exactly what gets written (body rectangle, one pin per Altium pin with designator, name, electrical type, position, orientation) and explicitly scopes out the sibling case: "This covers the symbol only; footprint export is separate."

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?

Explicitly separates this from lib_export_kicad_footprint and gives the condition that selects the empty-name path ("If empty, exports whatever component is currently selected"). It warns that a later lib_add_pins would land on the exported component, which is a real usage consideration. It lacks an explicit "when not to use" statement, keeping it just under a 5.

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