Skip to main content
Glama

Anneal a dense placement

anneal_place

Dense placement by simulated annealing: wirelength inside the real outline (Edge.Cuts with its corners, notches and cutouts; a separate piece no held part stands on is left out) with courtyard gaps, edge connectors held on their edge, fixed and locked parts held, and, unless refs is given, the mounting holes, connectors and switches already on the board held too (held_mechanical). Kept clear: keepout rectangles (routing corridors) and the board's and held footprints' rule areas that forbid pads or footprints, on their own faces. 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. The result is legalised: no part on another, in a keep-out or off the board; a part with no legal spot that started off the board stays there (unplaced), and a result worse than the board had is not saved (the op fails, the board unchanged). Iterations scale with the parts moved within a 150 s budget: leave iterations unset.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "design_id": "<design_id>"
    },
    "name": "anneal_place"
  }
}

Input 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]).
nearNoKeep ref at its anchor (a decoupling capacitor at its IC, a crystal at its MCU): the board plan's near constraint, as a strong pull in the anneal.
refsNoThe footprints that may move (default: every unlocked one).
seedNo
fixedNoParts held at these origin positions; they are moved there on the board first.
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 (default 55); a job still running comes back "running" for 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 and fine-pitch ICs (default 1.5; other 16+ pad ICs get two thirds).
iterationsNoLeave unset: 6000 per moving part (0.3-6 M) within a 150 s budget. Fewer only for a quick look.
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. Changed1 schema field changed
    • changedInput schema / properties / ic_halo_mm / description
      Previous value: -"Room kept around ICs with 48+ pads (default 1.5)."New value: +"Room kept around ICs with 48+ pads and fine-pitch ICs (default 1.5; other 16+ pad ICs get two thirds)."
  2. Changed2 schema fields changed
    • addedInput schema / properties / iterations / description
      Added value: +"Leave unset: 6000 per moving part (0.3-6 M) within a 150 s budget. Fewer only for a quick look."
    • changedInput schema / properties / iterations / maximum
      Previous value: -5000000New value: +6000000
  3. Changed19 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / properties / bottom_exclude / maxLength
      Removed value: -200
    • removedInput schema / properties / bottom_ok / items / maxLength
      Removed value: -60
    • removedInput schema / properties / bottom_ok / maxItems
      Removed value: -50
    • removedInput schema / properties / design_id / pattern
      Removed value: -"^[A-Za-z0-9_-]{8,80}$"
    • removedInput schema / properties / edge / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / edge_overhang_mm / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / fixed / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • changedInput schema / properties / halo / additionalProperties / anyOf
      Previous value: -[
      -  {
      -    "maximum": 10,
      -    "minimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "additionalItems": false,
      -    "items": [
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "number"
      -      },
      -      {
      -        "type": "number"
      -      }
      -    ],
      -    "maxItems": 4,
      -    "minItems": 4,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 10,
      +    "minimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "items": false,
      +    "prefixItems": [
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "number"
      +      }
      +    ],
      +    "type": "array"
      +  }
      +]
    • removedInput schema / properties / halo / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / keepouts / maxItems
      Removed value: -100
    • removedInput schema / properties / near / items / properties / anchor / maxLength
      Removed value: -40
    • removedInput schema / properties / near / items / properties / ref / maxLength
      Removed value: -40
    • removedInput schema / properties / near / maxItems
      Removed value: -1000
    • removedInput schema / properties / net_weight / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / refs / items / maxLength
      Removed value: -40
    • removedInput schema / properties / refs / maxItems
      Removed value: -2000
    • removedInput schema / properties / rotations / maxItems
      Removed value: -8
    • changedInput schema / properties / wait_s / description
      Previous value: -"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot; route_board's pipeline goes on from its last finished stage)."New value: +"Seconds to wait (default 55); a job still running comes back \"running\" for get_board_job."
  4. Changed1 schema field changed
    • changedInput schema / properties / wait_s / description
      Previous value: -"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot)."New value: +"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot; route_board's pipeline goes on from its last finished stage)."
  5. Changed1 schema field changed
    • addedInput schema / properties / near
      Added value: +{
      +  "description": "Keep ref at its anchor (a decoupling capacitor at its IC, a crystal at its MCU): the board plan's near constraint, as a strong pull in the anneal.",
      +  "items": {
      +    "properties": {
      +      "anchor": {
      +        "maxLength": 40,
      +        "type": "string"
      +      },
      +      "maxMm": {
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "ref": {
      +        "maxLength": 40,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "ref",
      +      "anchor"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 1000,
      +  "type": "array"
      +}
  6. Changed2 schema fields changed
    • addedInput schema / properties / fixed / description
      Added value: +"Parts held at these origin positions; they are moved there on the board first."
    • changedInput schema / properties / wait_s / description
      Previous value: -"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job."New value: +"Seconds to wait for the job (default 55). A job still running comes back with status \"running\": follow it with get_board_job. A job is allowed the time its budget asks for (time_budget_s, total_budget_s, rounds), and survives a server restart (the op starts over from its snapshot)."
  7. 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"
      +}
  8. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The description adds substantial context beyond the annotations: legalisation guarantees, the unplaced fallback for off-board parts, the 'worse result is not saved, the board unchanged' failure mode, and the 150 s iteration budget. The annotations (readOnlyHint=false, destructiveHint=false) already declare the mutation profile, and the description reinforces it by saying the board is left unchanged on failure, which is useful but consistent rather than supplementary. It does not describe the return payload (job vs result) beyond a passing mention of get_board_job.

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

Conciseness3/5

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

The purpose is front-loaded in the first clause, but the rest is one very long sentence-chain dense with stacked parentheticals, which makes it harder to scan than necessary. Almost every clause carries real information, so little is pure waste, but the structure could be broken into short sentences or bullets.

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 30-parameter mutating solver with no output schema, the description covers the essentials: what is optimised, what is held fixed, what is legalised, the failure contract, and the time budget. The remaining gap is that the async/job return shape ('running' for get_board_job) is only hinted at inside a parameter description rather than stated as the tool's completion model.

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 80% schema description coverage, the schema already documents most of the 30 parameters in detail. The description adds conceptual meaning for a few of them (flip_cost as a per-pad price with a via penalty, refs gating the held_mechanical default, from_scratch, iterations scaling), but leaves many (halo, near, shove, net_weight, gap_mm, seed, rotations) to the schema alone. Baseline 3 is appropriate.

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 clause names a specific verb and technique ('Dense placement by simulated annealing') and enumerates the real constraints it optimises against (Edge.Cuts outline, courtyard gaps, held parts, keepouts), so an agent knows precisely what the tool does. It does not state how it differs from the sibling auto_place (only referenced in passing for the edge-parameter semantics), leaving sibling selection to inference.

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 guidance is embedded rather than stated: it explains that starting from current positions is the default, that a low t0 'tidies' an existing placement, and that iterations should be left unset. There is no explicit statement of when to pick anneal_place over auto_place or place_footprints, or of prerequisites such as a completed outline.

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