find_parts
Search DigiKey or JLCPCB for new or replacement parts by parameter filters, returning stock, price, distributor info, and datasheet links to select a component.
Instructions
Find new parts or replacement parts by their parameters (a parametric search) at DigiKey (official API) or in the JLCPCB parts library (a local database for the JLCPCB assembly). Call part_parameters first to get the names and values of the parameters. Gives each filter with its status, and for each part: MPN, manufacturer, distributor number, state or library class, stock, price, the filtered parameters, datasheet and product URL. A numeric filter compares the first number of a value ("2.5V, 8V" gives 2.5 V). A distributor keeps one or few values of a parameter at its own conditions: read each value that the design needs in the datasheet (get_page_image) and save it with save_fact. When the user selects a candidate: adopt_part(source, number) adds its datasheet, the part and its purchase source (not add_document and project_add_part: they save no purchase source). When the source is not available, the error gives the steps for the user: give them to the user.
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": {
"source": "<source>",
"category": "<category>"
},
"name": "find_parts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | A folder of the user project (default: the working folder of the server). The project file datasheet-lens.toml is in it or in a parent folder. | |
| sort | No | stock (most first) or price (lowest first). | stock |
| limit | No | The number of parts, 1 to 50 (jlcpcb: 1 to 100). | |
| offset | No | Skip this number of parts (the next page). | |
| source | Yes | The source of the search: digikey (stock and lifecycle state at DigiKey) or jlcpcb (the JLCPCB parts library: JLCPCB stock for the assembly and library class Basic, Preferred or Extended; it applies a condition such as "rds_on <= 10 mOhm at Vgs<=2.5V" to the points that the data lists). distributor_status tells which source is available. | |
| filters | No | The filters, each "NAME OP VALUE". OP: = < <= > >= has. NAME: a parameter of part_parameters (full name, short name or a unique part of the name; a part of the name that fits more parameters gives the candidates, and the search does not run). = and has accept more values with | (one of them). Examples: "vdss >= 20 V", "channel = N-Channel", "package has 3x3|3.3x3.3", "drive <= 2.5V" (the short names differ for each source: part_parameters gives them; drive is a name of DigiKey only). A condition after "at" ("rds_on <= 10 mOhm at Vgs<=2.5V"): DigiKey does not apply it; jlcpcb applies it to the points that the data lists. Read that value in the datasheet. | |
| category | Yes | The category at the source: its name or a part of its name, for example "mosfet". A text that fits more categories gives the list to select from, with the names in quotes. DigiKey: also its ID. JLCPCB: a subcategory name or "CATEGORY > SUBCATEGORY", more with |, for example "MOSFET|MOSFETs". | |
| in_stock | No | True: only parts with stock (jlcpcb: with JLCPCB stock for the assembly). False: also the parts with no stock (jlcpcb: marked NOT IN STOCK; digikey: stock 0). | |
| keywords | No | Words that the parts must have. Usually empty. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |