electronics-sourcing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Electronics Sourcing Skill

电子元器件采购技能

This skill teaches you how to source electronic components effectively using parts-mcp tools. It covers tool sequencing, decision patterns, and how to handle common scenarios.
本技能将教你如何使用parts-mcp工具高效采购电子元器件,涵盖工具排序、决策模式以及常见场景的处理方法。

When to Use Which Search Tool

何时使用何种搜索工具

search_parts
— Use when you have a part number, description, or general keywords. This is your default starting point.
"Find me a 100nF capacitor" → search_parts(query="100nF capacitor")
"Look up STM32F411" → search_parts(query="STM32F411")
search_by_parameters
— Use when you need to match specific electrical parameters within a category. More precise than keyword search.
"I need a 50V 100nF X7R 0402 cap" → search_by_parameters(
  parameters={"capacitance": "100nF", "voltage": "50V", "dielectric": "X7R", "package": "0402"},
  category="capacitor"
)
Decision rule: If the user gives you 3+ specific parameters, use
search_by_parameters
. For part numbers or general queries, use
search_parts
.
search_parts
— 当你拥有零件编号、描述或通用关键词时使用。这是默认的起始工具。
"Find me a 100nF capacitor" → search_parts(query="100nF capacitor")
"Look up STM32F411" → search_parts(query="STM32F411")
search_by_parameters
— 当你需要在某一类别中匹配特定电气参数时使用,比关键词搜索更精准。
"I need a 50V 100nF X7R 0402 cap" → search_by_parameters(
  parameters={"capacitance": "100nF", "voltage": "50V", "dielectric": "X7R", "package": "0402"},
  category="capacitor"
)
决策规则:如果用户提供3个及以上特定参数,使用
search_by_parameters
;对于零件编号或通用查询,使用
search_parts

The Search → Price → Availability → Alternative Pattern

搜索→价格→库存→替代方案模式

This is the core sourcing workflow. Follow this sequence:
1. SEARCH → Find the part
2. DETAILS → Get full specifications (if needed for validation)
3. PRICE → Compare across suppliers
4. AVAILABILITY → Check stock levels
5. ALTERNATIVE → Find replacements (only if price is too high or stock is insufficient)
Do not skip steps 3 and 4. A part that exists in the database may be out of stock or prohibitively expensive.
When the user asks to "source" or "find" a part, they expect pricing and availability — not just search results. Always follow through to at least step 4.
这是核心采购工作流,请遵循以下顺序:
1. 搜索 → 找到目标零件
2. 详情 → 获取完整规格(如需验证)
3. 价格 → 跨供应商对比
4. 库存 → 检查库存水平
5. 替代方案 → 寻找替代品(仅当价格过高或库存不足时)
请勿跳过步骤3和4。数据库中存在的零件可能缺货或价格过高。
当用户要求“采购”或“查找”零件时,他们期望得到价格和库存信息——而非仅仅是搜索结果。请至少执行到步骤4。

BOM Processing Pattern

BOM处理模式

BOM processing is asynchronous. Always follow this exact sequence:
1. upload_bom(file_path=path)           → Get job_id
2. check_bom_status(job_id=job_id)      → Poll until status is "complete"
3. Review matched_parts and unknown_parts
4. For unmatched: search_parts() to resolve manually
5. calculate_bom_cost() with all resolved parts
Polling: Call
check_bom_status
and check the
status
field. If
"in_progress"
, wait and poll again. Do not assume instant completion.
Handling unmatched parts: When
unknown_parts
is not empty, try
search_parts
with the
value
and
footprint
fields as the query. If still unmatched, report them to the user — do not silently skip them.
BOM处理为异步操作,请严格遵循以下顺序:
1. upload_bom(file_path=path)           → 获取job_id
2. check_bom_status(job_id=job_id)      → 轮询直到状态为“complete”
3. 查看matched_parts和unknown_parts
4. 对于未匹配零件:使用search_parts()手动解决
5. 使用所有已匹配零件调用calculate_bom_cost()
轮询:调用
check_bom_status
并检查
status
字段。如果状态为
"in_progress"
,请等待后再次轮询,不要假设会立即完成。
处理未匹配零件:当
unknown_parts
不为空时,尝试使用
value
footprint
字段作为查询调用
search_parts
。如果仍未匹配,请向用户报告这些零件——不要静默跳过。

