@henrylabs/mcp 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +246 -12
  2. package/code-tool-worker.d.mts.map +1 -1
  3. package/code-tool-worker.d.ts.map +1 -1
  4. package/code-tool-worker.js +97 -7
  5. package/code-tool-worker.js.map +1 -1
  6. package/code-tool-worker.mjs +97 -7
  7. package/code-tool-worker.mjs.map +1 -1
  8. package/code-tool.js +1 -1
  9. package/code-tool.js.map +1 -1
  10. package/code-tool.mjs +1 -1
  11. package/code-tool.mjs.map +1 -1
  12. package/http.js +2 -2
  13. package/http.js.map +1 -1
  14. package/http.mjs +2 -2
  15. package/http.mjs.map +1 -1
  16. package/package.json +3 -2
  17. package/server.js +1 -1
  18. package/server.js.map +1 -1
  19. package/server.mjs +1 -1
  20. package/server.mjs.map +1 -1
  21. package/src/code-tool-worker.ts +126 -7
  22. package/src/code-tool.ts +1 -1
  23. package/src/http.ts +2 -2
  24. package/src/server.ts +1 -1
  25. package/src/tools/cart/create-cart-checkout.ts +1 -1
  26. package/src/tools/cart/items/add-cart-items.ts +2 -2
  27. package/src/tools/cart/items/clear-cart-items.ts +2 -2
  28. package/src/tools/cart/items/list-cart-items.ts +2 -2
  29. package/src/tools/cart/items/remove-cart-items.ts +2 -2
  30. package/src/tools/checkout/session/confirm-checkout-session.ts +1 -1
  31. package/src/tools/checkout/session/create-checkout-session.ts +1 -1
  32. package/src/tools/orders/retrieve-status-orders.ts +1 -1
  33. package/src/tools/products/retrieve-product-details.ts +1 -1
  34. package/src/tools/products/search-products.ts +1 -1
  35. package/src/tools/wallet/collect-payment-details.ts +1 -1
  36. package/tools/cart/create-cart-checkout.js +1 -1
  37. package/tools/cart/create-cart-checkout.js.map +1 -1
  38. package/tools/cart/create-cart-checkout.mjs +1 -1
  39. package/tools/cart/create-cart-checkout.mjs.map +1 -1
  40. package/tools/cart/items/add-cart-items.js +2 -2
  41. package/tools/cart/items/add-cart-items.js.map +1 -1
  42. package/tools/cart/items/add-cart-items.mjs +2 -2
  43. package/tools/cart/items/add-cart-items.mjs.map +1 -1
  44. package/tools/cart/items/clear-cart-items.js +2 -2
  45. package/tools/cart/items/clear-cart-items.js.map +1 -1
  46. package/tools/cart/items/clear-cart-items.mjs +2 -2
  47. package/tools/cart/items/clear-cart-items.mjs.map +1 -1
  48. package/tools/cart/items/list-cart-items.js +2 -2
  49. package/tools/cart/items/list-cart-items.js.map +1 -1
  50. package/tools/cart/items/list-cart-items.mjs +2 -2
  51. package/tools/cart/items/list-cart-items.mjs.map +1 -1
  52. package/tools/cart/items/remove-cart-items.js +2 -2
  53. package/tools/cart/items/remove-cart-items.js.map +1 -1
  54. package/tools/cart/items/remove-cart-items.mjs +2 -2
  55. package/tools/cart/items/remove-cart-items.mjs.map +1 -1
  56. package/tools/checkout/session/confirm-checkout-session.js +1 -1
  57. package/tools/checkout/session/confirm-checkout-session.js.map +1 -1
  58. package/tools/checkout/session/confirm-checkout-session.mjs +1 -1
  59. package/tools/checkout/session/confirm-checkout-session.mjs.map +1 -1
  60. package/tools/checkout/session/create-checkout-session.js +1 -1
  61. package/tools/checkout/session/create-checkout-session.js.map +1 -1
  62. package/tools/checkout/session/create-checkout-session.mjs +1 -1
  63. package/tools/checkout/session/create-checkout-session.mjs.map +1 -1
  64. package/tools/orders/retrieve-status-orders.js +1 -1
  65. package/tools/orders/retrieve-status-orders.js.map +1 -1
  66. package/tools/orders/retrieve-status-orders.mjs +1 -1
  67. package/tools/orders/retrieve-status-orders.mjs.map +1 -1
  68. package/tools/products/retrieve-product-details.js +1 -1
  69. package/tools/products/retrieve-product-details.js.map +1 -1
  70. package/tools/products/retrieve-product-details.mjs +1 -1
  71. package/tools/products/retrieve-product-details.mjs.map +1 -1
  72. package/tools/products/search-products.js +1 -1
  73. package/tools/products/search-products.js.map +1 -1
  74. package/tools/products/search-products.mjs +1 -1
  75. package/tools/products/search-products.mjs.map +1 -1
  76. package/tools/wallet/collect-payment-details.js +1 -1
  77. package/tools/wallet/collect-payment-details.js.map +1 -1
  78. package/tools/wallet/collect-payment-details.mjs +1 -1
  79. package/tools/wallet/collect-payment-details.mjs.map +1 -1
