Skip to main content
Glama

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

NameRequiredDescriptionDefault
mpnYesThe 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.
baseNoThe base part of the datasheet, for example TLV755P. The concrete part gets the documents of the base part.
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.
roleNoThe role of the document: datasheet, manual, errata, appnote, package (a package drawing in its own document) or other.datasheet
categoryNoThe 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).
documentNoA 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.
manufacturerNoThe 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_confirmedNoTrue 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

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / manufacturer_confirmed
      Added value: +{
      +  "default": false,
      +  "description": "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.",
      +  "title": "Manufacturer Confirmed",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / role / description
      Previous value: -"The role of the document: datasheet, manual, errata, appnote or other."New value: +"The role of the document: datasheet, manual, errata, appnote, package (a package drawing in its own document) or other."
  3. Changed1 schema field changedv0.2.0
    • changedInput schema / properties / manufacturer / description
      Previous value: -"The manufacturer. Use the spelling of list_parts (for example Texas Instruments, not TI when the store has it so): the layout of the project folder can use it as a folder name."New value: +"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)."
  4. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: document links persist in the central store and no tool removes them, and when the manufacturer cannot be read or conflicts, the tool asks the user and adds nothing rather than guessing. It still does not explicitly state that this is a mutating write or what permissions/conflicts to expect, which keeps it below a 5.

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 text is a dense, run-on block mixing purpose, cross-tool workflow instructions (project_sync, project_check, kicad-workbench), and behavioral caveats, with awkward phrasing that makes it hard to parse. Some sentences carry real information, but structure and front-loading are weak.

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 an eight-parameter mutation tool with no annotations and an output schema, the description covers the main side effects, the store-link persistence caveat, the ask-the-user fallback, and the required follow-up tools. Given the output schema absorbs return-value explanation, little essential context is missing beyond explicit sibling differentiation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all eight parameters thoroughly, including defaults and examples. The description adds only marginal meaning, mostly the relationship between mpn, base, and document (the link attaches to the base part when given) and the manufacturer_confirmed semantics, which the schema already covers in detail.

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 states a concrete verb and resource: 'Add a part to the user project, with the documents that the store links to it,' and the closing line 'Gives the part and its documents' reinforces the scope. However, it never distinguishes this from close siblings like project_update_part, adopt_part, or project_remove_part, so an agent must infer the boundary.

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?

It gives real workflow guidance: verify the MPN and base part before passing a document, and for a new design part, mirror the change into the CAD project via set_symbol_fields followed by project_check. What is missing is any statement of when to use this tool instead of project_update_part or adopt_part, so the choice between siblings is left to inference.

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