Skip to main content
Glama

edit_footprint

Destructive

Edit a PCB footprint by setting field values, flipping between board layers, or locking/unlocking it against accidental moves. Preview changes with dry-run mode.

Instructions

Edits a footprint's properties: set a field value, change layer (flip the component to the other side), or lock/unlock it against accidental moves. Actions: 'set_field' sets a named field (requires field_name and field_value). 'set_layer' flips the component to the specified layer (requires layer). 'lock' prevents accidental moves in the GUI. 'unlock' allows moves again. This creates one undo step: Ctrl+Z reverts the edit. Use dry_run=true to preview the change without applying it. WARNING: set_layer flips the component, which may affect routing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layerNoTarget layer for the footprint. Required when action='set_layer'. Valid values: F.Cu (front), B.Cu (back). Flipping to a different side mirrors the component.
actionYesThe edit operation to perform. Valid values: 'set_field', 'set_layer', 'lock', 'unlock'.
dry_runNoIf true, compute and report what would change without actually editing the footprint. Defaults to false.
referenceYesReference designator of the footprint to edit. Examples: U1, R1, C1, J1. Use list_footprints to discover available references.
field_nameNoName of the field to set. Required when action='set_field'. Common fields: 'Value', 'Reference', 'Footprint'. Custom fields are also supported.
field_valueNoNew value for the field. Required when action='set_field'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Beyond the destructiveHint annotation, the description adds crucial behavioral details: 'This creates one undo step: Ctrl+Z reverts the edit,' 'dry_run=true to preview the change without applying it,' and a specific warning that 'set_layer flips the component, which may affect routing.' These disclosures significantly inform the agent about side effects and safety.

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

Conciseness5/5

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

The description is compact yet information-dense: a one-sentence overview, bullet-like action breakdown, undo behavior, dry-run tip, and warning. Every sentence earns its place, and the structure naturally front-loads the core purpose before caveats.

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 an output schema present and a complex 6-parameter tool, the description fully covers the operation's scope, prerequisites per action, preview mode, undo behavior, and side effects. No critical behavioral gaps remain; the agent can confidently invoke the tool for any listed action.

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?

The schema already provides 100% parameter coverage, including required-when conditions and example field names. The description restates these requirements ('set_field requires field_name and field_value') and adds a routing warning, but does not add substantial new parameter-level semantics beyond what the schema supplies. Thus baseline 3 is appropriate.

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 clearly states the tool edits a footprint's properties and enumerates specific actions (set_field, set_layer, lock, unlock) with distinct purposes. This distinguishes it from sibling tools like list_footprints (read-only) and move_footprint (position change) by emphasizing property/layer/lock edits.

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 provides clear context for when to use each action (e.g., 'set_field sets a named field (requires field_name and field_value)') and includes practical guidance like using dry_run=true to preview. However, it does not explicitly contrast with alternatives like move_footprint or get_footprint, so exclusions are not stated.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Amagtoto/pcb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server