Skip to main content
Glama

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

NameRequiredDescriptionDefault
pathNoA 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_fittedNoThe 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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / not_fitted
      Added value: +{
      +  "default": [],
      +  "description": "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.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "title": "Not Fitted",
      +  "type": "array"
      +}
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries real behavioral weight: it discloses that sources may not answer, that API-key notes must be surfaced (via search_distributors), that DNP parts are information-only with no WARNING, that Extended parts incur a loading fee, and that replacement candidates must be datasheet-verified. It does not say whether the tool makes live network calls, how long it may take, or whether a missing key degrades results — gaps that matter for a fan-out query tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body then spends most of its length narrating the report's line layout (which lines appear, which are indented, which are grouped under 'replacement'), even though the tool has an output schema. Sentences are dense and quote fragments inline, making the definition hard to skim; a substantial share of the text does not earn its place.

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

Completeness4/5

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

For a fan-out availability tool with real edge cases, the description covers the important ones: lifecycle risks at any distributor, missing purchase source, non-orderable numbers, empty stock, unresponsive sources, stale library age, and DNP handling. Combined with an existing output schema, an agent has enough to call it and interpret results; only the live-vs-cached and latency behavior is left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns an extra point by explaining the operational consequence of not_fitted (verdict becomes information-only, no WARNING) and by tying it back to project_check as the source of the MPN list. The path parameter's project-file lookup rule is left entirely to the schema, which is acceptable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names the exact resource (lifecycle state + stock per part) and the exact scope (the user project at enabled distributor APIs and the JLCPCB library), and the three bullet cases enumerate the verdicts produced. It never uses a verb phrase like 'checks' or 'reports', and it does not explicitly contrast itself with siblings like project_status or part_links, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied rather than stated: the agent learns the tool is the availability-checking step, that project_check supplies the not_fitted list, and that a replacement flows into project_update_part + adopt_part only after the user agrees. What is missing is any explicit 'use this instead of X' or exclusion — the agent must infer when project_status or part_links would be the better call.

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