electronics-sourcing
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseElectronics 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"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"
)Decision rule: If the user gives you 3+ specific parameters, use . For part numbers or general queries, use .
search_by_parameterssearch_partssearch_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_parameterssearch_partsThe 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 partsPolling: Call and check the field. If , wait and poll again. Do not assume instant completion.
check_bom_statusstatus"in_progress"Handling unmatched parts: When is not empty, try with the and fields as the query. If still unmatched, report them to the user — do not silently skip them.
unknown_partssearch_partsvaluefootprintBOM处理为异步操作,请严格遵循以下顺序:
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_statusstatus"in_progress"处理未匹配零件:当不为空时,尝试使用和字段作为查询调用。如果仍未匹配,请向用户报告这些零件——不要静默跳过。
unknown_partsvaluefootprintsearch_partsDatasheet 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 windowNever call without a parameter unless the datasheet is short (< 20 pages). An unfiltered read of a 200-page datasheet will consume excessive context.
read_datasheetqueryKeyword 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")
→ 仅读取匹配的片段
→ 大幅节省上下文窗口切勿在没有参数的情况下调用,除非数据表篇幅较短(少于20页)。无筛选地读取200页的数据表会消耗过多上下文。
queryread_datasheet关键词技巧:使用特定技术术语。例如“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 + assemblyDFM 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 when the user wants a complete per-unit cost including both PCB fabrication and component assembly.
quote_assembly制造操作(DFM、晶圆厂报价、组装)均为异步操作:
submit_dfm() → check_dfm_status() # DFM分析
quote_fabrication() → check_manufacturing_status() # 晶圆厂报价
quote_assembly() → 内部轮询 # 晶圆制造+组装组合报价先做DFM分析:在请求制造报价前,务必先进行DFM分析。DFM可能会发现影响可制造性或成本的问题。
组装报价:在一次调用中整合晶圆制造和BOM成本计算。当用户需要包含PCB制造和元器件组装的完整单位成本时,使用。
quote_assemblyHandling Partial Failures
处理部分失败情况
Real-world sourcing often has partial results. Handle gracefully:
Some parts not found in BOM:
- Report the unmatched count clearly
- Attempt for each unmatched part
search_parts - 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 for each unavailable part
find_alternatives - 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 componentsKiCad CLI requirement: BOM extraction may invoke if no existing BOM file is found in the project. Ensure KiCad 8+ is installed.
kicad-cliLocal 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 8及以上版本。
kicad-cli仅支持本地模式:所有KiCad工具需要本地模式(stdio传输),在托管/HTTP模式下不可用。
Cost Optimization Tips
成本优化技巧
When helping users optimize costs:
- Check quantity breaks: Call with different quantities (1, 10, 100, 1000) to show price break curves
compare_prices - Suggest alternatives: If a part is expensive, call and compare pricing
find_alternatives - Preferred suppliers: Use in
preferred_suppliersto bias toward the user's existing supplier relationshipscalculate_bom_cost - Consolidation: When multiple parts come from the same supplier, note the potential for consolidated shipping
帮助用户优化成本时:
- 检查数量折扣:调用并传入不同数量(1、10、100、1000)以展示价格折扣曲线
compare_prices - 建议替代品:如果某零件价格过高,调用并对比价格
find_alternatives - 偏好供应商:在中使用
calculate_bom_cost,优先考虑用户现有的供应商合作关系preferred_suppliers - 合并发货:当多个零件来自同一供应商时,注明合并发货的可能性
Response Patterns
响应模式
When a user asks to "source a part":
→ → → →
Present: part details, best price, stock status, and any concerns.
search_partsget_part_detailscompare_pricescheck_availabilityWhen a user provides a BOM file:
→ → poll → report matched/unmatched →
Present: match rate, unmatched items, total cost, per-line breakdown.
upload_bomcheck_bom_statuscalculate_bom_costWhen a user asks "is this in stock?":
→ with quantities
Present: stock levels, number of suppliers with stock, whether quantity is meetable.
check_availabilityWhen a user asks about a datasheet:
→ → with targeted query
Present: the specific information requested, citing page numbers.
list_datasheet_sectionsread_datasheetWhen a user asks for a manufacturing quote:
→ (if not already done) → or
Present: DFM issues (if any), estimated cost, lead time.
submit_dfmquote_fabricationquote_assembly当用户要求“采购某个零件”时:
→ → → →
展示:零件详情、最优价格、库存状态以及任何注意事项。
search_partsget_part_detailscompare_pricescheck_availability当用户提供BOM文件时:
→ → 轮询 → 报告匹配/未匹配情况 →
展示:匹配率、未匹配项、总成本、逐行明细。
upload_bomcheck_bom_statuscalculate_bom_cost当用户询问“该零件是否有库存?”时:
→ 传入数量调用
展示:库存水平、有库存的供应商数量、是否能满足需求数量。
check_availability当用户询问数据表相关问题时:
→ → 使用目标查询调用
展示:用户请求的特定信息,并注明页码。
list_datasheet_sectionsread_datasheet当用户要求制造报价时:
→ (如未执行过)→ 或
展示:DFM问题(如有)、预估成本、交付周期。
submit_dfmquote_fabricationquote_assembly