package/code-tool.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.mjs","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAE,MAAM,WAAW;OAC5B,EAAE,aAAa,EAAE,MAAM,UAAU;AAQxC;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ;IAC5B,MAAM,QAAQ,GAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAC7E,MAAM,IAAI,GAAS;QACjB,IAAI,EAAE,SAAS;QACf,WAAW,EACT,khCAAkhC;QACphC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;KAC1E,CAAC;IAEF,2GAA2G;IAC3G,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;IACxE,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAE7D,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAa,EAA2B,EAAE;QACjF,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;QACzD,MAAM,EAAE,IAAI,EAAE,GAAG,IAAwB,CAAC;QAE1C,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE;YAChE,QAAQ,EAAE;gBACR,2BAA2B;gBAC3B,qCAAqC,UAAU,CAAC,OAA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;oBACjE,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,MAAM,CAAC,SAAS,EAAE,CAAC;QACrB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
package/http.js CHANGED
@@ -38,12 +38,12 @@ const newServer = ({ clientOptions, mcpOptions: defaultMcpOptions, req, res, })
38
38
  mcpOptions,
39
39
  });
40
40
  }
41
- catch {
41
+ catch (error) {
42
42
  res.status(401).json({
43
43
  jsonrpc: '2.0',
44
44
  error: {
45
45
  code: -32000,
46
- message: 'Unauthorized',
46
+ message: `Unauthorized: ${error instanceof Error ? error.message : error}`,
47
47
  },
48
48
  });
49
49
  return null;
package/http.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAGtF,0FAAmG;AAEnG,sDAA8B;AAC9B,gDAAoD;AACpD,0CAA0D;AAC1D,wCAAsE;AACtE,0CAA6C;AAE7C,MAAM,SAAS,GAAG,CAAC,EACjB,aAAa,EACb,UAAU,EAAE,iBAAiB,EAC7B,GAAG,EACH,GAAG,GAMJ,EAAoB,EAAE;IACrB,MAAM,MAAM,GAAG,IAAA,qBAAY,GAAE,CAAC;IAE9B,IAAI,UAAsB,CAAC;IAC3B,IAAI,CAAC;QACH,UAAU,GAAG,IAAA,2BAAiB,EAAC,iBAAiB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACnB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE;gBACL,IAAI,EAAE,CAAC,KAAK;gBACZ,OAAO,EAAE,oBAAoB,IAAA,cAAS,EAAC,KAAK,CAAC,EAAE;aAChD;SAC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K,CAAC,4CAA4C,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;SAAM,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CAAC,iDAAiD,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACjF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,0BAA0B,8BAYrC"}
package/http.mjs CHANGED
@@ -32,12 +32,12 @@ const newServer = ({ clientOptions, mcpOptions: defaultMcpOptions, req, res, })
32
32
  mcpOptions,
33
33
  });
34
34
  }
