Skip to main content
Glama

lib_move_bodies_to_layer

Move all or selected PCB footprint 3D bodies to one mechanical layer so mixed-source libraries display consistently, without adding or removing bodies.

Instructions

Put the 3D bodies of the focused PCB library on one mechanical layer.

Libraries put together from several sources carry their bodies on whatever layer each source used, so one footprint's model shows with a layer turned on and the next one's never does. Every footprint, or only the named ones, has each body moved; a body already on the layer is counted and left alone. Nothing is added or removed.

Args: layer: The mechanical layer, by number ("Mechanical13") or by the name the library's stack gives it. Anything else is refused, as Altium's body dialog only offers mechanical layers. footprint_names: Only these footprints. Empty means every footprint in the library; names no footprint has come back in not_found.

Does NOT save the library. A mechanical layer the library has not enabled is accepted, with layer_enabled false and a warning, since Altium does not draw what is on it.

Returns: Dict with layer, layer_enabled, footprints, bodies, moved, already_on_layer, footprints_without_bodies, not_found, and items ({name, moved, from} for each footprint that changed).

Input Schema

NameRequiredDescriptionDefault
layerYes
footprint_namesNo

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, the description carries the full burden and does so: it discloses that nothing is added or removed, that already-correct bodies are counted and skipped (idempotency), that the library is NOT saved, and that an unenabled mechanical layer is accepted with layer_enabled=false and a warning. It even explains why invalid layer values are refused.

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 and the motivating problem, then args and return shape in order. Some prose (e.g. the Altium dialog aside) is more color than necessity, but nothing is genuinely wasted.

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, yet for a mutation tool with no annotations the description still covers the essentials an agent needs: side effects (no save), partial-success semantics (not_found, footprints_without_bodies), and idempotent behavior. Nothing material 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. It specifies the accepted layer format ("Mechanical13" or the stack-assigned name) and the rejection rule, plus the exact semantics of footprint_names (empty/null means all footprints; unknown names surface in not_found).

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 specific verb, resource and scope: 'Put the 3D bodies of the focused PCB library on one mechanical layer.' The follow-up sentence explains the concrete problem it solves (bodies scattered across layers from different sources), which no sibling tool (lib_move_footprints, lib_move_components) addresses.

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?

Usage context is clear — it exists to fix libraries assembled from multiple sources where 3D bodies land on inconsistent layers — and the footprint_names argument defines the narrow-vs-all scoping. It does not name sibling alternatives (e.g. lib_move_footprints) or state exclusions, so it falls short of 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