Skip to main content
Glama

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:

  1. Run design_execute_plan (canvas path): it writes a <project>.canvas.json snapshot alongside the .PrjPcb.

  2. Open the schematic in Altium, drag components to taste, save.

  3. 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.

Input Schema

NameRequiredDescriptionDefault
project_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so: it discloses the write side effect, the exact log path (%USERPROFILE%\.eda-agent\placement_edits.jsonl), the append semantics, the full column list of each row, and the anchor-selection rule (highest-pin-count netlist neighbor on a non-power/non-ground net, with spatial-nearest fallback). That is far more than a restatement of the name.

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 one-line purpose, then a scannable numbered workflow, then semantics, then args/returns. Every section is purposeful, though the explicit 'Returns:' block partially duplicates the existing output schema and could be trimmed.

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?

For a single-parameter tool that writes a training-data log, the description covers preconditions, side effects, output location, record schema, and downstream consumption. With an output schema present, the brief returns summary is sufficient; nothing an agent needs in order to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must supply meaning, and it does: project_path is defined as 'Same project path you passed to design_execute_plan,' which is a real constraint (the snapshot must correspond to that project). It stops short of stating the expected path form or what happens if no snapshot exists for that path.

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 ('Capture your placement edits as training data') and immediately grounds it in a concrete artifact: it diffs a .canvas.json snapshot against live Altium positions and appends rows to a JSONL log. The relationship to the sibling design_execute_plan is made explicit, so an agent can place this tool in the pipeline without inspecting schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The numbered workflow gives explicit preconditions (design_execute_plan must have run first to produce the snapshot, the user must have dragged components and saved) and the exact moment to call it. It also names the downstream consumer (placement_priors.json / the pipeline's placement pass), which tells the agent why and when this step matters.

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