35
- catch {
35
+ catch (error) {
36
36
  res.status(401).json({
37
37
  jsonrpc: '2.0',
38
38
  error: {
39
39
  code: -32000,
40
- message: 'Unauthorized',
40
+ message: `Unauthorized: ${error instanceof Error ? error.message : error}`,
41
41
  },
42
42
  });
43
43
  return null;
package/http.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"http.mjs","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,6BAA6B,EAAE,MAAM,oDAAoD;OAE3F,OAAO,MAAM,SAAS;OACtB,EAAE,SAAS,EAAE,MAAM,yBAAyB;OAC5C,EAAc,iBAAiB,EAAE;OACjC,EAAiB,aAAa,EAAE,YAAY,EAAE;OAC9C,EAAE,gBAAgB,EAAE;AAE3B,MAAM,SAAS,GAAG,CAAC,EACjB,aAAa,EACb,UAAU,EAAE,iBAAiB,EAC7B,GAAG,EACH,GAAG,GAMJ,EAAoB,EAAE;IACrB,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAE9B,IAAI,UAAsB,CAAC;IAC3B,IAAI,CAAC;QACH,UAAU,GAAG,iBAAiB,CAAC,iBAAiB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,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M,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAEjC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,4CAA4C,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;SAAM,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CAAC,iDAAiD,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACjF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henrylabs/mcp",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "The official MCP Server for the Henry SDK API",
5
5
  "author": "Henry SDK <lawrence@henry.social>",
6
6
  "types": "./index.d.ts",
@@ -27,12 +27,13 @@
27
27
  "fix": "eslint --fix --ext ts,js ."
28
28
  },
29
29
  "dependencies": {
30
- "@henrylabs/sdk": "^0.8.0",
30
+ "@henrylabs/sdk": "^0.10.0",
31
31
  "@cloudflare/cabidela": "^0.2.4",
32
32
  "@modelcontextprotocol/sdk": "^1.11.5",
33
33
  "@valtown/deno-http-worker": "^0.0.21",
34
34
  "cors": "^2.8.5",
35
35
  "express": "^5.1.0",
36
+ "fuse.js": "^7.1.0",
36
37
  "jq-web": "https://github.com/stainless-api/jq-web/releases/download/v0.8.6/jq-web.tar.gz",
37
38
  "qs": "^6.14.0",
38
39
  "typescript": "5.8.3",
package/server.js CHANGED
@@ -22,7 +22,7 @@ var tools_2 = require("./tools.js");
22
22
  Object.defineProperty(exports, "endpoints", { enumerable: true, get: function () { return tools_2.endpoints; } });
23
23
  const newMcpServer = () => new mcp_js_1.McpServer({
24
24
  name: 'henrylabs_sdk_api',
25
- version: '0.8.0',
25
+ version: '0.10.0',
26
26
  }, { capabilities: { tools: {}, logging: {} } });
27
27
  exports.newMcpServer = newMcpServer;
28
28
  // Create server instance
package/server.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAgDtF,sCA+FC;AAKD,kCAyBC;AAKD,wCAYC;AA3LD,oEAAoE;AACpE,sCAAsE;AACtE,iEAM4C;AAE5C,yDAAsC;AACtC,wCAMkB;AAClB,sDAA+C;AAC/C,8CAAuC;AACvC,6EAAgD;AAIhD,sCAAsC;AAA7B,oGAAA,UAAU,OAAA;AAGnB,oCAAoC;AAA3B,kGAAA,SAAS,OAAA;AAEX,MAAM,YAAY,GAAG,GAAG,EAAE,CAC/B,IAAI,kBAAS,CACX;IACE,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,OAAO;CACjB,EACD,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAC7C,CAAC;AAPS,QAAA,YAAY,gBAOrB;AAEJ,yBAAyB;AACZ,QAAA,MAAM,GAAG,IAAA,oBAAY,GAAE,CAAC;AAErC;;;GAGG;AACH,SAAgB,aAAa,CAAC,MAI7B;IACC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,YAAY,kBAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzF,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;IAE3C,IAAI,iBAAiB,GAAsB,IAAI,CAAC;IAChD,IAAI,WAAW,GAAoC,IAAI,CAAC;IAExD,MAAM,SAAS,GAAG,KAAK,EAAE,cAA+B,EAAE,EAAE;QAC1D,IAAI,cAAc,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,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AM,OAAO,GAAG,EAAE,GAAG,kCAAyB,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC1E,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,IAAI,EAAE,CAAC;QAC/B,IAAI,GAAG,IAAA,0BAAiB,EAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,MAAM,OAAO,CAAC,MAAM,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC;AAEM,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;IACxD,CAAC;SAAM,IAAI,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QAC3D,OAAQ,UAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO;AACT,CAAC,CAAC;AAPW,QAAA,OAAO,WAOlB;AAEK,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE;IACpD,IAAI,QAAQ,GAAG,IAAA,eAAO,EAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,aAAa,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AANW,QAAA,cAAc,kBAMzB"}
package/server.mjs CHANGED
@@ -11,7 +11,7 @@ export { ClientType } from "./compat.mjs";
11
11
  export { endpoints } from "./tools.mjs";
12
12
  export const newMcpServer = () => new McpServer({
13
13
  name: 'henrylabs_sdk_api',
14
- version: '0.8.0',
14
+ version: '0.10.0',
15
15
  }, { capabilities: { tools: {}, logging: {} } });
16
16
  // Create server instance
17
17
  export const server = newMcpServer();
package/server.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"server.mjs","sourceRoot":"","sources":["src/server.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,SAAS,EAAE,MAAM,yCAAyC;OAC5D,EAAY,SAAS,EAAmB,KAAK,EAAE;OAC/C,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,GAGtB,MAAM,oCAAoC;OAEpC,QAAQ,MAAM,gBAAgB;OAC9B,EACL,iCAAiC,EAEjC,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,GAClB;OACM,EAAE,YAAY,EAAE;OAChB,EAAE,QAAQ,EAAE;OACZ,cAAc;OAId,EAAE,UAAU,EAAE;OAGd,EAAE,SAAS,EAAE;AAEpB,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAC/B,IAAI,SAAS,CACX;IACE,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,OAAO;CACjB,EACD,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAC7C,CAAC;AAEJ,yBAAyB;AACzB,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,EAAE,CAAC;AAErC;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,MAI7B;IACC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,YAAY,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC;IACzF,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;IAE3C,IAAI,iBAAiB,GAAsB,IAAI,CAAC;IAChD,IAAI,WAAW,GAAoC,IAAI,CAAC;IAExD,MAAM,SAAS,GAAG,KAAK,EAAE,cAA+B,EAAE,EAAE;QAC1D,IAAI,cAAc,I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tool-types';
@@ -39,8 +40,130 @@ function getRunFunctionNode(
39
40
  return null;
40
41
  }
41
42
 
43
+ const fuse = new Fuse(
44
+ [
45
+ 'client.products.retrieveDetails',
46
+ 'client.products.search',
47
+ 'client.products.variantCheck.create',
48
+ 'client.products.variantCheck.retrieveStatus',
49
+ 'client.cart.createCheckout',
50
+ 'client.cart.items.add',
51
+ 'client.cart.items.clear',
52
+ 'client.cart.items.list',
53
+ 'client.cart.items.remove',
54
+ 'client.checkout.session.confirmCheckout',
55
+ 'client.checkout.session.createQuote',
56
+ 'client.checkout.session.listProducts',
57
+ 'client.checkout.session.retrieveShippingInfo',
58
+ 'client.orders.retrieveStatus',
59
+ 'client.wallet.createCardCollection',
60
+ 'client.merchants.checkStatus',
61
+ 'client.merchants.getShippingInfo',
62
+ 'client.merchants.listSupported',
63
+ ],
64
+ { threshold: 1, shouldSort: true },
65
+ );
66
+
67
+ function getMethodSuggestions(fullyQualifiedMethodName: string): string[] {
68
+ return fuse
69
+ .search(fullyQualifiedMethodName)
70
+ .map(({ item }) => item)
71
+ .slice(0, 5);
72
+ }
73
+
74
+ const proxyToObj = new WeakMap<any, any>();
75
+ const objToProxy = new WeakMap<any, any>();
76
+
77
+ type ClientProxyConfig = {
78
+ path: string[];
79
+ isBelievedBad?: boolean;
80
+ };
81
+
82
+ function makeSdkProxy<T extends object>(obj: T, { path, isBelievedBad = false }: ClientProxyConfig): T {
83
+ let proxy: T = objToProxy.get(obj);
84
+
85
+ if (!proxy) {
86
+ proxy = new Proxy(obj, {
87
+ get(target, prop, receiver) {
88
+ const propPath = [...path, String(prop)];
89
+ const value = Reflect.get(target, prop, receiver);
90
+
91
+ if (isBelievedBad || (!(prop in target) && value === undefined)) {
92
+ // If we're accessing a path that doesn't exist, it will probably eventually error.
93
+ // Let's proxy it and mark it bad so that we can control the error message.
94
+ // We proxy an empty class so that an invocation or construction attempt is possible.
95
+ return makeSdkProxy(class {}, { path: propPath, isBelievedBad: true });
96
+ }
97
+
98
+ if (value !== null && (typeof value === 'object' || typeof value === 'function')) {
99
+ return makeSdkProxy(value, { path: propPath, isBelievedBad });
100
+ }
101
+
102
+ return value;
103
+ },
104
+
105
+ apply(target, thisArg, args) {
106
+ if (isBelievedBad || typeof target !== 'function') {
107
+ const fullyQualifiedMethodName = path.join('.');
108
+ const suggestions = getMethodSuggestions(fullyQualifiedMethodName);
109
+ throw new Error(
110
+ `${fullyQualifiedMethodName} is not a function. Did you mean: ${suggestions.join(', ')}`,
111
+ );
112
+ }
113
+
114
+ return Reflect.apply(target, proxyToObj.get(thisArg) ?? thisArg, args);
115
+ },
116
+
117
+ construct(target, args, newTarget) {
118
+ if (isBelievedBad || typeof target !== 'function') {
119
+ const fullyQualifiedMethodName = path.join('.');
120
+ const suggestions = getMethodSuggestions(fullyQualifiedMethodName);
121
+ throw new Error(
122
+ `${fullyQualifiedMethodName} is not a constructor. Did you mean: ${suggestions.join(', ')}`,
123
+ );
124
+ }
125
+
126
+ return Reflect.construct(target, args, newTarget);
127
+ },
128
+ });
129
+
130
+ objToProxy.set(obj, proxy);
131
+ proxyToObj.set(proxy, obj);
132
+ }
133
+
134
+ return proxy;
135
+ }
136
+
137
+ function parseError(code: string, error: unknown): string | undefined {
138
+ if (!(error instanceof Error)) return;
139
+ const message = error.name ? `${error.name}: ${error.message}` : error.message;
140
+ try {
141
+ // Deno uses V8; the first "<anonymous>:LINE:COLUMN" is the top of stack.
142
+ const lineNumber = error.stack?.match(/<anonymous>:([0-9]+):[0-9]+/)?.[1];
143
+ // -1 for the zero-based indexing
144
+ const line =
145
+ lineNumber &&
146
+ code
147
+ .split('\n')
148
+ .at(parseInt(lineNumber, 10) - 1)
149
+ ?.trim();
150
+ return line ? `${message}\n at line ${lineNumber}\n ${line}` : message;
151
+ } catch {
152
+ return message;
153
+ }
154
+ }
155
+
42
156
  const fetch = async (req: Request): Promise<Response> => {
43
157
  const { opts, code } = (await req.json()) as WorkerInput;
158
+ if (code == null) {
159
+ return Response.json(
160
+ {
161
+ message:
162
+ 'The code param is missing. Provide one containing a top-level `run` function. Write code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```',
163
+ } satisfies WorkerError,
164
+ { status: 400, statusText: 'Code execution error' },
165
+ );
166
+ }
44
167
 
45
168
  const runFunctionNode = getRunFunctionNode(code);
46
169
  if (!runFunctionNode) {
@@ -69,21 +192,17 @@ const fetch = async (req: Request): Promise<Response> => {
69
192
  };
70
193
  try {
71
194
  let run_ = async (client: any) => {};
72
- eval(`
73
- ${code}
74
- run_ = run;
75
- `);
76
- const result = await run_(client);
195
+ eval(`${code}\nrun_ = run;`);
196
+ const result = await run_(makeSdkProxy(client, { path: ['client'] }));
77
197
  return Response.json({
78
198
  result,
79
199
  logLines,
80
200
  errLines,
81
201
  } satisfies WorkerSuccess);
82
202
  } catch (e) {
83
- const message = e instanceof Error ? e.message : undefined;
84
203
  return Response.json(
85
204
  {
86
- message,
205
+ message: parseError(code, e),
87
206
  } satisfies WorkerError,
88
207
  { status: 400, statusText: 'Code execution error' },
89
208
  );
package/src/code-tool.ts CHANGED
@@ -23,7 +23,7 @@ export async function codeTool(): Promise<Endpoint> {
23
23
  const tool: Tool = {
24
24
  name: 'execute',
25
25
  description:
26
- 'Runs TypeScript code to interact with the API.\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized client, and it will be run.\nDo not initialize a client, but instead use the client that you are given as a parameter.\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
26
+ 'Runs JavaScript code to interact with the API.\n\nYou are a skilled programmer writing code to interface with the service.\nDefine an async function named "run" that takes a single parameter of an initialized client named "client", and it will be run.\nWrite code within this template:\n\n```\nasync function run(client) {\n // Fill this out\n}\n```\n\nYou will be returned anything that your function returns, plus the results of any console.log statements.\nIf any code triggers an error, the tool will return an error response, so you do not need to add error handling unless you want to output something more helpful than the raw error.\nIt is not necessary to add comments to code, unless by adding those comments you believe that you can generate better code.\nThis code will run in a container, and you will not be able to use fetch or otherwise interact with the network calls other than through the client you are given.\nAny variables you define won\'t live between successive uses of this call, so make sure to return or log any data you might need later.',
27
27
  inputSchema: { type: 'object', properties: { code: { type: 'string' } } },
28
28
  };
29
29
 
package/src/http.ts CHANGED
@@ -46,12 +46,12 @@ const newServer = ({
46
46
  },
47
47
  mcpOptions,
48
48
  });
49
- } catch {
49
+ } catch (error) {
50
50
  res.status(401).json({
51
51
  jsonrpc: '2.0',
52
52
  error: {
53
53
  code: -32000,
54
- message: 'Unauthorized',
54
+ message: `Unauthorized: ${error instanceof Error ? error.message : error}`,
55
55
  },
56
56
  });
57
57
  return null;
package/src/server.ts CHANGED
@@ -34,7 +34,7 @@ export const newMcpServer = () =>
34
34
  new McpServer(
35
35
  {
36
36
  name: 'henrylabs_sdk_api',
37
- version: '0.8.0',
37
+ version: '0.10.0',
38
38
  },
39
39
  { capabilities: { tools: {}, logging: {} } },
40
40
  );
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'create_cart_checkout',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGenerates a hosted checkout URL for the user's cart. The page walks the buyer through reviewing the order, entering shipping, payment information, and confirming the purchase.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/cart_create_checkout_response',\n $defs: {\n cart_create_checkout_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n checkout_url: {\n type: 'string'\n }\n },\n required: [ 'checkout_url'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGenerates a fully-hosted checkout URL for the user's cart. This is the SIMPLEST checkout method.\n\nThe hosted page handles:\n- Order review\n- Shipping address collection\n- Payment information (via Stripe)\n- Order confirmation\n- All UI and validation\n\nReturns: checkout_url (direct link for user to complete purchase)\n\nParameters:\n- auth: true (default) - requires user authentication, false for guest checkout\n\nUse this when:\n- You want a quick, complete checkout solution\n- Don't need custom checkout UI\n- Want Stripe to handle payment collection\n\nFor custom checkout UI, use the headless flow instead:\ncreate_checkout_session → collect_payment_details → confirm_checkout_session\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/cart_create_checkout_response',\n $defs: {\n cart_create_checkout_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n checkout_url: {\n type: 'string'\n }\n },\n required: [ 'checkout_url'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -9,7 +9,7 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'cart.items',
11
11
  operation: 'write',
12
- tags: ['hosted'],
12
+ tags: ['headless', 'hosted'],
13
13
  httpMethod: 'post',
14
14
  httpPath: '/cart/items',
15
15
  operationId: 'addCartItems',
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'add_cart_items',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nAdds product data to existing cart or create a new one.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_add_response',\n $defs: {\n item_add_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n added_products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n price: {\n type: 'string'\n },\n productId: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'name',\n 'price',\n 'productId',\n 'quantity'\n ]\n }\n },\n cart_summary: {\n type: 'object',\n properties: {\n total_items: {\n type: 'number'\n },\n total_unique_products: {\n type: 'number'\n }\n },\n required: [ 'total_items',\n 'total_unique_products'\n ]\n },\n updated_products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n addedQuantity: {\n type: 'number'\n },\n name: {\n type: 'string'\n },\n previousQuantity: {\n type: 'number'\n },\n price: {\n type: 'string'\n },\n productId: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'addedQuantity',\n 'name',\n 'previousQuantity',\n 'price',\n 'productId',\n 'quantity'\n ]\n }\n },\n variant_checks: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n productId: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n variantCheckRequestId: {\n type: 'string'\n }\n },\n required: [ 'productId',\n 'status',\n 'variantCheckRequestId'\n ]\n }\n }\n },\n required: [ 'added_products',\n 'cart_summary',\n 'updated_products'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nAdd products to cart or update quantities if already in cart.\n\nRequired fields per product:\n- name: Product name (from retrieve_product_details)\n- price: Price as string, e.g. \"29.99\" (from stores[0].price)\n- productLink: Store URL (from stores[0].link - MUST call retrieve_product_details first)\n- quantity: Number of items\n\nOptional but IMPORTANT:\n- metadata: Object containing variant selections (size, color, etc.)\n Example: {\"size\": \"Large\", \"color\": \"Blue\"}\n- productImageLink: Thumbnail URL (from thumbnails[0])\n- affiliateProductLink: Use instead of productLink for affiliate tracking\n- productId: Include for easier tracking\n\nVARIANT HANDLING:\nIf retrieve_product_details shows variants array, you MUST:\n1. Show variants to user: \"Available sizes: S, M, L, XL\"\n2. Get user's selection\n3. Include in metadata: {\"size\": \"L\"}\n\nOptional: Set checkVariantAvailability: true to verify variants exist at stores\n\nReturns:\n- added_products: New items in cart\n- updated_products: Items with quantity increases\n- cart_summary: total_items and total_unique_products\n- variant_checks: Availability verification results (if requested)\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_add_response',\n $defs: {\n item_add_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n added_products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n price: {\n type: 'string'\n },\n productId: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'name',\n 'price',\n 'productId',\n 'quantity'\n ]\n }\n },\n cart_summary: {\n type: 'object',\n properties: {\n total_items: {\n type: 'number'\n },\n total_unique_products: {\n type: 'number'\n }\n },\n required: [ 'total_items',\n 'total_unique_products'\n ]\n },\n updated_products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n addedQuantity: {\n type: 'number'\n },\n name: {\n type: 'string'\n },\n previousQuantity: {\n type: 'number'\n },\n price: {\n type: 'string'\n },\n productId: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n }\n },\n required: [ 'addedQuantity',\n 'name',\n 'previousQuantity',\n 'price',\n 'productId',\n 'quantity'\n ]\n }\n },\n variant_checks: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n productId: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n variantCheckRequestId: {\n type: 'string'\n }\n },\n required: [ 'productId',\n 'status',\n 'variantCheckRequestId'\n ]\n }\n }\n },\n required: [ 'added_products',\n 'cart_summary',\n 'updated_products'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -9,7 +9,7 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'cart.items',
11
11
  operation: 'write',
12
- tags: ['hosted'],
12
+ tags: ['headless', 'hosted'],
13
13
  httpMethod: 'delete',
14
14
  httpPath: '/cart/items',
15
15
  operationId: 'deleteAllCartItems',
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'clear_cart_items',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete all products from the cart\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_clear_response',\n $defs: {\n item_clear_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRemove ALL products from the cart. Cannot be undone.\n\nUse when:\n- User wants to start over\n- Clearing abandoned cart\n- After successful order completion\n\nReturns success confirmation message.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_clear_response',\n $defs: {\n item_clear_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -9,7 +9,7 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'cart.items',
11
11
  operation: 'read',
12
- tags: ['hosted'],
12
+ tags: ['headless', 'hosted'],
13
13
  httpMethod: 'get',
14
14
  httpPath: '/cart/items',
15
15
  operationId: 'getCartItems',
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'list_cart_items',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet all products from the cart\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_list_response',\n $defs: {\n item_list_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'Product name'\n },\n price: {\n type: 'string',\n description: 'Product price'\n },\n productLink: {\n type: 'string',\n description: 'Product link'\n },\n quantity: {\n type: 'number',\n description: 'Quantity'\n },\n affiliateProductLink: {\n type: 'string',\n description: 'Affiliate product link (if provided, will be used instead of productLink for order fulfillment)'\n },\n metadata: {\n type: 'object',\n description: 'Product metadata',\n additionalProperties: true\n },\n productId: {\n type: 'string',\n description: 'Product Id'\n },\n productImageLink: {\n type: 'string',\n description: 'Product image link (thumbnail)'\n }\n },\n required: [ 'name',\n 'price',\n 'productLink',\n 'quantity'\n ]\n }\n }\n },\n required: [ 'products'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve all products currently in the user's cart.\n\nReturns products array with:\n- name, price, productLink, quantity\n- productId (if provided when added)\n- metadata (variant selections)\n- productImageLink (thumbnail)\n- affiliateProductLink (if used)\n\nUse this to:\n- Show cart contents before checkout\n- Calculate totals\n- Verify items before creating checkout\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_list_response',\n $defs: {\n item_list_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string',\n description: 'Product name'\n },\n price: {\n type: 'string',\n description: 'Product price'\n },\n productLink: {\n type: 'string',\n description: 'Product link'\n },\n quantity: {\n type: 'number',\n description: 'Quantity'\n },\n affiliateProductLink: {\n type: 'string',\n description: 'Affiliate product link (if provided, will be used instead of productLink for order fulfillment)'\n },\n metadata: {\n type: 'object',\n description: 'Product metadata',\n additionalProperties: true\n },\n productId: {\n type: 'string',\n description: 'Product Id'\n },\n productImageLink: {\n type: 'string',\n description: 'Product image link (thumbnail)'\n }\n },\n required: [ 'name',\n 'price',\n 'productLink',\n 'quantity'\n ]\n }\n }\n },\n required: [ 'products'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -9,7 +9,7 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'cart.items',
11
11
  operation: 'write',
12
- tags: ['hosted'],
12
+ tags: ['headless', 'hosted'],
13
13
  httpMethod: 'delete',
14
14
  httpPath: '/cart/items/{productId}',
15
15
  operationId: 'deleteCartItem',
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'remove_cart_items',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nDelete a product from the cart\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_remove_response',\n $defs: {\n item_remove_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRemove a specific product from the cart by its productId.\n\nRequired: productId (must match the ID used when adding item)\n\nReturns success confirmation message.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/item_remove_response',\n $defs: {\n item_remove_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'confirm_checkout_session',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nConfirms the checkout session and creates an order for the user. Returns an order ID that can be used to view order status\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_confirm_checkout_response',\n $defs: {\n session_confirm_checkout_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n currency: {\n type: 'string'\n },\n grandTotal: {\n type: 'string'\n },\n products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n productName: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n },\n productMetadata: {\n type: 'object',\n additionalProperties: true\n }\n },\n required: [ 'productName',\n 'quantity'\n ]\n }\n },\n shipping: {\n type: 'string'\n },\n shippingDetails: {\n type: 'object',\n properties: {\n addressLine1: {\n type: 'string',\n description: 'Address line 1'\n },\n city: {\n type: 'string',\n description: 'City'\n },\n countryCode: {\n type: 'string',\n description: 'Country code'\n },\n email: {\n type: 'string',\n description: 'Email'\n },\n fullName: {\n type: 'string',\n description: 'Full name'\n },\n phoneNumber: {\n type: 'string',\n description: 'Phone number'\n },\n postalCode: {\n type: 'string',\n description: 'Postal code'\n },\n stateOrProvince: {\n type: 'string',\n description: 'State or province'\n },\n addressLine2: {\n type: 'string',\n description: 'Address line 2'\n }\n },\n required: [ 'addressLine1',\n 'city',\n 'countryCode',\n 'email',\n 'fullName',\n 'phoneNumber',\n 'postalCode',\n 'stateOrProvince'\n ]\n },\n status: {\n type: 'string'\n },\n statusMessage: {\n type: 'string'\n },\n subtotal: {\n type: 'string'\n },\n tax: {\n type: 'string'\n },\n cardLast4: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'currency',\n 'grandTotal',\n 'products',\n 'shipping',\n 'shippingDetails',\n 'status',\n 'statusMessage',\n 'subtotal',\n 'tax'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nFinalize the checkout and create an order. Returns order details with order ID.\n\nRequired:\n- x-session-token: From create_checkout_session\n- shippingDetails: Same address object used in create_checkout_session\n\nIMPORTANT: Must call collect_payment_details BEFORE this to save payment method.\n\nReturns order details:\n- id: Order ID (use with retrieve_status_orders)\n- products: List with productName, quantity, productMetadata\n- currency, subtotal, shipping, tax, grandTotal\n- shippingDetails: Delivery address\n- status: Order status (e.g., \"processing\")\n- statusMessage: Human-readable status\n- cardLast4: Last 4 digits of payment card (if available)\n\nAfter confirmation, provide order ID to user for tracking.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_confirm_checkout_response',\n $defs: {\n session_confirm_checkout_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n currency: {\n type: 'string'\n },\n grandTotal: {\n type: 'string'\n },\n products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n productName: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n },\n productMetadata: {\n type: 'object',\n additionalProperties: true\n }\n },\n required: [ 'productName',\n 'quantity'\n ]\n }\n },\n shipping: {\n type: 'string'\n },\n shippingDetails: {\n type: 'object',\n properties: {\n addressLine1: {\n type: 'string',\n description: 'Address line 1'\n },\n city: {\n type: 'string',\n description: 'City'\n },\n countryCode: {\n type: 'string',\n description: 'Country code'\n },\n email: {\n type: 'string',\n description: 'Email'\n },\n fullName: {\n type: 'string',\n description: 'Full name'\n },\n phoneNumber: {\n type: 'string',\n description: 'Phone number'\n },\n postalCode: {\n type: 'string',\n description: 'Postal code'\n },\n stateOrProvince: {\n type: 'string',\n description: 'State or province'\n },\n addressLine2: {\n type: 'string',\n description: 'Address line 2'\n }\n },\n required: [ 'addressLine1',\n 'city',\n 'countryCode',\n 'email',\n 'fullName',\n 'phoneNumber',\n 'postalCode',\n 'stateOrProvince'\n ]\n },\n status: {\n type: 'string'\n },\n statusMessage: {\n type: 'string'\n },\n subtotal: {\n type: 'string'\n },\n tax: {\n type: 'string'\n },\n cardLast4: {\n type: 'string'\n }\n },\n required: [ 'id',\n 'currency',\n 'grandTotal',\n 'products',\n 'shipping',\n 'shippingDetails',\n 'status',\n 'statusMessage',\n 'subtotal',\n 'tax'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'create_checkout_session',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreates or updates a checkout session with shipping details and returns pricing metadata plus a session token needed for confirming checkout\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_create_quote_response',\n $defs: {\n session_create_quote_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n order_metadata: {\n type: 'object',\n properties: {\n shipping: {\n type: 'object',\n additionalProperties: true\n },\n shipping_total: {\n type: 'number'\n },\n tax: {\n type: 'number'\n },\n total_price: {\n type: 'number'\n }\n },\n required: [ 'shipping',\n 'shipping_total',\n 'tax',\n 'total_price'\n ]\n },\n session_token: {\n type: 'string'\n }\n },\n required: [ 'order_metadata',\n 'session_token'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCreate/update a checkout session for headless checkout flow. Returns pricing breakdown and session token.\n\nRequired: shippingDetails object with:\n- fullName, email, phoneNumber\n- addressLine1, city, stateOrProvince, postalCode, countryCode\n- addressLine2 (optional)\n\nReturns:\n- order_metadata: shipping details, shipping_total, tax, total_price\n- session_token: Required for confirm_checkout_session\n\nThe session_token expires, so confirm checkout soon after receiving it.\n\nHeadless checkout flow:\n1. create_checkout_session (get quote + token)\n2. collect_payment_details (save card via modal)\n3. confirm_checkout_session (finalize order)\n\nUse hosted checkout (create_cart_checkout) for simpler implementation.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/session_create_quote_response',\n $defs: {\n session_create_quote_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n order_metadata: {\n type: 'object',\n properties: {\n shipping: {\n type: 'object',\n additionalProperties: true\n },\n shipping_total: {\n type: 'number'\n },\n tax: {\n type: 'number'\n },\n total_price: {\n type: 'number'\n }\n },\n required: [ 'shipping',\n 'shipping_total',\n 'tax',\n 'total_price'\n ]\n },\n session_token: {\n type: 'string'\n }\n },\n required: [ 'order_metadata',\n 'session_token'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -18,7 +18,7 @@ export const metadata: Metadata = {
18
18
  export const tool: Tool = {
19
19
  name: 'retrieve_status_orders',
20
20
  description:
21
- "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nRetrieve the status and details of an order given order ID\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/order_retrieve_status_response',\n $defs: {\n order_retrieve_status_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n currency: {\n type: 'string'\n },\n grandTotal: {\n type: 'string'\n },\n products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n productName: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n },\n productMetadata: {\n type: 'object',\n additionalProperties: true\n }\n },\n required: [ 'productName',\n 'quantity'\n ]\n }\n },\n shipping: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n statusMessage: {\n type: 'string'\n },\n subtotal: {\n type: 'string'\n },\n tax: {\n type: 'string'\n },\n userId: {\n type: 'string'\n },\n shippingDetails: {\n type: 'object',\n properties: {\n addressLine1: {\n type: 'string'\n },\n city: {\n type: 'string'\n },\n countryCode: {\n type: 'string'\n },\n email: {\n type: 'string'\n },\n fullName: {\n type: 'string'\n },\n phoneNumber: {\n type: 'string'\n },\n postalCode: {\n type: 'string'\n },\n stateOrProvince: {\n type: 'string'\n },\n addressLine2: {\n type: 'string'\n }\n },\n required: [ 'addressLine1',\n 'city',\n 'countryCode',\n 'email',\n 'fullName',\n 'phoneNumber',\n 'postalCode',\n 'stateOrProvince'\n ]\n }\n },\n required: [ 'id',\n 'currency',\n 'grandTotal',\n 'products',\n 'shipping',\n 'status',\n 'statusMessage',\n 'subtotal',\n 'tax',\n 'userId'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
21
+ "When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nCheck the status and details of an order using its order ID.\n\nReturns:\n- id: Order ID\n- status: Current order status (e.g., \"processing\", \"shipped\", \"delivered\")\n- statusMessage: Detailed status description\n- products: Array with productName, quantity, productMetadata (variants)\n- currency, subtotal, shipping, tax, grandTotal\n- shippingDetails: Full delivery address\n- userId: User who placed order\n- cardLast4: Payment card used (last 4 digits)\n\nUse for:\n- Order tracking\n- Status updates\n- Order history\n- Customer support\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/order_retrieve_status_response',\n $defs: {\n order_retrieve_status_response: {\n type: 'object',\n properties: {\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n },\n data: {\n type: 'object',\n properties: {\n id: {\n type: 'string'\n },\n currency: {\n type: 'string'\n },\n grandTotal: {\n type: 'string'\n },\n products: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n productName: {\n type: 'string'\n },\n quantity: {\n type: 'number'\n },\n productMetadata: {\n type: 'object',\n additionalProperties: true\n }\n },\n required: [ 'productName',\n 'quantity'\n ]\n }\n },\n shipping: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n statusMessage: {\n type: 'string'\n },\n subtotal: {\n type: 'string'\n },\n tax: {\n type: 'string'\n },\n userId: {\n type: 'string'\n },\n shippingDetails: {\n type: 'object',\n properties: {\n addressLine1: {\n type: 'string'\n },\n city: {\n type: 'string'\n },\n countryCode: {\n type: 'string'\n },\n email: {\n type: 'string'\n },\n fullName: {\n type: 'string'\n },\n phoneNumber: {\n type: 'string'\n },\n postalCode: {\n type: 'string'\n },\n stateOrProvince: {\n type: 'string'\n },\n addressLine2: {\n type: 'string'\n }\n },\n required: [ 'addressLine1',\n 'city',\n 'countryCode',\n 'email',\n 'fullName',\n 'phoneNumber',\n 'postalCode',\n 'stateOrProvince'\n ]\n }\n },\n required: [ 'id',\n 'currency',\n 'grandTotal',\n 'products',\n 'shipping',\n 'status',\n 'statusMessage',\n 'subtotal',\n 'tax',\n 'userId'\n ]\n }\n },\n required: [ 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {