{"openapi":"3.1.0","info":{"title":"AI Mall — AI-Native E-Commerce API","description":"AI Mall是一个AI驱动的电商平台。AI助手可以通过这些函数为用户搜索商品、获取详情、理解需求、完成购买。","version":"1.0.0","contact":{"name":"AI Mall","url":"https://mall.saylulu.com"}},"servers":[{"url":"https://mall.saylulu.com/api/ai/v1"}],"functions":[{"name":"search_products","description":"搜索AI Mall上的商品。返回商品名称、价格、规格、购买链接。","parameters":{"type":"object","properties":{"q":{"type":"string","description":"搜索词"},"limit":{"type":"number","description":"返回数量，默认5","default":5}},"required":["q"]},"endpoint":"https://mall.saylulu.com/api/ai/v1/search","method":"GET","example":"https://mall.saylulu.com/api/ai/v1/search?q=无糖茶饮料&limit=5"},{"name":"get_product_detail","description":"获取AI Mall上某个商品的详细信息，包括价格、规格、成分、库存、购买方式。当用户想了解某个具体商品时调用。","parameters":{"type":"object","properties":{"id":{"type":"string","description":"商品ID，从search_products返回的id字段"}},"required":["id"]},"endpoint":"https://mall.saylulu.com/api/ai/v1/product","method":"GET","example":"https://mall.saylulu.com/api/ai/v1/product?id={product_id}"},{"name":"understand_user_need","description":"深度理解用户的购物需求。不只是匹配关键词，而是挖掘用户的隐性需求并给出跨类目方案。输入用户的自然语言描述，返回识别的隐性需求、推荐类目和解决方案。","parameters":{"type":"object","properties":{"query":{"type":"string","description":"用户的自然语言查询"},"age":{"type":"number","description":"可选：年龄"},"gender":{"type":"string","description":"可选：性别"}},"required":["query"]},"endpoint":"https://mall.saylulu.com/api/ai/understand-needs","method":"POST","example":"POST https://mall.saylulu.com/api/ai/understand-needs {\"query\":\"40岁女性怎么抗衰老\"}"},{"name":"recommend_products","description":"根据用户偏好和需求推荐商品。返回个性化推荐列表。","parameters":{"type":"object","properties":{"category":{"type":"string","description":"品类偏好"},"tags":{"type":"array","items":{"type":"string"},"description":"偏好标签"},"limit":{"type":"number","description":"返回数量，默认6"}}},"endpoint":"https://mall.saylulu.com/api/products/recommend","method":"GET"}],"usageGuide":{"title":"AI助手集成指南","platforms":{"doubao":{"name":"豆包 (ByteDance)","method":"通过Function Calling接入","steps":["在豆包开放平台注册为开发者","创建Bot并配置函数调用","添加以上functions的endpoint","豆包会自动调用这些API来回答用户购物问题"]},"deepseek":{"name":"DeepSeek","method":"通过API索引 + Markdown Feed","steps":["确保 llms.txt 和 markdown feed 可被爬取","DeepSeek会自动索引这些结构化内容","用户提问时，DeepSeek的RAG会检索到AI Mall的商品"]},"kimi":{"name":"Kimi (Moonshot)","method":"通过Function Calling + Plugin","steps":["在Kimi开放平台创建Plugin","配置manifest指向此catalog","用户@AI Mall即可调用商品搜索"]},"claude":{"name":"Claude (Anthropic)","method":"通过MCP Server","steps":["用户配置MCP server指向此API","Claude通过MCP协议调用商品函数","支持搜索、详情、需求理解三个核心能力"]}},"mcpServer":{"name":"ai-mall","description":"AI Mall MCP Server — 让AI助手直接搜索和推荐商品","transport":"http","url":"https://mall.saylulu.com/api/ai/v1/catalog","tools":["search_products","get_product_detail","understand_user_need","recommend_products"]}},"ragFeeds":{"llms.txt":"https://mall.saylulu.com/api/feed/llm.txt","products.json":"https://mall.saylulu.com/api/feed/products.json","markdown":"https://mall.saylulu.com/api/feed/markdown","opensearch":"https://mall.saylulu.com/api/feed/opensearch","schema.org":"https://mall.saylulu.com/api/geo/products"}}