Skip to main content
Glama

filter_components

Filter components by library ID, value, pattern, or footprint; returns parts matching all criteria for KiCad schematics and BOMs.

Instructions

Filter components by various criteria.

Returns components matching the specified filter criteria. All provided criteria must match (AND logic).

Args: lib_id: Filter by library ID (exact match, e.g., "Device:R") value: Filter by value (exact match, e.g., "10k") value_pattern: Filter by value pattern (substring match, e.g., "10") footprint: Filter by footprint (exact match) ctx: MCP context for progress reporting (optional)

Returns: Dictionary with success status and list of matching components

Examples: >>> # Find all resistors >>> result = await filter_components(lib_id="Device:R") >>> print(f"Found {result['count']} resistors")

>>> # Find all 10k resistors
>>> result = await filter_components(lib_id="Device:R", value="10k")

>>> # Find all components with "100" in value
>>> result = await filter_components(value_pattern="100")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueNo
lib_idNo
footprintNo
value_patternNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It discloses the AND-combination rule and states the return shape (success status + matching list), which is meaningful. But it says nothing about permissions, result limits, ordering, or whether an empty match is an error—relevant behavioral context for a query tool is absent.

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 core definition is front-loaded and the examples are genuinely instructive rather than filler. The Args/Returns docstring formatting is slightly verbose for a tool description, but every section carries information, so it is appropriately sized.

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?

An output schema exists, so return values need not be re-documented; the description's job is otherwise done—all four params are explained and the AND semantics are stated. The only gap is the absence of any guidance relative to sibling tools like list_components, minor given the complete parameter documentation.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate and it does: each parameter is documented with its matching mode (lib_id/value exact match, value_pattern substring match, footprint exact match) plus concrete examples like "Device:R" and "10k". This adds real semantic value beyond the bare nullable strings in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Filter components') and immediately clarifies the matching semantics (all criteria must match, AND logic). It is clearly a filtered lookup, distinguishable in intent from list_components, but it never names or contrasts with that sibling, so it falls short of full sibling differentiation.

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

Usage Guidelines3/5

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

The examples implicitly show when to use the tool (by lib_id, by value, by substring), giving useful context. However, there is no explicit when-not guidance and no reference to alternatives such as list_components, so an agent must infer the boundary between filtering and listing.

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