Datasheet Reading Strategy

数据表读取策略

Datasheets can be hundreds of pages. Always use this two-step approach:
1. list_datasheet_sections(sku="PART-NUMBER")
   → See the table of contents
   → Identify which sections contain what you need

2. read_datasheet(sku="PART-NUMBER", query="relevant keywords")
   → Read only matching chunks
   → Saves significant context window
Never call
read_datasheet
without a
query
parameter unless the datasheet is short (< 20 pages). An unfiltered read of a 200-page datasheet will consume excessive context.
Keyword tips: Use specific technical terms. "maximum input voltage absolute ratings" is better than "voltage". Multiple keywords narrow the results.
数据表可能长达数百页,请始终使用以下两步法:
1. list_datasheet_sections(sku="PART-NUMBER")
   → 查看目录
   → 确定哪些章节包含所需信息

2. read_datasheet(sku="PART-NUMBER", query="relevant keywords")
   → 仅读取匹配的片段
   → 大幅节省上下文窗口
切勿在没有
query
参数的情况下调用
read_datasheet
,除非数据表篇幅较短(少于20页)。无筛选地读取200页的数据表会消耗过多上下文。
关键词技巧:使用特定技术术语。例如“maximum input voltage absolute ratings”比“voltage”更精准。多个关键词可缩小结果范围。

Manufacturing Pipeline

制造流程

Manufacturing operations (DFM, fab quoting, assembly) are all asynchronous:
submit_dfm() → check_dfm_status()       # DFM analysis
quote_fabrication() → check_manufacturing_status()  # Fab quote
quote_assembly() → polls internally      # Combined fab + assembly
DFM first: Always run DFM analysis before requesting a fabrication quote. DFM may reveal issues that affect manufacturability or cost.
Assembly quotes combine fabrication and BOM costing in one call. Use
quote_assembly
when the user wants a complete per-unit cost including both PCB fabrication and component assembly.
制造操作(DFM、晶圆厂报价、组装)均为异步操作:
submit_dfm() → check_dfm_status()       # DFM分析
quote_fabrication() → check_manufacturing_status()  # 晶圆厂报价
quote_assembly() → 内部轮询      # 晶圆制造+组装组合报价
先做DFM分析:在请求制造报价前,务必先进行DFM分析。DFM可能会发现影响可制造性或成本的问题。
组装报价:在一次调用中整合晶圆制造和BOM成本计算。当用户需要包含PCB制造和元器件组装的完整单位成本时,使用
quote_assembly

Handling Partial Failures

处理部分失败情况

Real-world sourcing often has partial results. Handle gracefully:
Some parts not found in BOM:
  • Report the unmatched count clearly
  • Attempt
    search_parts
    for each unmatched part
  • If still unmatched, list them for the user with their reference designators and values
  • Calculate cost for matched parts, noting the incomplete total
Some parts unavailable:
  • Report which parts are out of stock
  • Automatically call
    find_alternatives
    for each unavailable part
  • Present alternatives with their specifications and pricing
  • Let the user decide on substitutions
