project_add_part
Add an orderable part and its linked datasheet or documents to a user project so project sync copies those files into the project folder.
Instructions
Add a part to the user project, with the documents that the store links to it. Then project_sync copies the documents into the project folder. A link of a document to the store part stays in the store (no tool removes it): check the MPN and the base part before you give document. A new part of the design: 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. The manufacturer of a datasheet comes from the datasheet: when the tool cannot read it, or the given name differs, the result asks (ASK THE USER) and adds nothing. Gives the part and its documents.
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": {
"mpn": "<mpn>"
},
"name": "project_add_part"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mpn | Yes | The concrete orderable MPN that the design (the BOM) uses, with its package, voltage or grade, for example TLV75533PDBVR. A base part MPN only for a short time, when the BOM has no concrete one yet: the result then gives a note. | |
| base | No | The base part of the datasheet, for example TLV755P. The concrete part gets the documents of the base part. | |
| 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. | |
| role | No | The role of the document: datasheet, manual, errata, appnote, package (a package drawing in its own document) or other. | datasheet |
| category | No | The function of the part, for example ADC, LDO, MCU, flash, sensor. The layout of the project folder can use it as a folder name: use the values that the project has already (project_status). | |
| document | No | A document to link first: its reference from project_status, list_documents or add_document. The link is in the central store (to the base part, if base is given), and other projects with this part get the document too. | |
| manufacturer | No | The manufacturer, any of its names (the store knows the names of one manufacturer). The layout of the project folder can use it as a folder name: use the name that the project has already (project_status). | |
| 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 |