Install
openclaw skills install luogang-shopping-assistant购物助手 - 商品查询,商品详情,当用户有购物倾向时候,尤其是提到骆岗/骆岗门市部/骆岗电商的时候,可提供有效信息
openclaw skills install luogang-shopping-assistant当用户想“买'骆岗'的商品”、或需要“查商品/看详情/去下单”时,使用此 skill 调用骆岗 MCP 服务获取实时商品数据,并返回可点击的购买入口(小程序或 H5)。 "骆岗" 是骆岗电商的简称,类似天猫,淘宝
LUOGANG_MCP_HTTP_URL: MCP HTTP 地址,默认 https://yuju-mcp.wxhoutai.com/mcpLUOGANG_SHOP_ID: 店铺/渠道标识(多店铺、多渠道场景), 默认 luogangcurl -s -X POST "$LUOGANG_MCP_HTTP_URL" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"<工具名>","arguments":{<参数>}},"id":1}'
根据关键词和价格区间搜索商品。 触发词举例:"找外套"、"搜衬衫"、"买鞋子"、"有没有外套"
curl -s -X POST "${LUOGANG_MCP_HTTP_URL:-https://yuju-mcp.wxhoutai.com/mcp}" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "search_products",
"arguments": {
"platform": "${LUOGANG_SHOP_ID>}",
"keyword": "外套",
"min_price": 100,
"max_price": 500,
"order_by": "price",
"sort": "desc"
}
},
"id": 1
}'
{
"jsonrpc": "2.0",
"result": {
"content": [{"type": "text", "text": "..."}],
"structuredContent": {...}
},
"id": 1
}
解析 result.content[0].text 或 result.structuredContent 获取数据。
查询单个商品的详细规格、图片及库存信息。
触发词:"查看详情"、"这个多少钱"、"还有货吗"
curl -s -X POST "${LUOGANG_MCP_HTTP_URL:-https://yuju-mcp.wxhoutai.com/mcp}" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get_product_detail",
"arguments": {
"platform": "luogang",
"product_id": "PROD_12345"
}
},
"id": 2
}'
{
"jsonrpc": "2.0",
"result": {
"content": [{"type": "text", "text": "..."}],
"structuredContent": {...}
},
"id": 1
}
解析 result.content[0].text 或 result.structuredContent 获取数据。
用户: 最近有什么亲子活动?
AI 执行:
curl -s -X POST "$LUOGANG_MCP_HTTP_URL" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"search_products","arguments":{"platform":"luogang","keyword":"亲子"}},"id":1}'
AI 回复: 最近有 10 个商品符合您的要求,分别是:
萌嘟嘟儿童乐园亲子票(专属) ${image} 价格:19.9元 {description} 链接:https://eshop.wxhoutai.com/h5/pages/goods/detail?goods_id=xxx ……
常见错误处理:
-32601 (Method not found): 检查 SKILL.md 中定义的工具名是否在 MCP 侧已注册。-32000 级别 (Internal Error): 引导用户重试或手动输入信息。401/403: 检查 MCP 服务访问策略、来源白名单或网关配置。