Skip to main content
Glama

lib_export_kicad_footprint

Converts a PCB library footprint into a KiCad .kicad_mod file, handling pad conversion, mils to mm, and y-axis flip for KiCad 6+ designs.

Instructions

Export a PcbLib footprint to a KiCad .kicad_mod file.

Reads the footprint's pads from the active (or named) PCB library and writes a KiCad 6+ S-expression footprint: one pad each (designator -> number, position, size, shape, drill, layer set). Through-hole pads (hole > 0) get a drill and the all-copper layer set; SMD pads get the side's Cu/Paste/Mask set. Altium mils convert to mm and the y axis is flipped (Altium y-up -> KiCad y-down). This is the footprint counterpart to lib_export_kicad_symbol.

Args: footprint_name: Footprint to export. If empty, exports the library's current footprint. output_path: Destination .kicad_mod file. Defaults to workspace/.kicad_mod.

Returns: {"output_path", "footprint", "pad_count"} or an error.

Input Schema

NameRequiredDescriptionDefault
output_pathNo
footprint_nameNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the output format (KiCad 6+ S-expression), how pads map to fields, through-hole vs SMD layer-set handling, mils-to-mm conversion and the y-axis flip. It omits failure modes such as whether an existing output_path is overwritten, which keeps it from a 5.

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 opening sentence states the action, followed by organized processing detail and explicit Args/Returns sections. The techtidbits (mils/mm, y-flip) earn their place, though the device-level prose sits slightly heavy for a two-parameter tool.

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 transformation tool whose output schema already declares the return shape, the description still names the return fields and error case, and fully covers input semantics and conversion behavior. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 0%, so the description must compensate, and it does: footprint_name explains the empty-value fallback to the library's current footprint, and output_path explains the workspace/<name>.kicad_mod default. Both parameters gain meaning beyond the bare schema titles.

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?

States a precise verb and resource (export a PcbLib footprint to a KiCad .kicad_mod file) and explicitly names its counterpart lib_export_kicad_symbol, so an agent can distinguish it from sibling export/import tools. The transformation described is unambiguous.

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?

The description establishes context (reads pads from the active or named PCB library, footprint counterpart to the symbol exporter) and documents the empty-footprint_name fallback to the current footprint. It stops short of explicit when-not-to-use guidance or naming alternatives such as lib_kicad_import for the reverse direction.

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