Skip to main content
Glama

Compare two components

compare_components
Read-only

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toleranceNoTolerance for floating-point comparisons in mm (default: 0.001)
filepath_aYesPath to the first library file (.PcbLib or .SchLib)
filepath_bYesPath to the second library file (can be same as filepath_a)
component_aYesName of the first component
component_bYesName of the second component
include_geometryNoInclude detailed geometry comparisons for primitives (default: true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description reinforces this with 'Read-only'. It adds valuable behavioral context: identity (GUIDs, unique ids) is never a difference, geometry compares within tolerance, unmatched items are reported per side, and include_geometry=false changes the comparison to counts/properties only. It also discloses the return summary fields (identical, difference_count, differences, per-kind count summaries).

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?

The description is dense but well-organized: it front-loads the core comparison scope, then details geometry behavior, then gives usage routing. It is longer than the minimum but every sentence adds information; the only minor inefficiency is the long enumeration of primitive kinds, which could be summarized, but it is valuable for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only comparison tool with no output schema, the description covers the input constraints, the comparison semantics, the effect of the optional flag, and the return summary fields. It does not describe the exact structure of the differences output, but it names the key fields and the per-kind summaries, which is sufficient for an agent to invoke it correctly.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all six parameters. The description adds context for tolerance (mm, default 0.001) and include_geometry behavior, but does not add meaning beyond what the schema provides for filepath_a, filepath_b, component_a, and component_b. Baseline 3 is appropriate.

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?

The description states a specific verb ('Compare'), a clear resource ('two named components'), and enumerates exactly what is compared (description, parameters, per-primitive-kind details). It also distinguishes itself from siblings by naming diff_libraries and get_component as alternatives, so an agent can select it correctly.

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?

Explicitly says when to use this tool: after diff_libraries to drill into a specific pair, and when to use get_component instead for a single component's full data. It also states the type-matching constraint (.PcbLib with .PcbLib, .SchLib with .SchLib), which is essential for correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.