Focus (what the user points at)
focusCaptures the user's current click, box, or KiCad selection and resolves it to schematic or PCB references, pins, nets, and a cropped preview, so you can act on exactly what they mean.
Instructions
What the user is pointing at. Call it when they say "this part", "here", "that corner" instead of guessing. action: get (default; the latest click / box in the Copper Canvas or selection in KiCad's PCB editor; wait=N waits up to N s for their next one) | resolve (no human: what is inside box=[x0,y0,x1,y1] or nearest near=[x,y] mm on document='schematic' | 'pcb') | open (start the Copper Canvas viewer and return its URL) | clear. Returns focus {document, mode, box_mm | point_mm, refs, pins, nets, age_s}, items with value / footprint / position, and a cropped PNG with the focus outlined. Empty refs with a box or point means the user means that AREA. Use refs / pins in sch_apply, pcb_place, pcb_route; box_mm in render(crop=...). Examples: focus() · focus(wait=60) · focus(action='resolve', document='pcb', box=[100,100,120,115])
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "focus"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| box | No | resolve: [x0,y0,x1,y1] mm — everything inside or touching | |
| near | No | resolve: [x,y] mm — nearest part and pin | |
| side | No | resolve (pcb): only footprints on this side (default both; a pad under the point beats a bare courtyard) | |
| wait | No | get: seconds to wait for the user's next click/box (0 = don't wait, max 300) | |
| sheet | No | resolve (schematic): sheet path or name, e.g. '/' or '/amp/left' (default root) | |
| action | No | ||
| launch | No | open: also open the user's browser (default true) | |
| radius | No | resolve near: search radius mm (default 5.08 schematic, 3 pcb) | |
| render | No | attach the cropped PNG of the focus (default true) | |
| source | No | get: auto (default) = whichever the user touched last; kicad = the PCB editor selection (needs KiCad's IPC API; KiCad has none for schematics) | |
| project | No | project path (default: active) | |
| document | No | resolve: which document the mm coordinates are in |