pcbviber
v0.3.2Work inside a live Altium Designer session: audit projects, run DRC, export outputs, look up parts.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_parts
Search electronic components by MPN, description, or specs. Returns stock, pricing, datasheets, and lifecycle info from Octopart/Nexar.
| Parameter | Type | Description |
|---|---|---|
query * | string | Part number, description, or parametric search (e.g. '100uF 25V capacitor MLCC') |
limit | integer | Max results to return |
check_part_availability
Check real-time stock and pricing for a specific manufacturer part number (MPN). Returns supplier inventory, MOQ, and pricing tiers.
| Parameter | Type | Description |
|---|---|---|
mpn * | string | Exact manufacturer part number |
find_alternative_parts
Find alternative/substitute parts for a given MPN.
| Parameter | Type | Description |
|---|---|---|
mpn * | string | |
criteria | string |
list_workspaces
List all Altium 365 workspaces the authenticated user has access to.
get_project_details
Get detailed information about an Altium 365 project including revision history, schematic structure, and PCB configuration.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | Project ID from list_projects |
workspaceUrl * | string | Altium 365 workspace URL |
create_project
[Phase 2] Create a new project in an Altium 365 workspace with initial configuration.
| Parameter | Type | Description |
|---|---|---|
name * | string | Project name |
workspaceUrl * | string | Altium 365 workspace URL |
description | string | Project description |
template | string |
get_project_bom
Retrieve the Bill of Materials (BOM) for an Altium 365 project.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
workspaceUrl * | string | |
includeAlternatives | boolean |
analyze_bom_cost
Analyze BOM cost at different production quantities.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
workspaceUrl * | string | |
quantities | array |
export_manufacturing_data
[Phase 2] Export Gerber, ODB++, pick-and-place data, or IPC-2581 for a project release.
| Parameter | Type | Description |
|---|---|---|
format * | string | |
projectId * | string | |
workspaceUrl * | string | |
releaseId | string |
run_drc_summary
[Phase 2] Get the latest Design Rule Check (DRC) results for a project.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
workspaceUrl * | string |
check_production_readiness
Run a production readiness checklist for a project.
| Parameter | Type | Description |
|---|---|---|
projectId * | string | |
workspaceUrl * | string |
ad_ping
Smoke test: round-trips a ping to Altium Designer via the relay. Returns the AD version string on success. Use this first to verify AltiumRelay.js is running inside AD.
ad_status
Relay connection diagnostics. Shows whether Altium Designer is polling, recent command stats, and queue depth. Does NOT require AD to be connected.
ad_tail_log
Return the last N lines of the AltiumRelay script log (%TEMP%\AltiumRelay.log). Useful for debugging relay behavior without having to SSH to the machine running AD. Does NOT require AD to be connected.
| Parameter | Type | Description |
|---|---|---|
lines | integer |
pcbviber_selftest
Run a full diagnostic: server version, relay status, live ad_ping (with latency), active project, and a tail of the AD-side log. Single call — everything you need to know whether PCBviber is healthy end-to-end. Skips AD-side calls gracefully if the relay is disconnected so the report always returns fast.
| Parameter | Type | Description |
|---|---|---|
includeLog | boolean | |
logLines | integer |
ad_get_active_project
Returns metadata about the project currently open and focused in Altium Designer: path, name, loaded documents, and active document.
ad_open_project
Open an Altium Designer project (.PrjPcb / .PrjSch) from disk. The project becomes the active one.
| Parameter | Type | Description |
|---|---|---|
path * | string | Full path to .PrjPcb / .PrjSch file |
ad_new_project
[EXPERIMENTAL] Create a new empty PCB project at the given path, optionally with a blank schematic document. Parent directories are auto-created. Useful for setting up minimal test projects.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Full path where the .PrjPcb will be saved (parent dirs auto-created) |
addSchematic | boolean | Also create and save an empty .SchDoc as a project source document |
ad_save_project
Save the active (or specified) project to disk. Returns the saved path.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Project path; omit to save the active project |
ad_list_documents
List the source documents (schematics, PCB, OutJobs, scripts) of the active (or specified) project, including each document's file path and kind.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Omit for the active project |
ad_get_board_info
Read the currently-focused PCB document and return layer count, board outline dimensions in mm, component count, and net count. Read-only.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Omit for the active project |
ad_get_stackup
Return the PCB's layer stack: ordered layers with name, kind (signal/plane/dielectric/solder-mask), material, and thickness. Total stack-up thickness is computed in mm.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Omit for the active project |
pcbviber_audit_project
Audit the current PCB project against the 9-stage professional design flow. Calls the safe read-only AD tools in parallel, maps findings to stages (infrastructure → components → schematic → layout → rules → placement → routing → verification → manufacturing docs), and returns completion status + prioritized next actions. Use this to understand where a half-built project stands and what to do next. Does not modify the project.
| Parameter | Type | Description |
|---|---|---|
includeScreenshot | boolean | |
projectPath | string |
ad_debug_introspect_messages
[DIAGNOSTIC] Probe the live DM_MessagesManager object for accessor names (count methods, iteration methods, per-message fields). Use when ad_get_messages reports that DM_MessageCount / DM_Messages are unavailable — the report shows which accessors this AD build actually exposes so EnumerateMessages can be patched to match. Read-only.
ad_screenshot
Capture a PNG screenshot of Altium Designer's main window (default) or the full virtual desktop. Returns the image inline so it can be viewed. Runs locally via PowerShell; does NOT require the AD relay.
| Parameter | Type | Description |
|---|---|---|
maxWidth | integer | |
target | string |
ad_compile_project
Compile the active (or specified) project. This triggers ERC as a side effect — the result includes ERC messages.
| Parameter | Type | Description |
|---|---|---|
projectPath | string | Project path; omit to compile the currently-active project |
ad_annotate_schematic
Run silent annotation on schematics of the active project, assigning designators in the specified order.
| Parameter | Type | Description |
|---|---|---|
order | string | |
projectPath | string |
ad_generate_outputs
Run an OutJob file to generate manufacturing outputs (Gerber, BOM, PDF, etc.). Returns the list of output files produced.
| Parameter | Type | Description |
|---|---|---|
outJobName | string | |
projectPath | string |
ad_auto_place
Run Altium's auto-placement algorithm on unplaced components on the active PCB. 'cluster' groups by connectivity, 'statistical' uses thermal/electrical heuristics.
| Parameter | Type | Description |
|---|---|---|
algorithm | string | |
projectPath | string |
ad_auto_route
Run Altium's Situs auto-router. Scope 'all' routes the entire board, 'selected' routes the current selection, 'net' routes a single named net.
| Parameter | Type | Description |
|---|---|---|
netName | string | Required when scope = 'net' |
projectPath | string | |
scope | string |
list_projects
List every project the workspace exposes — Altium 365 projects via Nexar (requires the workspace's Altium 365 URL be configured) or EasyEDA Pro projects via the in-editor extension. Returns id + name per entry; use `get_active_project` if you want the one currently focused in the editor.
get_active_project
Return the project currently active in the EDA editor (the schematic/PCB the user is looking at). Works across Altium and EasyEDA. Returns id + name + the platform's raw project payload for tools that need richer fields.
list_schematic_components
List components on the active schematic, paginated. Each entry has primitiveId + designator + value + the platform's raw payload. Pass offset+limit to page through long schematics; the response carries `nextOffset` (null when the page is the last). EasyEDA today; Altium ships in a follow-up that extends the AD relay.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max components to return. Defaults to 200; capped at 500 to stay under relay timeouts. |
offset | integer | Skip the first N components. Defaults to 0. |
get_components
Read placed components on the active PCB with full layout fields — designator, mpn, footprint, x, y (mm, board-local), layer (top/bottom/inner), rotation (degrees), locked. Cross-platform; coordinates are normalized to mm at the relay boundary. Pair this with `screenshot` for visual verification before any move/rotate operations. Use `list_pcb_components` instead when you only need designator + footprint (cheaper round-trip).
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max components to return. Defaults to 200; capped at 500 to stay under relay timeouts. |
offset | integer | Skip the first N components. Defaults to 0. |
export_gerbers
Export the active project as a Gerber zip. Returns metadata + a download URL — the AI never sees the raw bytes (use the URL to retrieve or pass to downstream tools like JLCPCB ordering). Cross-platform: EasyEDA via the in-editor extension's pcb_ManufactureData (BETA); Altium needs hands-on OutJob wiring per the Sprint 13 follow-up. Pair with `screenshot` first to confirm the project is in the right state.
export_drill
Export Excellon drill files for the active PCB. EasyEDA returns DSN format (full Excellon conversion may be needed for some fab houses); Altium needs hands-on OutJob wiring. Returns metadata + download URL.
export_bom
Export the project BOM as CSV. EasyEDA includes LCSC part numbers when available (useful for JLCPCB ordering); Altium BOMs follow the project's BOM template configuration. Pair with `list_library_components` if you need richer per-part data.
| Parameter | Type | Description |
|---|---|---|
withLcsc | boolean | Include LCSC part numbers in the CSV (EasyEDA only). Defaults to true. No-op on Altium. |
export_pick_and_place
Export pick-and-place CSV (designator, footprint, x, y, rotation, layer) for the active PCB. Pair with `get_components` to inspect placement state before exporting.
production_readiness_check
Composite 'is this board ready for fab?' check. Runs DRC + manufacturing exports + three DFM rules (drill aspect ratio, copper-near-edge clearance, fiducial presence) in one call. Returns a structured pass/fail per category with actionable details. The `ready` field is true iff zero error-severity checks failed — warnings (export failures, fiducial count below recommendation) are surfaced for AI reasoning but don't block. Cross-platform; reuses the primitives from PR 13.1 (exports), PR 13.2 (DRC), PR 11.1 (components).
| Parameter | Type | Description |
|---|---|---|
boardThicknessMm | number | Board thickness for drill-aspect calculation, mm. Default 1.6 (typical 2-layer FR4). |
copperEdgeClearanceMm | number | Min copper-to-edge clearance in mm. Default 0.2. |
drillAspectThreshold | number | Drill aspect ratio threshold (hole / board thickness). Default 0.4 — typical for plated through-holes. |
minFiducials | integer | Min number of fiducials required. Default 3 (industry standard for SMT alignment). Pass 0 to skip the check entirely. |
run_drc
Run Design Rule Check on the active PCB and return structured violations. Each entry has category (Clearance/Width/etc.), severity (info/warning/error), human-readable message, optional location (mm), and optional designators/nets involved. The `passed` field is true only when there are zero error-severity violations — warnings and info are surfaced for AI reasoning but don't fail the run. Cross-platform: Altium parses the Messages panel after triggering DRC; EasyEDA uses pcb_Drc.check verbose-error mode (BETA).
xsignals_status
Read current xSignal length-tuning state. Each entry has signal name, target length, current routed length, and matched percent. Cross-platform contract: Altium parses status from the Messages panel (best-effort — pair with `run_drc` first to refresh); EasyEDA returns supported:false by design (xSignals is an AD-only concept). The supported:false case is NOT a tool failure — it's the documented platform exclusivity.
via_stitch_plane
Generate a grid of vias tied to `net` (typically GND) across the board area. Used after a plane is poured to improve return-path stitching. Stitches over the whole board with collision skipping (components, keepouts, existing vias, edge clearance) — not just the net's plane region (plane-region detection is a future PR). Default density 5mm, edge clearance 1.5mm. Pair with `screenshot` for visual confirmation.
| Parameter | Type | Description |
|---|---|---|
net * | string | Target net for the via stitching, typically 'GND'. |
densityMm | number | Grid spacing between via centers in mm. Defaults to 5; clamped to 1mm minimum to prevent pathological grids (a 100×100 board at 0.5mm = 40k vias). 50mm cap is sane for boards larger than typical. |
edgeClearanceMm | number | Skip vias within this far of the board edge. Defaults to 1.5mm. |
route_diff_pair
Trigger the platform's native differential-pair router on a (positiveNet, negativeNet) pair. The pair MUST be declared in the project before this is called — Altium: PCB > Design > Differential Pair Editor; EasyEDA: pair config in the Pro UI. The tool's `routed: true` indicates the router laid traces; `routed: false` means the router ran but couldn't find a path (try adjusting layer / spacing rules and retry). Pair with `screenshot` for visual confirmation. Cross-platform; both implementations are best-effort wrappers around platform-native routers.
| Parameter | Type | Description |
|---|---|---|
negativeNet * | string | Negative net name in the diff pair, e.g. 'USB_DN'. |
positiveNet * | string | Positive net name in the diff pair, e.g. 'USB_DP'. |
unroute_net
Delete all traces + vias on a given net. Locked traces/vias are skipped (user-intentional placement) and counted separately so the AI can decide whether to unlock + retry. Net-not-found and 'net has no traces' both succeed with zero counts. No undo — pair with `screenshot` for visual confirmation. Cross-platform.
| Parameter | Type | Description |
|---|---|---|
net * | string | Net name to unroute, e.g. 'VCC' or 'GND'. |
get_design_rules
Read all design rules on the active PCB. Each entry has name + kind (clearance/width/via/other) + scope (all/net/net-class) + kind-specific values (clearanceMm, widthMm.{min,preferred,max}, viaMm.{holeDiameter,padDiameter}). Cross-platform; coordinates in mm. Pair with `set_route_rule` to mutate one. The `other` kind preserves any rule category v1 doesn't normalize — read its raw payload for finer detail.
set_route_rule
Update or create a design rule. Discriminated by `kind` — only the matching value field is used. Three kinds in v1: 'clearance' (single number, mm), 'width' (min/preferred/max, mm), 'via' (hole + pad diameter, mm). Pair with `get_design_rules` to inspect current state before mutating. Cross-platform; the EasyEDA write does an internal read-modify-write since the API only exposes full-config writes.
| Parameter | Type | Description |
|---|---|---|
kind * | string | Which value-shape applies. v1 supports the three core kinds; other rule categories are read-only. |
name * | string | Rule name. Updates an existing rule, or creates one if missing. |
clearanceMm | number | Required when kind='clearance'. |
scope | object | Scope DSL. Defaults to {type: 'all'} when omitted. |
viaMm | object | Required when kind='via'. |
widthMm | object | Required when kind='width'. |
get_net_routing
Read per-net routing summary on the active PCB, paginated. Each entry has total trace length (mm), layer split (mm per layer), via count, and unrouted-segment count. Cross-platform; coordinates aggregated in mm, layers normalized to top/bottom/inner/unknown. Pair with `screenshot` for visual + numeric verification of routing completeness. EasyEDA support depends on the extension's pcb_Net.getAll accessor — surfaces a clear supported:false reason when unavailable.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max components to return. Defaults to 200; capped at 500 to stay under relay timeouts. |
offset | integer | Skip the first N components. Defaults to 0. |
place_by_group
Filter components by an AND-joined `key=value` expression and apply a layout strategy. Filter fields: designator, footprint, mpn, layer (with `*` glob support). Strategies: 'grid' (row-major, good for arrays), 'around-component' (circular ring, good for decoupling caps around an MCU), 'on-edge' (line along board edge, good for connectors). Locked components are obstacles, never moved. Returns matched/moved/skipped designator lists.
| Parameter | Type | Description |
|---|---|---|
filter * | string | AND-joined filter, e.g. 'footprint=0402 AND designator=R*'. Fields: designator, footprint, mpn, layer. Use `*` for glob. |
strategy * | string | Layout strategy. See tool description for what each does. |
around | object | Required when strategy='around-component'. |
edge | object | Required when strategy='on-edge'. |
grid | object | Required when strategy='grid'. |
obstacleClearanceMm | number | Avoid placing within this many mm of locked components. Default 0.5. |
validate_placement
Check the active PCB for component overlap and spacing-rule violations. Returns structured violations the AI can reason about: type (overlap/spacing), the two designators, distance/overlap depth in mm, and a human-readable message that includes lock status + approximate-bbox flags. Cross-platform; results are identical across Altium and EasyEDA. Default spacing rule is 0.2mm (typical IPC-7351 hand-placed). Pairs where both components are locked are skipped (user-intentional placement).
| Parameter | Type | Description |
|---|---|---|
spacingMm | number | Minimum edge-to-edge clearance in mm between component bodies. Defaults to 0.2 (typical IPC-7351 hand-placed). Pass 0 to check overlap only. |
get_keepouts
Read every keepout on the active PCB. Returns kind (placement/routing/via/all), layer (top/bottom/inner/all), polygon vertices in mm, and the platform's raw payload. Cross-platform; coordinates are normalized to mm at the relay boundary. Pair with `validate_placement` to check whether components violate any keepout. EasyEDA support depends on the in-editor extension's pcb_PrimitiveRegion API being exposed (open spike question — if unavailable, the tool surfaces a clear supported:false reason).
move_component
Move a placed component on the active PCB to (x, y) in millimeters (board-local origin). Cross-platform — Altium converts mm to its native 1/10000-mil at the relay boundary; EasyEDA stores mm natively. Refuses to mutate locked components (call `lock_component` first to unlock). Multiple components sharing a designator → error rather than silent first-match. Pair with `screenshot` to verify the change.
| Parameter | Type | Description |
|---|---|---|
designator * | string | Designator (e.g. 'R1', 'U7'). Cross-platform stable identity. |
x * | number | Target X in millimeters. |
y * | number | Target Y in millimeters. |
rotate_component
Rotate a placed component to `rotation` degrees (0–360, normalized). Refuses to mutate locked components — call `lock_component` first. Cross-platform.
| Parameter | Type | Description |
|---|---|---|
designator * | string | Designator (e.g. 'R1', 'U7'). |
rotation * | number | Rotation in degrees, 0–360. Negative inputs get normalized; common values 0/90/180/270. |
lock_component
Lock or unlock a placed component. Locked components reject move/rotate calls — this is the way to unlock something so the AI can mutate it.
| Parameter | Type | Description |
|---|---|---|
designator * | string | Designator (e.g. 'R1', 'U7'). |
locked * | boolean | True to lock, false to unlock. |
list_pcb_components
List components placed on the active PCB, paginated. Each entry has primitiveId + designator + footprint + the platform's raw payload. Pass offset+limit to page through dense boards; the response carries `nextOffset` (null when the page is the last). EasyEDA today; Altium ships in a follow-up that extends the AD relay (Sprint 11 PR 11.1's `get_components` adds the placement payload).
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max components to return. Defaults to 200; capped at 500 to stay under relay timeouts. |
offset | integer | Skip the first N components. Defaults to 0. |
list_library_components
List components from the workspace's library (parts available to place), paginated. Cross-platform: Altium 365 workspace library via Nexar; EasyEDA Pro via the in-editor extension's lib_Device. EasyEDA results are optionally enriched with Octopart per-distributor stock + pricing (looks up each entry by MPN/LCSC). Each entry has id + name + the platform's raw payload, plus footprint/manufacturer/mpn/lcscId/lifecycle/octopart when available.
| Parameter | Type | Description |
|---|---|---|
enrichWithLcsc | boolean | EasyEDA only: when true (default), cross-reference each result by MPN/LCSC via Nexar/Octopart and merge per-distributor stock into the `octopart` field. Skipped automatically when Nexar isn't configur… |
limit | integer | Max components to return. Defaults to 200; capped at 500 to stay under relay timeouts. |
offset | integer | Skip the first N components. Defaults to 0. |
screenshot
Capture a PNG screenshot of the active EDA editor window. Works across all supported platforms (Altium Designer via local PowerShell capture; EasyEDA Pro via in-editor extension). Returns the image inline so the AI can see it. Pair this with any layout-modifying tool to verify the change visually.
get_messages
Read DRC + ERC + compile output from the platform's messages panel. Cross-platform: Altium reads the Messages panel's accumulated state (populated by prior runs); EasyEDA actively runs sch_Drc.check + pcb_Drc.check and returns their combined output. Same logical answer either way — what's wrong with this design? Defaults filter out info-class noise; pass minSeverity:'info' to see everything.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max messages to return after severity filtering. Defaults to 200; capped at 500 to keep the rendered output bounded for chatty boards. |
minSeverity | string | Drop entries below this severity. Defaults to 'warning' — info-class messages are mostly compile/build chatter that rarely helps AI reasoning. Pass 'info' to see everything. |