adopt_part
Add a selected distributor part to the project: stores its datasheet and purchase source, flags lifecycle warnings, and prepares confirmed CAD updates.
Instructions
Take a part that find_parts or search_distributors found: add its datasheet (one in the store, else a download: the site of the manufacturer first), add the part to the store and to the user project, and save the purchase source (the source and its part number; for JLCPCB the library class) in the store and in the project file. Use it when the user selects a candidate. The result gives the lifecycle state of the manufacturer from the distributors with a key: a WARNING (obsolete, last time buy, not for new designs) goes to the user, also when the source has stock. Then project_sync copies the datasheet into the project folder. The element map builds in the background. Read the values that the design needs in the datasheet and save them with save_fact. When no URL gives the datasheet (a login, a captcha), the result gives the URLs and the inbox folder of the project: give them to the user. A part with a new MPN becomes a new project part: to replace a project part (a replacement of project_availability), first the user agrees and the CAD project changes, then project_update_part(mpn, new_mpn), then adopt_part. The manufacturer of the part comes from its datasheet, not from the distributor: when the tool cannot read it, or the two names differ, the result asks (ASK THE USER) and adds nothing. A purchase source is added, not replaced: project_remove_source removes a wrong one. The CAD BOM is the master: write the change that the user confirmed into the CAD project too (MPN, MPN_Confirmed, Value_Confirmed, LCSC, Manufacturer, Distributor; kicad-workbench: set_symbol_fields), then project_check.
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>"
},
"name": "adopt_part"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mpn | No | The MPN, in place of number: the source must have one part for it. | |
| base | No | The base part of the datasheet, for example TLV755P for TLV75533PDBVR. Empty: the MPN. | |
| 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. | |
| number | No | The part number of the source: a DigiKey number, a JLCPCB C number (C47616) or a Mouser number, as find_parts or search_distributors give it. Give number or mpn, not both. | |
| source | Yes | digikey, jlcpcb or mouser. | |
| category | No | The function of the part, for example MOSFET or LDO. | |
| manufacturer | No | The manufacturer as the datasheet names it, from the user. Give it only when a result of adopt_part asks for it (ASK THE USER). | |
| manufacturer_confirmed | No | True when the user read page 1 of the datasheet and confirms the given manufacturer, for example the maker of a module whose datasheet names the maker of its chip more often: the tool does not compare it with the text of the PDF. Give it only when the user confirms it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |