Compare two components
compare_componentsCompare two components from .PcbLib or .SchLib files and report all differences in parameters, primitives, and geometry with per-kind summaries. Use to identify what changed between two component designs.
Instructions
Compare two named components — from one library or two of the same type (.PcbLib with .PcbLib, .SchLib with .SchLib) — and report every difference: description and parameters, then per primitive kind: pads, vias, tracks, arcs, regions, text, fills and 3D bodies of a footprint; pins, every graphic shape, parameters and footprint links of a symbol. Geometry compares within tolerance (mm, default 0.001) and unmatched items are reported per side; include_geometry false compares counts and properties only. Identity (GUIDs, unique ids) is never a difference. Read-only; returns identical, difference_count, the differences and per-kind count summaries. Use diff_libraries first to find which components differ between two whole libraries, then this tool on one pair; use get_component for one component's full data rather than a comparison.
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": {
"filepath_a": "<filepath_a>",
"component_a": "<component_a>",
"filepath_b": "<filepath_b>",
"component_b": "<component_b>"
},
"name": "compare_components"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tolerance | No | Tolerance for floating-point comparisons in mm (default: 0.001) | |
| filepath_a | Yes | Path to the first library file (.PcbLib or .SchLib) | |
| filepath_b | Yes | Path to the second library file (can be same as filepath_a) | |
| component_a | Yes | Name of the first component | |
| component_b | Yes | Name of the second component | |
| include_geometry | No | Include detailed geometry comparisons for primitives (default: true) |