Skip to main content
Glama

Find Alternative Parts

find_alternative
Read-onlyIdempotent

Find alternative / second-source components for a given MPN. Returns parts ranked by how closely their specs, package, and category match the reference part, with a match_score and match_notes explaining each match.

When to use:

  • Original part is out of stock or end-of-life.

  • You need a cheaper equivalent with similar specs.

  • You need a second source for supply-chain resilience.

  • You need a drop-in replacement on an existing PCB (use constraints=['same_package'], then verify pinout and dimensions).

When NOT to use:

  • You're browsing a category from scratch — use search_parts.

  • You already have candidates and want a head-to-head comparison — use compare_parts directly.

Behavior:

  • Eval boards, dev kits, and breakout modules are filtered out — results are IC-level alternatives only.

  • 'same_package' uses fuzzy matching, so SOT-23 ≡ SOT23, SOIC-8 ≡ SOP-8, LQFP64 ≡ TQFP64, etc. Exact string match is not required.

  • Searches by function across manufacturers and compares available named electrical specs. Package data is enriched from provider parameters and cached catalogue/ordering data. Scores indicate similarity, not verified electrical or pin compatibility.

  • Constraints are never relaxed: unknown stock or package cannot satisfy in_stock or same_package. When nothing matches, the call returns error_type 'not_found' (not charged) with the parts that would match without the constraints, under matches_without_constraints.

  • Also searches the part's own family in datasheets SheetsData has already read (e.g. CH340C for CH340G).

  • If provider search returns few candidates, the tool falls back to semantic search across extracted datasheets to surface niche alternatives.

  • The response includes a 'hint' field pointing to compare_parts / read_datasheet for drilling into promising alternatives.

Example: find_alternative('TPS54302', constraints=['same_package', 'in_stock'])

DATASHEET STATUS VALUES:

  • 'ready' — extracted and indexed; call read_datasheet, search_datasheets, or analyze_image.

  • 'extracting' / 'in_progress' / 'queued' / 'pending' — extraction running or scheduled. Poll check_extraction_status every 10-15s until 'ready' or 'failed'. A datasheet nobody has read before usually takes 1-3 minutes; a large one can take 5 or more.

  • 'resolving' — we're still looking for the datasheet's PDF (distributors, then a web search; under a minute a part, longer for a big batch). Not final: keep polling check_extraction_status.

  • 'not_extracted' — known part but datasheet hasn't been fetched yet. Trigger it via prefetch_datasheets (up to 20 parts) or by calling read_datasheet (auto-triggers on first read).

  • 'no_source' — the search for a public datasheet has finished and found none for this MPN. Check the part number (search_parts), or retry prefetch_datasheets later. Otherwise upload the PDF via request_datasheet_upload + confirm_datasheet_upload (see those tools). Org-uploaded datasheets are private to the org.

  • 'unsupported' — PDF exists but can't be extracted (scanned image-only, encrypted, or corrupted). Upload a clean text-based PDF via request_datasheet_upload to override.

  • 'failed' / 'error' — extraction errored. The response includes the error reason. Retry via prefetch_datasheets or escalate to support.

  • 'rejected' — input wasn't a real MPN (bare value like '100nF', description, or reference designator). Fix the input and re-call.

  • 'deduplicated' — another part in the family already has this datasheet; same content is returned under the primary MPN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax alternatives to return (default 5, max 20).
constraintsNoOptional filters to narrow alternatives. 'in_stock' = only parts with non-zero stock at any provider. 'same_package' = package footprint must match (fuzzy). 'jlcpcb' = must be available at JLCPCB (useful for JLCPCB-assembled boards — also restricts the provider search to JLCPCB).
part_numberYesThe MPN to find alternatives for

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / constraints / default
      Previous value: -""New value: +[]
    • changedInput schema / properties / constraints / description
      Previous value: -"Optional constraints: 'in_stock' (only parts in stock), 'same_package' (must match package), 'jlcpcb' (available at JLCPCB). Comma-separated."New value: +"Optional filters to narrow alternatives. 'in_stock' = only parts with non-zero stock at any provider. 'same_package' = package footprint must match (fuzzy). 'jlcpcb' = must be available at JLCPCB (useful for JLCPCB-assembled boards — also restricts the provider search to JLCPCB)."
    • addedInput schema / properties / constraints / items
      Added value: +{
      +  "enum": [
      +    "in_stock",
      +    "same_package",
      +    "jlcpcb"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / constraints / type
      Previous value: -"string"New value: +"array"
    • changedInput schema / properties / limit / description
      Previous value: -"Max alternatives to return (default 5)"New value: +"Max alternatives to return (default 5, max 20)."
    • addedInput schema / properties / limit / maximum
      Added value: +20
  2. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.