design_learn_from_layout
Capture manual component placement edits by diffing an Altium layout against a saved canvas snapshot, then log moved-part relationships as training data for placement priors.
Instructions
Capture your placement edits as training data.
Workflow:
Run
design_execute_plan(canvas path): it writes a<project>.canvas.jsonsnapshot alongside the .PrjPcb.Open the schematic in Altium, drag components to taste, save.
Call this tool. It reads the snapshot + current Altium positions, diffs them, and appends one row per moved component to
%USERPROFILE%\.eda-agent\placement_edits.jsonl.
Each row carries: design_id, refdes, part_role, part_lib_ref, anchor_refdes, anchor_role, anchor_lib_ref, dx_mils, dy_mils, rot_delta_deg, design_size, ts.
Anchor = highest-pin-count netlist neighbor on a non-power / non-ground net (or spatial-nearest fallback). Captures the relational placement preference, not just "I moved this 200 mils right".
The accumulating log feeds placement_priors.json (the
relative-anchor priors used by the pipeline's placement pass).
Args:
project_path: Same project path you passed to
design_execute_plan.
Returns: Dict with ok, rows_appended, refdes_moved, refdes_unchanged, log_path, notes.
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": {
"project_path": "<project_path>"
},
"name": "design_learn_from_layout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||