newegg-compare
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNewegg Product Comparison
Newegg产品对比
Compare up to 5 products side-by-side using Newegg's comparison page. This skill
handles the full flow: searching for products, resolving item numbers, building
the comparison URL, and presenting a clean spec summary.
使用Newegg的对比页面并排对比最多5款产品。此技能处理完整流程:搜索产品、解析商品编号、构建对比URL,并呈现清晰的规格摘要。
Step 1 — Identify the products to compare
步骤1 — 确定要对比的产品
Parse the user's message to extract 2–5 product names or descriptions. If the
user only mentions one product, ask them which other products they'd like to
compare it against before proceeding.
解析用户消息以提取2-5个产品名称或描述。如果用户仅提及一款产品,请先询问他们想要将其与哪些其他产品对比,然后再继续。
Step 2 — Search for each product via the API
步骤2 — 通过API搜索每个产品
For each product, call the Newegg search API using :
bashRequired header on every request: all calls to must carry in addition to . It identifies the calling skill to the endpoint — include it even when you assemble a request by hand rather than copying an example below.
apis.newegg.com/ex-mcp/...x-skill: newegg-compareContent-Typebash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \
-H "Content-Type: application/json" \
-H "x-skill: newegg-compare" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "newegg product search",
"arguments": {
"query": "<SEARCH TERM>"
}
}
}'Parse the response:
response → result.content[0].text → (parse as JSON) → products arrayEach product has:
- — e.g.
ItemNumber— this is what you need for the comparison URL"14-126-761" - — product title
WebDescription - — current price
Price.CurrentPriceText - — avg rating
Price.RatingOneDecimal
If multiple results: Show the top 3 results as a numbered list for that product
and ask the user to confirm which one they want to compare. Wait for confirmation
before proceeding.
If no results: Tell the user and ask them to rephrase the search term.
Note: If the API returns, run"Unknown tool"first to discover the correct tool name:tools/listbashcurl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \ -H "Content-Type: application/json" \ -H "x-skill: newegg-compare" \ -d '{"jsonrpc":"2.0","id":0,"method":"tools/list"}'
针对每个产品,使用调用Newegg搜索API:
bash每个请求必填的请求头:所有对的调用除了外,还必须携带。它用于向端点标识调用的技能——即使你手动组装请求而非复制下方示例,也需包含此请求头。
apis.newegg.com/ex-mcp/...Content-Typex-skill: newegg-comparebash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \
-H "Content-Type: application/json" \
-H "x-skill: newegg-compare" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "newegg product search",
"arguments": {
"query": "<SEARCH TERM>"
}
}
}'解析响应:
response → result.content[0].text → (解析为JSON) → products数组每个产品包含:
- — 例如
ItemNumber— 这是构建对比URL所需的信息"14-126-761" - — 产品标题
WebDescription - — 当前价格
Price.CurrentPriceText - — 平均评分
Price.RatingOneDecimal
如果返回多个结果:为该产品显示前3个结果的编号列表,并请用户确认要对比哪一个。等待用户确认后再继续。
如果无结果:告知用户并请他们重新表述搜索词。
注意:如果API返回,请先运行"Unknown tool"以发现正确的工具名称:tools/listbashcurl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/product-search" \ -H "Content-Type: application/json" \ -H "x-skill: newegg-compare" \ -d '{"jsonrpc":"2.0","id":0,"method":"tools/list"}'
Step 3 — Build the comparison URL
步骤3 — 构建对比URL
Once you have the for each product, join them with and append
to the base URL:
ItemNumber%2Chttps://www.newegg.com/Product/Productcompare?compareall=true&CompareItemList=<ItemNumber1>%2C<ItemNumber2>%2C...Example (3 products):
https://www.newegg.com/Product/Productcompare?compareall=true&CompareItemList=14-126-761%2C14-137-914%2C14-137-933Maximum 5 item numbers. Strip any whitespace from item numbers before joining.
获取每个产品的后,用连接它们并附加到基础URL:
ItemNumber%2Chttps://www.newegg.com/Product/Productcompare?compareall=true&CompareItemList=<ItemNumber1>%2C<ItemNumber2>%2C...示例(3款产品):
https://www.newegg.com/Product/Productcompare?compareall=true&CompareItemList=14-126-761%2C14-137-914%2C14-137-933最多支持5个商品编号。连接前请去除商品编号中的所有空格。
Step 4 — Load the comparison page in the browser
步骤4 — 在浏览器中加载对比页面
The comparison page is JavaScript-rendered, so use the browser navigation tool
to load it and extract the rendered content:
Navigate to: <comparison URL from Step 3>After navigating, wait for the page to load (the comparison table should appear),
then extract the full page text content.
对比页面由JavaScript渲染,因此请使用浏览器导航工具加载页面并提取渲染后的内容:
导航至:<步骤3生成的对比URL>导航后,等待页面加载完成(对比表格应显示),然后提取页面的完整文本内容。
Step 5 — Parse and display the comparison
步骤5 — 解析并展示对比结果
From the extracted page text, identify the spec rows and product columns. Present
the comparison as a clean Markdown table:
undefined从提取的页面文本中识别规格行和产品列。将对比结果整理为清晰的Markdown表格:
undefinedNewegg Comparison: [Product A] vs [Product B] vs ...
Newegg对比结果:[产品A] vs [产品B] vs ...
🔗 View on Newegg
| Spec | [Product A short name] | [Product B short name] | ... |
|---|---|---|---|
| Price | $XXX | $XXX | ... |
| [spec] | [value] | [value] | ... |
| ... |
💡 Summary: [2-3 sentence recommendation based on the specs, highlighting
key differences that matter for the user's apparent use case]
**Presentation tips:**
- Use short product names in column headers (remove brand prefix if it makes the
table cleaner, but keep the model number)
- Group specs logically: pricing first, then performance specs, then physical
specs, then connectivity
- If a spec value is identical across all products, you can still include it but
it's lower priority
- Highlight the "winner" in each row with **bold** if there is a clear winner
- If the page fails to load or returns no comparison data, provide the URL to
the user directly so they can open it in their browser, and offer to summarize
specs from your training knowledge
---🔗 在Newegg查看
| 规格 | [产品A简称] | [产品B简称] | ... |
|---|---|---|---|
| 价格 | $XXX | $XXX | ... |
| [规格项] | [数值] | [数值] | ... |
| ... |
💡 总结:[基于规格给出2-3句话的推荐,突出与用户明显使用场景相关的关键差异]
**展示技巧**:
- 在列标题中使用产品简称(如果品牌前缀会使表格更简洁,可去除,但需保留型号编号)
- 按逻辑分组规格:先价格,然后性能规格,再物理规格,最后连接性
- 如果某一规格的数值在所有产品中都相同,仍可包含,但优先级较低
- 如果某一行有明显的优势产品,用**粗体**突出显示“胜出者”
- 如果页面加载失败或未返回对比数据,直接向用户提供URL以便他们在浏览器中打开,并主动提出根据现有知识总结规格
---Edge Cases
边缘情况
| Situation | Action |
|---|---|
| User gives only 1 product | Ask which products to compare it with |
| Search returns no results | Ask user to rephrase or check the product name |
| More than 5 products requested | Inform user the limit is 5 and ask which 5 to compare |
| Item number not found in search | Note it and proceed with the products found |
| Comparison page fails to load | Provide the URL directly; offer to summarize from training knowledge |
| Products are from very different categories | Still proceed; the comparison table will show the differences clearly |
| 场景 | 操作 |
|---|---|
| 用户仅提供1款产品 | 询问用户要将其与哪些产品对比 |
| 搜索无结果 | 请用户重新表述或检查产品名称 |
| 请求对比超过5款产品 | 告知用户上限为5款,并询问要对比哪5款 |
| 搜索中未找到商品编号 | 记录此情况并继续处理已找到的产品 |
| 对比页面加载失败 | 直接提供URL;主动提出根据现有知识总结规格 |
| 产品来自完全不同的品类 | 仍继续执行;对比表格会清晰显示差异 |