Skip to main content
Glama
ProductOfAmerica

mcp-server-kicad

move_footprint

Move a KiCad PCB footprint by reference to new X/Y coordinates, rotation, or layer, updating placement while keeping pads, texts, and graphics intact.

Instructions

Move a footprint to a new position.

A move rewrites the footprint's own position and nothing of its pads, texts
or graphics, which KiCad stores relative to the footprint. The zones it owns
and a KiCad 10 footprint's points are stored in board coordinates, so they
move by the same delta, as KiCad's FOOTPRINT::SetPosition moves them
(pcbnew/footprint.cpp:2553-2584 at 9.0.8). A rotation turns the footprint to
that angle as KiCad's own rotate turns it: every pad and text turns by the
change from the angle it had, its zones and points turn about it, and a
keep-upright text that would read upside down is turned half a turn with its
justification mirrored, so it stays readable on the same side of its anchor.
Angles are written as KiCad writes them: the footprint's between -180 and 180
and left out at 0. Off the quarter turns the result reads as KiCad's turn
without matching pcbnew's save byte for byte: footprint-relative coordinates
stay as written where pcbnew re-derives them through two RotatePoint roundings,
an fp_rect stays where pcbnew writes an fp_poly, and arc mid points stay as
written. A footprint carrying what this tool does not move with it
(a dimension, image, table or barcode, or a child no KiCad it knows reads) is
refused and nothing is written. The keep-out warning reads keepouts as
check_placement does.

Args:
    reference: Reference designator (e.g. "R1")
    x: New X position
    y: New Y position
    rotation: The footprint's angle after the move, in degrees (None keeps the
        current one). An angle the footprint already has (270 for one at -90,
        360 for one at 0) changes nothing and leaves the file byte-identical,
        where KiCad's footprint properties dialog would still re-run its
        rotate by a full turn. inf and nan are refused and nothing is written.
    layer: F.Cu or B.Cu (empty keeps the side; anything else is refused). The
        other side flips the footprint as KiCad's own flip does (FOOTPRINT::Flip,
        pcbnew/footprint.cpp:2491-2550 at 9.0.8): pads, texts and graphics
        mirror, their layers go to their opposites on this board (user layers it
        pairs included), a text's mirror toggles on side-specific layers only,
        zones and points mirror about the footprint with their layers, and 3D
        models stay as they are. With a rotation the flip comes first, so
        rotation names the angle the footprint ends at. Refused, with nothing
        written: a text box, a pad's own padstack, KiCad 10's back drills, and on
        a board of four or more copper layers an item (a zone included) on inner
        copper that does not name every inner layer, which KiCad 9 and 10 flip
        apart.
    pcb_path: Path to .kicad_pcb file. Optional; omit to use the configured default.

Input Schema

NameRequiredDescriptionDefault
xYes
yYes
layerNo
pcb_pathNo
rotationNo
referenceYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only supply coarse booleans (readOnly=false, destructive=false, non-idempotent); the description carries everything else. It discloses atomicity ("Refused, with nothing written"), exact rotation/flip semantics, no-op cases that leave the file byte-identical, parse-level nuances (fp_rect vs fp_poly, arc midpoints), and the full list of refused item types. That is far beyond what the annotations provide.

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?

Structure is strong: a one-line purpose, then behavior, then a per-argument block, with the most important facts front-loaded. It is unusually long, however, and some detail (pcbnew file:line citations, byte-for-byte save trivia) exceeds what an agent needs to select and invoke the 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?

An output schema exists, so return values need not be explained, and the description fills the remaining gaps for a complex mutation: rollback guarantees, refusal conditions, default resolution, and interaction between rotation and layer flip ordering. Nothing an agent needs to call it 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 documents every parameter: reference's format, x/y meaning, rotation's null-vs-value and angle normalization behavior, layer's accepted values and flip consequences, and pcb_path's default. inf/nan rejection for rotation and refusal of invalid layer values are spelled out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource ("Move a footprint to a new position"), and the body pins down exactly what is rewritten versus what follows the move. It never explicitly distinguishes itself from near-siblings like move_component or place_footprint, so the agent must infer the footprint/schematic split from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied rather than stated: it tells the agent the pcb_path is optional and defaults to the configured file, and cross-references check_placement for keep-out warnings, but gives no when-to-use-this-versus-alternative guidance against place_footprint or move_component.

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