Skip to main content
Glama
ProductOfAmerica

mcp-server-kicad

upgrade_footprint_lib

Destructive

Convert an entire .pretty footprint library to the current KiCad format, rewriting only changed footprints and creating a backup before migration.

Instructions

Upgrade a footprint library to current KiCad format.

Rewrites every footprint in the library, so this takes the library
directory.  kicad-cli has no per-footprint option here, and a single
.kicad_mod path is rejected. So is a library that is, or holds, a link or
anything other than plain files and folders, before anything is copied.

KiCad performs the migration, as it should, but it performs it on a copy and
each result lands through the server's atomic write, so no footprint file can
be left truncated. Only files whose content actually changed are written, so
an upgrade that touches three footprints leaves the rest of the library
alone. The whole library is still copied to ``<name>.pretty.bak`` first and
the result names it, because that is the undo for an upgrade that SUCCEEDED.
There is exactly one, and every run overwrites it.

Each file is atomic; the library as a whole is not a transaction. An upgrade
interrupted midway leaves some footprints migrated and some not, and no file
damaged. Version control is still the better answer for a library you care
about.

Args:
    footprint_path: Path to a .pretty library directory.
        Optional; omit to use the configured default.

Input Schema

NameRequiredDescriptionDefault
footprint_pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.1

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the `<name>.pretty.bak` backup, that the backup is singular and overwritten every run, that only content-changed files are written, that each file is atomic but the library is not a transaction, and what a mid-run interruption leaves behind. That is exactly the mutation-risk context the agent needs and the annotations only gesture at.

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?

Purpose is front-loaded in the first line and nearly every following sentence carries operative detail (backup semantics, atomicity, partial failure). It is still prose-heavy for a one-parameter tool, with some editorializing ('as it should') that could be trimmed.

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?

An output schema exists so return values need no explanation; the description instead covers durability, rollback (the .bak file), granularity of writes, and non-transactional failure modes. For a destructive one-parameter migration tool, nothing an agent needs to call it safely is missing except the required/optional conflict noted above.

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

Parameters3/5

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

Schema coverage is 0%, so the description must carry the load, and it partly does: it states the parameter is a '.pretty library directory' and that a single .kicad_mod path is rejected. However it says the arg is 'Optional; omit to use the configured default', while the schema lists footprint_path as required — a direct conflict that leaves the agent unsure whether it may omit the path.

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?

Specific verb ('Upgrade') plus specific resource ('a footprint library') to current KiCad format, and 'Rewrites every footprint in the library' pins down the exact effect. The 'footprint' qualifier cleanly separates it from the sibling upgrade_symbol_lib even though that tool is never named.

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?

Gives real when-not conditions: a single .kicad_mod path is rejected, and so is a library that is or holds a link. It also steers the agent to an alternative ('Version control is still the better answer for a library you care about'), though it never names a sibling tool as the alternative.

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