newegg-shell-shocker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Newegg Shell Shocker

Newegg Shell Shocker

Query Newegg Shell Shocker daily and next-day flash deal products.
查询Newegg Shell Shocker每日及次日的闪购产品。

Agent execution rules (read first)

Agent执行规则(请先阅读)

  • Do not call
    ask_clarification
    for this task. The data source (one public JSON-RPC call, no auth) and the output format (Markdown tables below) are fully specified — this is not
    missing_info
    ,
    ambiguous_requirement
    , or
    approach_choice
    .
  • Immediately after loading this skill, use the
    bash
    tool
    to run curl. Do not ask the user how to fetch data or which output format they prefer.
  • Required header on every request: all calls to
    apis.newegg.com/ex-mcp/...
    must carry
    x-skill: newegg-shell-shocker
    in addition to
    Content-Type
    . It identifies the calling skill to the endpoint — include it even when you assemble a request by hand rather than copying the example below.
  • Run exactly:
bash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/website-www-tool" \
  -H "Content-Type: application/json" \
  -H "x-skill: newegg-shell-shocker" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getapi_home_v2_shellshocker_page","arguments":{"CountryCode":"USA","CompanyCode":1003}}}'
  • Unwrap the response before reading it (see Response Structure), then build the tables in Response Format. If curl fails (non-zero exit), the envelope carries
    error
    ,
    result.isError
    is true, or the body is not valid JSON, report the error in your reply — still without asking the user to choose a fetch method.
  • 请勿为此任务调用
    ask_clarification
    。数据源(一个公开的JSON-RPC调用,无需认证)和输出格式(下方的Markdown表格)已完全指定——这不属于
    missing_info
    ambiguous_requirement
    approach_choice
    情况。
  • 加载此技能后立即使用**
    bash
    工具**运行curl命令。请勿询问用户如何获取数据或偏好哪种输出格式。
  • 每个请求必须包含的请求头:所有对
    apis.newegg.com/ex-mcp/...
    的调用,除了
    Content-Type
    外,还必须携带
    x-skill: newegg-shell-shocker
    。它用于向端点标识调用的技能——即使你手动组装请求而非复制下方示例,也需包含此头。
  • 严格运行以下命令:
bash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/website-www-tool" \
  -H "Content-Type: application/json" \
  -H "x-skill: newegg-shell-shocker" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getapi_home_v2_shellshocker_page","arguments":{"CountryCode":"USA","CompanyCode":1003}}}'
  • 读取响应前先解析外层结构(参见响应结构),然后按照响应格式构建表格。如果curl执行失败(非零退出码)、响应包包含
    error
    result.isError
    为true或响应体不是有效的JSON,需在回复中报告错误——但仍请勿询问用户选择获取数据的方式。

Trigger Scenarios

触发场景

  • User asks "What's on Shell Shocker"
  • User asks "Today's flash deals" / "Newegg flash deals"
  • User searches for Shell Shocker prices of specific products
  • User requests to view Newegg limited-time special list
  • 用户询问“What's on Shell Shocker”(Shell Shocker有什么商品)
  • 用户询问“Today's flash deals”(今日闪购)/“Newegg flash deals”(Newegg闪购)
  • 用户搜索特定产品的Shell Shocker价格
  • 用户请求查看Newegg限时特惠列表

API

