Skip to main content
Glama

Find Alternative Parts

find_alternative
Read-onlyIdempotent

Costs 2¢ per call. Finds alternative and second-source parts for an MPN that is out of stock, end of life or too expensive, ranked by match_score with match_notes. Candidates come from provider search and from parts with the same function in our own datasheet index; they must do the same job (an accelerometer is not offered for a 6-axis IMU) and are compared on named electrical specs. Each has a lifecycle, stock and datasheet_status; obsolete and NRND parts rank last. Constraints: 'same_package' (fuzzy: SOT-23 ≡ SOT23, SOIC-8 ≡ SOP-8), 'in_stock', 'jlcpcb'. They are never relaxed silently: a candidate that fails one is left out of alternatives, removed_by_constraints counts what each removed, and when that leaves too few, relaxed_matches lists the best ones with the constraints they failed. When nothing matches at all, the call returns error_type 'not_found' (not charged) with the parts that would match without the constraints, under matches_without_constraints. The part's own family is also searched among datasheets already read (e.g. CH340C for CH340G). A score is similarity, not verified pin or electrical compatibility: check pinout and limits before substituting. Eval boards and modules are excluded. compact=true gives shorter rows (no per-source data or price breaks) and leaves out the reference part's summary unless include_original_summary=true. For a head-to-head of candidates you already have, use compare_parts. Example: find_alternative('TPS54302', constraints=['same_package', 'in_stock']) datasheet_status: 'ready' → read it; 'extracting' / 'queued' / 'pending' / 'resolving' → poll check_extraction_status; 'not_extracted' → prefetch_datasheets; 'no_source' / 'unsupported' → request_datasheet_upload. Full list in the server instructions.

Input Schema

NameRequiredDescriptionDefault
limitNoMax alternatives to return (default 5, max 20).
compactNoReturn the shorter answer: one short row per candidate (identity, lifecycle, stock, cheapest price, providers, match notes) and no reference-part summary. Default false: the full answer.
constraintsNoOptional filters. 'in_stock' = known non-zero stock at some provider. 'same_package' = same footprint (fuzzy). 'jlcpcb' = orderable at JLCPCB (also limits the provider search to JLCPCB).
part_numberYesSpecific manufacturer part number (MPN) or LCSC number (e.g. 'TPS54302DDCR', 'C2837938'). Not a value ('100nF'), description or reference designator ('R1').
include_original_summaryNoWith compact=true, also return the reference part's cached datasheet summary (about 2-3k characters). The full answer always has it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "description": "Return the shorter answer: one short row per candidate (identity, lifecycle, stock, cheapest price, providers, match notes) and no reference-part summary. Default false: the full answer.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / constraints / description
      Previous 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)."New value: +"Optional filters. 'in_stock' = known non-zero stock at some provider. 'same_package' = same footprint (fuzzy). 'jlcpcb' = orderable at JLCPCB (also limits the provider search to JLCPCB)."
    • addedInput schema / properties / include_original_summary
      Added value: +{
      +  "default": false,
      +  "description": "With compact=true, also return the reference part's cached datasheet summary (about 2-3k characters). The full answer always has it.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / part_number / description
      Previous value: -"The MPN to find alternatives for"New value: +"Specific manufacturer part number (MPN) or LCSC number (e.g. 'TPS54302DDCR', 'C2837938'). Not a value ('100nF'), description or reference designator ('R1')."
  2. 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
  3. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the readOnly/openWorld/idempotent annotations: it discloses the 2¢ per-call cost, that constraints are never relaxed silently, that failures surface in removed_by_constraints/relaxed_matches, that not_found is not charged, and that match_score is similarity not verified compatibility. This is exactly the behavioral context an agent needs before invoking.

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?

Front-loaded with cost and purpose, and nearly every sentence earns its place. It is dense and slightly sprawling toward the end (datasheet_status branching plus a pointer to server instructions), which keeps it just below a perfect score.

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

Completeness5/5

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

With no output schema, the description carries the return-shape burden and does so fully: match_score/match_notes, lifecycle/stock/datasheet_status, removed_by_constraints, relaxed_matches, and the not_found error with matches_without_constraints. An agent has everything required to call and interpret it.

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 coverage is already 100%, but the description adds real meaning beyond it: fuzzy package equivalence examples (SOT-23 ≡ SOT23, SOIC-8 ≡ SOP-8), the non-silent-relaxation semantics of constraints, and the compact/include_original_summary interaction ('leaves out the reference part's summary unless include_original_summary=true').

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?

States a specific verb+resource with the triggering conditions: 'Finds alternative and second-source parts for an MPN that is out of stock, end of life or too expensive.' It also explicitly differentiates from the sibling compare_parts ('for a head-to-head of candidates you already have, use compare_parts').

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?

Names when to use it (out of stock, EOL, too expensive) and routes to the alternative tool compare_parts for a different need. It even documents the downstream branching per datasheet_status, telling the agent which sibling to call next.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.