Price comparison with missing suppliers:
  • Report how many suppliers were checked
  • Note if key suppliers (the user's preferred ones) returned no results
  • Present available pricing data without waiting for all suppliers
实际采购中常出现部分结果,请妥善处理:
BOM中部分零件未找到
  • 清晰报告未匹配零件数量
  • 尝试为每个未匹配零件调用
    search_parts
  • 如果仍未匹配,列出这些零件的参考标识和参数供用户查看
  • 计算已匹配零件的成本,并注明总成本不完整
部分零件缺货
  • 报告哪些零件缺货
  • 自动为每个缺货零件调用
    find_alternatives
  • 展示替代品的规格和价格
  • 让用户决定是否替换
供应商缺失时的价格对比
  • 报告已查询的供应商数量
  • 注明关键供应商(用户偏好的供应商)是否未返回结果
  • 无需等待所有供应商结果,直接展示可用的价格数据

KiCad Project Workflow

KiCad项目工作流

When working with KiCad projects:
1. find_kicad_projects()                    → Discover available projects
2. analyze_kicad_project(project_path=...)  → Understand project structure
3. extract_bom_from_kicad(project_path=...) → Get component list
4. match_components_to_parts(components=...) → Match to real parts
5. Follow the BOM processing pattern above for unmatched components
KiCad CLI requirement: BOM extraction may invoke
kicad-cli
if no existing BOM file is found in the project. Ensure KiCad 8+ is installed.
Local mode only: All KiCad tools require local mode (stdio transport). They are not available in hosted/HTTP mode.
处理KiCad项目时:
1. find_kicad_projects()                    → 发现可用项目
2. analyze_kicad_project(project_path=...)  → 了解项目结构
3. extract_bom_from_kicad(project_path=...) → 获取元器件清单
4. match_components_to_parts(components=...) → 匹配真实零件
5. 对未匹配元器件遵循上述BOM处理模式
KiCad CLI要求:如果项目中没有现成的BOM文件,BOM提取可能会调用
kicad-cli
。请确保安装了KiCad 8及以上版本。
仅支持本地模式:所有KiCad工具需要本地模式(stdio传输),在托管/HTTP模式下不可用。

Cost Optimization Tips

成本优化技巧

When helping users optimize costs:
  1. Check quantity breaks: Call
    compare_prices
    with different quantities (1, 10, 100, 1000) to show price break curves
  2. Suggest alternatives: If a part is expensive, call
    find_alternatives
    and compare pricing
  3. Preferred suppliers: Use
    preferred_suppliers
    in
    calculate_bom_cost
    to bias toward the user's existing supplier relationships
  4. Consolidation: When multiple parts come from the same supplier, note the potential for consolidated shipping
帮助用户优化成本时:
  1. 检查数量折扣:调用
    compare_prices
    并传入不同数量(1、10、100、1000)以展示价格折扣曲线
  2. 建议替代品:如果某零件价格过高,调用
    find_alternatives
    并对比价格
  3. 偏好供应商:在
    calculate_bom_cost
    中使用
    preferred_suppliers
    ,优先考虑用户现有的供应商合作关系
  4. 合并发货:当多个零件来自同一供应商时,注明合并发货的可能性

Response Patterns

响应模式

When a user asks to "source a part": →
search_parts
get_part_details
compare_prices
check_availability
Present: part details, best price, stock status, and any concerns.
When a user provides a BOM file: →
upload_bom
→ poll
check_bom_status
→ report matched/unmatched →
calculate_bom_cost
Present: match rate, unmatched items, total cost, per-line breakdown.
When a user asks "is this in stock?": →
check_availability
with quantities Present: stock levels, number of suppliers with stock, whether quantity is meetable.
When a user asks about a datasheet: →
list_datasheet_sections
read_datasheet
with targeted query Present: the specific information requested, citing page numbers.
When a user asks for a manufacturing quote: →
submit_dfm
(if not already done) →
quote_fabrication
or
quote_assembly
Present: DFM issues (if any), estimated cost, lead time.
当用户要求“采购某个零件”时: →
search_parts
get_part_details
compare_prices
check_availability
展示:零件详情、最优价格、库存状态以及任何注意事项。
当用户提供BOM文件时: →
upload_bom
→ 轮询
check_bom_status
→ 报告匹配/未匹配情况 →
calculate_bom_cost
展示:匹配率、未匹配项、总成本、逐行明细。
当用户询问“该零件是否有库存?”时: → 传入数量调用
check_availability
展示:库存水平、有库存的供应商数量、是否能满足需求数量。
当用户询问数据表相关问题时: →
list_datasheet_sections
→ 使用目标查询调用
read_datasheet
展示:用户请求的特定信息,并注明页码。
当用户要求制造报价时: →
submit_dfm
(如未执行过)→
quote_fabrication
quote_assembly
展示:DFM问题(如有)、预估成本、交付周期。