API信息

  • Method: POST (JSON-RPC
    tools/call
    )
  • Endpoint:
    https://apis.newegg.com/ex-mcp/endpoint/website-www-tool
  • Tool name:
    getapi_home_v2_shellshocker_page
  • Arguments:
    CountryCode
    (
    USA
    ) and
    CompanyCode
    (
    1003
    ) are both required;
    priceTypes
    is optional
  • Auth: none — no API key, no MCP client registration, no handshake
  • 请求方法:POST(JSON-RPC
    tools/call
  • 端点
    https://apis.newegg.com/ex-mcp/endpoint/website-www-tool
  • 工具名称
    getapi_home_v2_shellshocker_page
  • 参数
    CountryCode
    (值为
    USA
    )和
    CompanyCode
    (值为
    1003
    )为必填项;
    priceTypes
    为可选参数
  • 认证:无需认证——不需要API密钥、MCP客户端注册或握手

Response Structure

响应结构

Unwrap first. The payload sits at
result.content[0].text
as a JSON string, and decoding it can yield another JSON string before you reach the object. Keep decoding until you have a dict with
TodayItems
— do not assume a single
json.loads
is enough.
result.structuredContent
carries the same object when present and is the shortcut.
After unwrapping, the root object contains:
  • TodayItems
    (array) - Today's flash deal items
  • TomorrowItems
    (array) - Tomorrow's flash deal items
Each item element contains an
ItemBase
object, from which to extract:
FieldPathDescription
Item Number
ItemBase.Item
e.g.,
32-508-055
Item Title
ItemBase.Description.Title
Full item name
Original Price
ItemBase.OriginalUnitPrice
Original price (USD)
Flash Deal Price
ItemBase.FinalPrice
Final price (USD)
Image Filename
ItemBase.Image.Normal.ImageName
e.g.,
32-508-055-V01.jpg
Promotion Info
ItemBase.PromotionInfo.PromotionText
e.g., free gifts, additional discounts, etc.
Image URL Construction:
https://c1.neweggimages.com/ProductImageCompressAll/{ImageName}
例如:
https://c1.neweggimages.com/ProductImageCompressAll/32-508-055-V01.jpg
Product Link Construction:
https://www.newegg.com/p/{Item}
例如:
https://www.newegg.com/p/32-508-055
先解析外层结构。有效载荷位于
result.content[0].text
,是一个JSON字符串,解码后可能仍是JSON字符串,需持续解码直到得到包含
TodayItems
的字典——不要假设一次
json.loads
就能完成。
result.structuredContent
(若存在)包含相同的对象,是快捷获取方式。
解析外层结构后,根对象包含:
  • TodayItems
    (数组)- 今日闪购商品
  • TomorrowItems
    (数组)- 次日闪购商品
每个商品元素包含
ItemBase
对象,需从中提取以下字段:
字段路径描述
商品编号
ItemBase.Item
示例:
32-508-055
商品标题
ItemBase.Description.Title
完整商品名称
原价
ItemBase.OriginalUnitPrice
原价(美元)
闪购价
ItemBase.FinalPrice
最终价格(美元)
图片文件名
ItemBase.Image.Normal.ImageName
示例:
32-508-055-V01.jpg
促销信息
ItemBase.PromotionInfo.PromotionText
示例:赠品、额外折扣等
图片URL构建规则
https://c1.neweggimages.com/ProductImageCompressAll/{ImageName}
例如:
https://c1.neweggimages.com/ProductImageCompressAll/32-508-055-V01.jpg
商品链接构建规则
https://www.newegg.com/p/{Item}
例如:
https://www.newegg.com/p/32-508-055

Execution Flow

执行流程

  1. Call the API with
    bash
    using the curl command in Agent execution rules (no other tool for the HTTP request).
  2. Parse JSON, iterate through
    TodayItems
    and
    TomorrowItems
  3. Skip rows where
    ItemBase
    is
    null
    (usually Combo rows)
  4. Extract fields and format the response per Response Format
  1. 使用**
    bash
    工具调用API,执行Agent执行规则**中的curl命令(HTTP请求不得使用其他工具)。
  2. 解析JSON,遍历
    TodayItems
    TomorrowItems
  3. 跳过
    ItemBase
    null
    的行(通常是组合商品行)
  4. 提取字段并按照响应格式格式化响应内容

Response Format

响应格式

Return a clear product table containing:
undefined
返回清晰的商品表格,格式如下:
undefined

Today's Flash Deals (TodayItems)

今日闪购(TodayItems)

Item NumberProduct NameOriginal PriceFlash Deal PriceImage
32-508-055adidas $50 Gift Card$50$50Image
...............
商品编号商品名称原价闪购价图片
32-508-055adidas $50 Gift Card$50$50图片
...............

Tomorrow's Flash Deals (TomorrowItems)

次日闪购(TomorrowItems)

Item NumberProduct NameOriginal PriceFlash Deal PriceImage
...............

**If promotion information exists**, display below the product name:
🎁 Promotion: Free $15 Adidas eGift Card w/ purchase
undefined
商品编号商品名称原价闪购价图片
...............

**若存在促销信息**,在商品名称下方展示:
🎁 促销信息:购买即赠15美元Adidas电子礼品卡
undefined

Edge Cases

边缘情况处理

  • Empty Data: If
    TodayItems
    or
    TomorrowItems
    is empty or doesn't exist, clearly inform the user
  • Combo Rows: Skip rows that only have
    ComboBase
    unless the user specifically requests combo details
  • HTTP Errors: Report status code and error message
  • Invalid JSON: Briefly report parsing failure
  • 数据为空:如果
    TodayItems
    TomorrowItems
    为空或不存在,需明确告知用户
  • 组合商品行:跳过仅包含
    ComboBase
    的行,除非用户明确请求组合商品详情
  • HTTP错误:报告状态码和错误信息
  • 无效JSON:简要报告解析失败

Example Request

请求示例

bash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/website-www-tool" \
  -H "Content-Type: application/json" \
  -H "x-skill: newegg-shell-shocker" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getapi_home_v2_shellshocker_page","arguments":{"CountryCode":"USA","CompanyCode":1003}}}'
(
-sS
keeps output clean but still surfaces curl errors.) On Windows use
curl.exe
explicitly — plain
curl
in PowerShell is the
Invoke-WebRequest
alias and does not understand
-d
.
Piping through
jq
to unwrap and keep the output small:
bash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/website-www-tool" \
  -H "Content-Type: application/json" \
  -H "x-skill: newegg-shell-shocker" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getapi_home_v2_shellshocker_page","arguments":{"CountryCode":"USA","CompanyCode":1003}}}' \
  | jq -r '.result.content[0].text' | jq -r 'if type=="string" then fromjson else . end' \
  | jq '{today: [.TodayItems[]?.ItemBase | select(.) | {Item, Title: .Description.Title}], tomorrow: (.TomorrowItems|length)}'
select(.)
drops the combo rows, whose
ItemBase
is
null
— without it jq emits a
{"Item":null,"Title":null}
row rather than erroring, and that empty row ends up in the table.
bash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/website-www-tool" \
  -H "Content-Type: application/json" \
  -H "x-skill: newegg-shell-shocker" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getapi_home_v2_shellshocker_page","arguments":{"CountryCode":"USA","CompanyCode":1003}}}'
-sS
参数可保持输出整洁,但仍会显示curl错误。)在Windows系统中需明确使用
curl.exe
——PowerShell中的
curl
Invoke-WebRequest
的别名,不支持
-d
参数。
通过管道结合
jq
工具解析外层结构并精简输出:
bash
curl -sS -X POST "https://apis.newegg.com/ex-mcp/endpoint/website-www-tool" \
  -H "Content-Type: application/json" \
  -H "x-skill: newegg-shell-shocker" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"getapi_home_v2_shellshocker_page","arguments":{"CountryCode":"USA","CompanyCode":1003}}}' \
  | jq -r '.result.content[0].text' | jq -r 'if type=="string" then fromjson else . end' \
  | jq '{today: [.TodayItems[]?.ItemBase | select(.) | {Item, Title: .Description.Title}], tomorrow: (.TomorrowItems|length)}'
select(.)
会过滤掉
ItemBase
null
的组合商品行——如果没有这个参数,jq会输出
{"Item":null,"Title":null}
的空行而非报错,最终表格中会出现无效行。

Notes

注意事项

  • This endpoint requires no authentication
  • Returned data is in English; product names can be translated if needed
  • Prices are in USD
  • Image URLs support multiple sizes; default to
    ProductImageCompressAll
    path
  • 此端点无需认证
  • 返回数据为英文;若需要可翻译商品名称
  • 价格单位为美元
  • 图片URL支持多种尺寸;默认使用
    ProductImageCompressAll
    路径