project_availability
Checks lifecycle status and stock for every part in a user project across enabled distributor APIs and the JLCPCB library, returning per-part verdicts, warnings, and replacement options.
Instructions
The lifecycle state and the stock of each part of the user project at the enabled distributors (official APIs) and in the JLCPCB parts library. Gives one verdict for each part from all sources:
A lifecycle risk of the manufacturer at any distributor (OBSOLETE, LAST TIME BUY, NOT FOR NEW DESIGNS), with the state of each distributor: select a replacement also when a source has stock.
A part with a purchase source ([[part.source]]): the offer of its number. "orderable at the purchase source", or a warning with the reasons (not checked, the number is not there or is an other MPN, not orderable, no stock) and the other sources with stock.
A part with no purchase source: "orderable" (the sources with stock), or no stock, not orderable, or no source has the MPN. A part with no warning gets one line with the details of each source. A part with a warning gets one indented line for each source. For a part with a lifecycle risk, no JLCPCB stock, or a loading fee (Extended), the lines "replacement" give parts of the JLCPCB library (the same MPN; resistors, capacitors, inductors with the same parameters), Basic and Preferred first: read the datasheet of a replacement before you propose it. To use a replacement: the user agrees, the CAD project changes, then project_update_part(mpn, new_mpn) and adopt_part. After the parts: the lines of the sources (parts with no purchase source, a source that does not answer, the age of the JLCPCB library). Tell the user about each warning, and give the user each note about a missing API key (see search_distributors). A part of not_fitted (DNP) gets "not fitted (DNP), information only": tell the user, it is no step for the production.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "project_availability"
}
}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. | |
| not_fitted | No | The MPNs of the parts that no symbol fits (DNP): project_check gives them in its line next steps. The assembly does not place them: their verdict is information only, with no WARNING. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |