Skip to main content
Glama

Anneal a dense placement

anneal_place

Dense placement by simulated annealing: wirelength inside the outline with courtyard gaps, edge connectors held on their edge, fixed and locked parts held, keepout rectangles kept clear (routing corridors), and a per-pad price for the bottom side (flip_cost, mm of wirelength; each bottom-side pad whose net has top-side pins costs a via). Starts from the current positions unless from_scratch. Slower than auto_place (a minute per 600k iterations) and much denser. Check overlapping_pairs and run_drc afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
t0NoStart temperature (default 15). ~0.5 keeps the current placement and only tidies it (refine, or squeeze into a smaller outline).
edgeNoConnector ref to the edge it sits on, optionally @mm: where along that edge its centre goes, from the outline's top-left corner (x on top/bottom, y on left/right) — the same meaning as in auto_place and a board plan. A fixed or locked ref keeps its pin.
haloNoRouting room per ref, mm (a number all round, or footprint-local [left, top, right, bottom]).
refsNoThe footprints that may move (default: every unlocked one).
seedNo
fixedNo
shoveNoLegaliser: a part may take a spot held only by movable parts under this fraction of its area (default 0.3, 0 off).
gap_mmNo
wait_sNoSeconds to wait for the job (default 55). A job still running comes back with status "running": follow it with get_board_job.
grid_mmNoPlacement grid for free parts (0.254 = 10 mil, the designer habit); default off.
keepoutsNoRectangles no part may cover, e.g. a bus corridor.
bottom_okNoFootprint-id substrings allowed on the bottom side (e.g. "0402").
design_idYesThe design id returned by import_kicad_project or list_designs.
flip_costNo
rotationsNo
bottom_anyNoAny SMD-only part may go to the back (priced by flip_cost); LEDs, switches, displays and test points stay on top unless bottom_exclude says otherwise.
ic_halo_mmNoRoom kept around ICs with 48+ pads (default 1.5).
iterationsNo
net_weightNo
refit_fromNoOutline the current placement was drawn in; it is scaled affinely into the new outline before annealing (with t0 ~0.5: shrink a placement that closed).
split_costNoPrice (mm of wirelength) of an SMD net with pads on both sides, i.e. a via.
from_scratchNo
hole_room_mmNoRoom kept around mounting holes on both sides for the screw head and standoff (default 1).
bottom_excludeNoRegex of refs or footprint ids that stay on top regardless.
overlap_weightNoOverlap price per mm2 at the end of the anneal (default 400; 4000 halves what a dense draw leaves).
edge_overhang_mmNoPer edge ref, how far its body sits past the edge: default 0.5 for a USB/barrel/jack connector (at most its 1.2 mm lip), 0 (flush) for anything else, which may not overhang.
connector_room_mmNoRoom kept on the board side of every edge connector (default 2.5).
connector_flank_mmNoRoom kept on the flanks of every edge connector (default 1.0).
bottom_max_height_mmNoTallest part allowed on the back (3D-model height, default 1.0): the assembly box grows by the tallest back-side part.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / edge / additionalProperties / pattern
      Previous value: -"^(left|right|top|bottom)(@-?\\d+(\\.\\d+)?)?$"New value: +"^(left|right|top|bottom)(@\\d+(\\.\\d+)?)?$"
    • changedInput schema / properties / edge / description
      Previous value: -"Connector ref to the edge it sits on, optionally @overhang_mm of its body past the edge (default 0.5)."New value: +"Connector ref to the edge it sits on, optionally @mm: where along that edge its centre goes, from the outline's top-left corner (x on top/bottom, y on left/right) — the same meaning as in auto_place and a board plan. A fixed or locked ref keeps its pin."
    • addedInput schema / properties / edge_overhang_mm
      Added value: +{
      +  "additionalProperties": {
      +    "maximum": 5,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  "description": "Per edge ref, how far its body sits past the edge: default 0.5 for a USB/barrel/jack connector (at most its 1.2 mm lip), 0 (flush) for anything else, which may not overhang.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false, openWorldHint=false. The description adds substantial non-obvious context: the enforced constraints (keepouts kept clear, edge connectors held to their edge, locked parts held), the flip_cost/via cost model, a concrete runtime figure ('a minute per 600k iterations'), and the fact that verification via overlapping_pairs/run_drc is expected. This is well beyond what the annotations convey.

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 and primary objective are front-loaded in the first clause, and every subsequent clause carries distinct information (constraints, cost model, timing, start state, verification). The opening sentence is long and clause-heavy, which slightly hurts scannability, but there is little wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 29-parameter mutation tool with no output schema, the description covers the optimization objectives, the cost model, timing, and how to verify the result. It does not describe the return payload or the 'running' status/job-follow-up path (which the schema's wait_s description handles), leaving a small gap.

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?

With 29 parameters and 72% schema coverage, the schema already documents most inputs. The description adds useful meaning for a few key ones (flip_cost pricing, keepout rectangles, from_scratch behavior), but many tunables (seed, iterations, gap_mm, rotations, net_weight, overlap_weight) get no narrative explanation, so it only partially compensates for the uncovered parameters.

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 and resource — 'Dense placement by simulated annealing' — and immediately enumerates the exact objectives it optimizes (wirelength, courtyard gaps, edge connectors, fixed/locked parts, keepouts). It explicitly contrasts with the sibling auto_place ('slower ... and much denser'), so an agent can distinguish it without opening any schema.

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 a clear comparative tradeoff against auto_place (speed vs density) and a follow-up workflow ('Check overlapping_pairs and run_drc afterwards'), plus the starting-state condition ('Starts from the current positions unless from_scratch'). It stops short of an explicit 'use this when / prefer auto_place when' rule, so it is strong but not fully prescriptive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources