@henrylabs/mcp 0.2.0 → 0.4.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 (209) hide show
  1. package/README.md +13 -40
  2. package/code-tool.d.mts.map +1 -1
  3. package/code-tool.d.ts.map +1 -1
  4. package/code-tool.js +0 -1
  5. package/code-tool.js.map +1 -1
  6. package/code-tool.mjs +0 -1
  7. package/code-tool.mjs.map +1 -1
  8. package/headers.d.mts.map +1 -1
  9. package/headers.d.ts.map +1 -1
  10. package/headers.js +1 -4
  11. package/headers.js.map +1 -1
  12. package/headers.mjs +1 -4
  13. package/headers.mjs.map +1 -1
  14. package/package.json +2 -2
  15. package/server.js +1 -1
  16. package/server.mjs +1 -1
  17. package/src/code-tool.ts +0 -1
  18. package/src/headers.ts +1 -5
  19. package/src/server.ts +1 -1
  20. package/src/tools/cart/{create-checkout-cart.ts → create-cart-checkout.ts} +3 -3
  21. package/src/tools/checkout/session/confirm-checkout-session.ts +101 -0
  22. package/src/tools/checkout/session/{create-quote-checkout-session.ts → create-checkout-session.ts} +2 -2
  23. package/src/tools/index.ts +10 -32
  24. package/src/tools/orders/retrieve-status-orders.ts +1 -1
  25. package/src/tools/products/retrieve-product-details.ts +48 -0
  26. package/src/tools/products/search-products.ts +1 -1
  27. package/src/tools/wallet/{create-card-collection-wallet.ts → collect-payment-details.ts} +3 -3
  28. package/tools/cart/{create-checkout-cart.d.mts → create-cart-checkout.d.mts} +1 -1
  29. package/tools/cart/{create-checkout-cart.d.mts.map → create-cart-checkout.d.mts.map} +1 -1
  30. package/tools/cart/{items/clear-cart-items.d.mts → create-cart-checkout.d.ts} +1 -1
  31. package/tools/cart/{create-checkout-cart.d.ts.map → create-cart-checkout.d.ts.map} +1 -1
  32. package/tools/cart/{create-checkout-cart.js → create-cart-checkout.js} +4 -4
  33. package/tools/cart/create-cart-checkout.js.map +1 -0
  34. package/tools/cart/{create-checkout-cart.mjs → create-cart-checkout.mjs} +4 -4
  35. package/tools/cart/create-cart-checkout.mjs.map +1 -0
  36. package/tools/checkout/session/confirm-checkout-session.d.mts +45 -0
  37. package/tools/checkout/session/confirm-checkout-session.d.mts.map +1 -0
  38. package/tools/{cart/create-checkout-cart.d.ts → checkout/session/confirm-checkout-session.d.ts} +1 -1
  39. package/tools/checkout/session/confirm-checkout-session.d.ts.map +1 -0
  40. package/tools/checkout/session/confirm-checkout-session.js +94 -0
  41. package/tools/checkout/session/confirm-checkout-session.js.map +1 -0
  42. package/tools/checkout/session/confirm-checkout-session.mjs +90 -0
  43. package/tools/checkout/session/confirm-checkout-session.mjs.map +1 -0
  44. package/tools/checkout/session/create-checkout-session.d.mts +45 -0
  45. package/tools/checkout/session/create-checkout-session.d.mts.map +1 -0
  46. package/tools/{cart/items/add-cart-items.d.mts → checkout/session/create-checkout-session.d.ts} +1 -1
  47. package/tools/checkout/session/create-checkout-session.d.ts.map +1 -0
  48. package/tools/checkout/session/{create-quote-checkout-session.js → create-checkout-session.js} +3 -3
  49. package/tools/checkout/session/create-checkout-session.js.map +1 -0
  50. package/tools/checkout/session/{create-quote-checkout-session.mjs → create-checkout-session.mjs} +3 -3
  51. package/tools/checkout/session/create-checkout-session.mjs.map +1 -0
  52. package/tools/index.d.mts.map +1 -1
  53. package/tools/index.d.ts.map +1 -1
  54. package/tools/index.js +10 -32
  55. package/tools/index.js.map +1 -1
  56. package/tools/index.mjs +10 -32
  57. package/tools/index.mjs.map +1 -1
  58. package/tools/orders/retrieve-status-orders.js +1 -1
  59. package/tools/orders/retrieve-status-orders.js.map +1 -1
  60. package/tools/orders/retrieve-status-orders.mjs +1 -1
  61. package/tools/orders/retrieve-status-orders.mjs.map +1 -1
  62. package/tools/products/retrieve-product-details.d.mts +45 -0
  63. package/tools/products/retrieve-product-details.d.mts.map +1 -0
  64. package/tools/products/retrieve-product-details.d.ts +45 -0
  65. package/tools/products/retrieve-product-details.d.ts.map +1 -0
  66. package/tools/products/retrieve-product-details.js +43 -0
  67. package/tools/products/retrieve-product-details.js.map +1 -0
  68. package/tools/products/retrieve-product-details.mjs +39 -0
  69. package/tools/products/retrieve-product-details.mjs.map +1 -0
  70. package/tools/products/search-products.js +1 -1
  71. package/tools/products/search-products.js.map +1 -1
  72. package/tools/products/search-products.mjs +1 -1
  73. package/tools/products/search-products.mjs.map +1 -1
  74. package/tools/wallet/collect-payment-details.d.mts +45 -0
  75. package/tools/wallet/collect-payment-details.d.mts.map +1 -0
  76. package/tools/{cart/items/add-cart-items.d.ts → wallet/collect-payment-details.d.ts} +1 -1
  77. package/tools/wallet/collect-payment-details.d.ts.map +1 -0
  78. package/tools/wallet/{create-card-collection-wallet.js → collect-payment-details.js} +4 -4
  79. package/tools/wallet/collect-payment-details.js.map +1 -0
  80. package/tools/wallet/{create-card-collection-wallet.mjs → collect-payment-details.mjs} +4 -4
  81. package/tools/wallet/collect-payment-details.mjs.map +1 -0
  82. package/src/tools/cart/items/add-cart-items.ts +0 -93
  83. package/src/tools/cart/items/clear-cart-items.ts +0 -47
  84. package/src/tools/cart/items/list-cart-items.ts +0 -47
  85. package/src/tools/cart/items/remove-cart-items.ts +0 -50
  86. package/src/tools/checkout/session/confirm-checkout-checkout-session.ts +0 -101
  87. package/src/tools/checkout/session/list-products-checkout-session.ts +0 -47
  88. package/src/tools/checkout/session/retrieve-shipping-info-checkout-session.ts +0 -49
  89. package/src/tools/merchants/check-status-merchants.ts +0 -56
  90. package/src/tools/merchants/get-shipping-info-merchants.ts +0 -60
  91. package/src/tools/merchants/list-supported-merchants.ts +0 -52
  92. package/src/tools/products/retrieve-details-products.ts +0 -48
  93. package/src/tools/products/variant-check/create-products-variant-check.ts +0 -85
  94. package/src/tools/products/variant-check/retrieve-status-products-variant-check.ts +0 -50
  95. package/tools/cart/create-checkout-cart.js.map +0 -1
  96. package/tools/cart/create-checkout-cart.mjs.map +0 -1
  97. package/tools/cart/items/add-cart-items.d.mts.map +0 -1
  98. package/tools/cart/items/add-cart-items.d.ts.map +0 -1
  99. package/tools/cart/items/add-cart-items.js +0 -86
  100. package/tools/cart/items/add-cart-items.js.map +0 -1
  101. package/tools/cart/items/add-cart-items.mjs +0 -82
  102. package/tools/cart/items/add-cart-items.mjs.map +0 -1
  103. package/tools/cart/items/clear-cart-items.d.mts.map +0 -1
  104. package/tools/cart/items/clear-cart-items.d.ts +0 -45
  105. package/tools/cart/items/clear-cart-items.d.ts.map +0 -1
  106. package/tools/cart/items/clear-cart-items.js +0 -42
  107. package/tools/cart/items/clear-cart-items.js.map +0 -1
  108. package/tools/cart/items/clear-cart-items.mjs +0 -38
  109. package/tools/cart/items/clear-cart-items.mjs.map +0 -1
  110. package/tools/cart/items/list-cart-items.d.mts +0 -45
  111. package/tools/cart/items/list-cart-items.d.mts.map +0 -1
  112. package/tools/cart/items/list-cart-items.d.ts +0 -45
  113. package/tools/cart/items/list-cart-items.d.ts.map +0 -1
  114. package/tools/cart/items/list-cart-items.js +0 -42
  115. package/tools/cart/items/list-cart-items.js.map +0 -1
  116. package/tools/cart/items/list-cart-items.mjs +0 -38
  117. package/tools/cart/items/list-cart-items.mjs.map +0 -1
  118. package/tools/cart/items/remove-cart-items.d.mts +0 -45
  119. package/tools/cart/items/remove-cart-items.d.mts.map +0 -1
  120. package/tools/cart/items/remove-cart-items.d.ts +0 -45
  121. package/tools/cart/items/remove-cart-items.d.ts.map +0 -1
  122. package/tools/cart/items/remove-cart-items.js +0 -45
  123. package/tools/cart/items/remove-cart-items.js.map +0 -1
  124. package/tools/cart/items/remove-cart-items.mjs +0 -41
  125. package/tools/cart/items/remove-cart-items.mjs.map +0 -1
  126. package/tools/checkout/session/confirm-checkout-checkout-session.d.mts +0 -45
  127. package/tools/checkout/session/confirm-checkout-checkout-session.d.mts.map +0 -1
  128. package/tools/checkout/session/confirm-checkout-checkout-session.d.ts +0 -45
  129. package/tools/checkout/session/confirm-checkout-checkout-session.d.ts.map +0 -1
  130. package/tools/checkout/session/confirm-checkout-checkout-session.js +0 -94
  131. package/tools/checkout/session/confirm-checkout-checkout-session.js.map +0 -1
  132. package/tools/checkout/session/confirm-checkout-checkout-session.mjs +0 -90
  133. package/tools/checkout/session/confirm-checkout-checkout-session.mjs.map +0 -1
  134. package/tools/checkout/session/create-quote-checkout-session.d.mts +0 -45
  135. package/tools/checkout/session/create-quote-checkout-session.d.mts.map +0 -1
  136. package/tools/checkout/session/create-quote-checkout-session.d.ts +0 -45
  137. package/tools/checkout/session/create-quote-checkout-session.d.ts.map +0 -1
  138. package/tools/checkout/session/create-quote-checkout-session.js.map +0 -1
  139. package/tools/checkout/session/create-quote-checkout-session.mjs.map +0 -1
  140. package/tools/checkout/session/list-products-checkout-session.d.mts +0 -45
  141. package/tools/checkout/session/list-products-checkout-session.d.mts.map +0 -1
  142. package/tools/checkout/session/list-products-checkout-session.d.ts +0 -45
  143. package/tools/checkout/session/list-products-checkout-session.d.ts.map +0 -1
  144. package/tools/checkout/session/list-products-checkout-session.js +0 -42
  145. package/tools/checkout/session/list-products-checkout-session.js.map +0 -1
  146. package/tools/checkout/session/list-products-checkout-session.mjs +0 -38
  147. package/tools/checkout/session/list-products-checkout-session.mjs.map +0 -1
  148. package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.mts +0 -45
  149. package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.mts.map +0 -1
  150. package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.ts +0 -45
  151. package/tools/checkout/session/retrieve-shipping-info-checkout-session.d.ts.map +0 -1
  152. package/tools/checkout/session/retrieve-shipping-info-checkout-session.js +0 -42
  153. package/tools/checkout/session/retrieve-shipping-info-checkout-session.js.map +0 -1
  154. package/tools/checkout/session/retrieve-shipping-info-checkout-session.mjs +0 -38
  155. package/tools/checkout/session/retrieve-shipping-info-checkout-session.mjs.map +0 -1
  156. package/tools/merchants/check-status-merchants.d.mts +0 -45
  157. package/tools/merchants/check-status-merchants.d.mts.map +0 -1
  158. package/tools/merchants/check-status-merchants.d.ts +0 -45
  159. package/tools/merchants/check-status-merchants.d.ts.map +0 -1
  160. package/tools/merchants/check-status-merchants.js +0 -48
  161. package/tools/merchants/check-status-merchants.js.map +0 -1
  162. package/tools/merchants/check-status-merchants.mjs +0 -44
  163. package/tools/merchants/check-status-merchants.mjs.map +0 -1
  164. package/tools/merchants/get-shipping-info-merchants.d.mts +0 -45
  165. package/tools/merchants/get-shipping-info-merchants.d.mts.map +0 -1
  166. package/tools/merchants/get-shipping-info-merchants.d.ts +0 -45
  167. package/tools/merchants/get-shipping-info-merchants.d.ts.map +0 -1
  168. package/tools/merchants/get-shipping-info-merchants.js +0 -55
  169. package/tools/merchants/get-shipping-info-merchants.js.map +0 -1
  170. package/tools/merchants/get-shipping-info-merchants.mjs +0 -51
  171. package/tools/merchants/get-shipping-info-merchants.mjs.map +0 -1
  172. package/tools/merchants/list-supported-merchants.d.mts +0 -45
  173. package/tools/merchants/list-supported-merchants.d.mts.map +0 -1
  174. package/tools/merchants/list-supported-merchants.d.ts +0 -45
  175. package/tools/merchants/list-supported-merchants.d.ts.map +0 -1
  176. package/tools/merchants/list-supported-merchants.js +0 -47
  177. package/tools/merchants/list-supported-merchants.js.map +0 -1
  178. package/tools/merchants/list-supported-merchants.mjs +0 -43
  179. package/tools/merchants/list-supported-merchants.mjs.map +0 -1
  180. package/tools/products/retrieve-details-products.d.mts +0 -45
  181. package/tools/products/retrieve-details-products.d.mts.map +0 -1
  182. package/tools/products/retrieve-details-products.d.ts +0 -45
  183. package/tools/products/retrieve-details-products.d.ts.map +0 -1
  184. package/tools/products/retrieve-details-products.js +0 -43
  185. package/tools/products/retrieve-details-products.js.map +0 -1
  186. package/tools/products/retrieve-details-products.mjs +0 -39
  187. package/tools/products/retrieve-details-products.mjs.map +0 -1
  188. package/tools/products/variant-check/create-products-variant-check.d.mts +0 -45
  189. package/tools/products/variant-check/create-products-variant-check.d.mts.map +0 -1
  190. package/tools/products/variant-check/create-products-variant-check.d.ts +0 -45
  191. package/tools/products/variant-check/create-products-variant-check.d.ts.map +0 -1
  192. package/tools/products/variant-check/create-products-variant-check.js +0 -79
  193. package/tools/products/variant-check/create-products-variant-check.js.map +0 -1
  194. package/tools/products/variant-check/create-products-variant-check.mjs +0 -75
  195. package/tools/products/variant-check/create-products-variant-check.mjs.map +0 -1
  196. package/tools/products/variant-check/retrieve-status-products-variant-check.d.mts +0 -45
  197. package/tools/products/variant-check/retrieve-status-products-variant-check.d.mts.map +0 -1
  198. package/tools/products/variant-check/retrieve-status-products-variant-check.d.ts +0 -45
  199. package/tools/products/variant-check/retrieve-status-products-variant-check.d.ts.map +0 -1
  200. package/tools/products/variant-check/retrieve-status-products-variant-check.js +0 -43
  201. package/tools/products/variant-check/retrieve-status-products-variant-check.js.map +0 -1
  202. package/tools/products/variant-check/retrieve-status-products-variant-check.mjs +0 -39
  203. package/tools/products/variant-check/retrieve-status-products-variant-check.mjs.map +0 -1
  204. package/tools/wallet/create-card-collection-wallet.d.mts +0 -45
  205. package/tools/wallet/create-card-collection-wallet.d.mts.map +0 -1
  206. package/tools/wallet/create-card-collection-wallet.d.ts +0 -45
  207. package/tools/wallet/create-card-collection-wallet.d.ts.map +0 -1
  208. package/tools/wallet/create-card-collection-wallet.js.map +0 -1
  209. package/tools/wallet/create-card-collection-wallet.mjs.map +0 -1
@@ -1,42 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.handler = exports.tool = exports.metadata = void 0;
5
- const filtering_1 = require("@henrylabs/mcp/filtering");
6
- const types_1 = require("@henrylabs/mcp/tools/types");
7
- exports.metadata = {
8
- resource: 'cart.items',
9
- operation: 'read',
10
- tags: [],
11
- httpMethod: 'get',
12
- httpPath: '/cart/items',
13
- operationId: 'getCartItems',
14
- };
15
- exports.tool = {
16
- name: 'list_cart_items',
17
- description: "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```",
18
- inputSchema: {
19
- type: 'object',
20
- properties: {
21
- 'x-user-id': {
22
- type: 'string',
23
- },
24
- jq_filter: {
25
- type: 'string',
26
- title: 'jq Filter',
27
- description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
28
- },
29
- },
30
- required: ['x-user-id'],
31
- },
32
- annotations: {
33
- readOnlyHint: true,
34
- },
35
- };
36
- const handler = async (client, args) => {
37
- const { jq_filter, ...body } = args;
38
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.cart.items.list(body)));
39
- };
40
- exports.handler = handler;
41
- exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
42
- //# sourceMappingURL=list-cart-items.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-cart-items.js","sourceRoot":"","sources":["../../../src/tools/cart/items/list-cart-items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,g4EAAg4E;IACl4E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,38 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from '@henrylabs/mcp/filtering';
3
- import { asTextContentResult } from '@henrylabs/mcp/tools/types';
4
- export const metadata = {
5
- resource: 'cart.items',
6
- operation: 'read',
7
- tags: [],
8
- httpMethod: 'get',
9
- httpPath: '/cart/items',
10
- operationId: 'getCartItems',
11
- };
12
- export const tool = {
13
- name: 'list_cart_items',
14
- description: "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```",
15
- inputSchema: {
16
- type: 'object',
17
- properties: {
18
- 'x-user-id': {
19
- type: 'string',
20
- },
21
- jq_filter: {
22
- type: 'string',
23
- title: 'jq Filter',
24
- description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
25
- },
26
- },
27
- required: ['x-user-id'],
28
- },
29
- annotations: {
30
- readOnlyHint: true,
31
- },
32
- };
33
- export const handler = async (client, args) => {
34
- const { jq_filter, ...body } = args;
35
- return asTextContentResult(await maybeFilter(jq_filter, await client.cart.items.list(body)));
36
- };
37
- export default { metadata, tool, handler };
38
- //# sourceMappingURL=list-cart-items.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-cart-items.mjs","sourceRoot":"","sources":["../../../src/tools/cart/items/list-cart-items.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,aAAa;IACvB,WAAW,EAAE,cAAc;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,g4EAAg4E;IACl4E,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1,45 +0,0 @@
1
- import { Metadata } from '@henrylabs/mcp/tools/types';
2
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
- import HenrySDK from '@henrylabs/sdk';
4
- export declare const metadata: Metadata;
5
- export declare const tool: Tool;
6
- export declare const handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
7
- declare const _default: {
8
- metadata: Metadata;
9
- tool: {
10
- [x: string]: unknown;
11
- name: string;
12
- inputSchema: {
13
- [x: string]: unknown;
14
- type: "object";
15
- properties?: {
16
- [x: string]: unknown;
17
- } | undefined;
18
- required?: string[] | undefined;
19
- };
20
- title?: string | undefined;
21
- description?: string | undefined;
22
- outputSchema?: {
23
- [x: string]: unknown;
24
- type: "object";
25
- properties?: {
26
- [x: string]: unknown;
27
- } | undefined;
28
- required?: string[] | undefined;
29
- } | undefined;
30
- annotations?: {
31
- [x: string]: unknown;
32
- title?: string | undefined;
33
- readOnlyHint?: boolean | undefined;
34
- destructiveHint?: boolean | undefined;
35
- idempotentHint?: boolean | undefined;
36
- openWorldHint?: boolean | undefined;
37
- } | undefined;
38
- _meta?: {
39
- [x: string]: unknown;
40
- } | undefined;
41
- };
42
- handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
43
- };
44
- export default _default;
45
- //# sourceMappingURL=remove-cart-items.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-cart-items.d.mts","sourceRoot":"","sources":["../../../src/tools/cart/items/remove-cart-items.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAyBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
@@ -1,45 +0,0 @@
1
- import { Metadata } from '@henrylabs/mcp/tools/types';
2
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
- import HenrySDK from '@henrylabs/sdk';
4
- export declare const metadata: Metadata;
5
- export declare const tool: Tool;
6
- export declare const handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
7
- declare const _default: {
8
- metadata: Metadata;
9
- tool: {
10
- [x: string]: unknown;
11
- name: string;
12
- inputSchema: {
13
- [x: string]: unknown;
14
- type: "object";
15
- properties?: {
16
- [x: string]: unknown;
17
- } | undefined;
18
- required?: string[] | undefined;
19
- };
20
- title?: string | undefined;
21
- description?: string | undefined;
22
- outputSchema?: {
23
- [x: string]: unknown;
24
- type: "object";
25
- properties?: {
26
- [x: string]: unknown;
27
- } | undefined;
28
- required?: string[] | undefined;
29
- } | undefined;
30
- annotations?: {
31
- [x: string]: unknown;
32
- title?: string | undefined;
33
- readOnlyHint?: boolean | undefined;
34
- destructiveHint?: boolean | undefined;
35
- idempotentHint?: boolean | undefined;
36
- openWorldHint?: boolean | undefined;
37
- } | undefined;
38
- _meta?: {
39
- [x: string]: unknown;
40
- } | undefined;
41
- };
42
- handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
43
- };
44
- export default _default;
45
- //# sourceMappingURL=remove-cart-items.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-cart-items.d.ts","sourceRoot":"","sources":["../../../src/tools/cart/items/remove-cart-items.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IAyBlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAGxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAHoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAKzF,wBAA2C"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.handler = exports.tool = exports.metadata = void 0;
5
- const filtering_1 = require("@henrylabs/mcp/filtering");
6
- const types_1 = require("@henrylabs/mcp/tools/types");
7
- exports.metadata = {
8
- resource: 'cart.items',
9
- operation: 'write',
10
- tags: [],
11
- httpMethod: 'delete',
12
- httpPath: '/cart/items/{productId}',
13
- operationId: 'deleteCartItem',
14
- };
15
- exports.tool = {
16
- name: 'remove_cart_items',
17
- description: "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```",
18
- inputSchema: {
19
- type: 'object',
20
- properties: {
21
- productId: {
22
- type: 'string',
23
- },
24
- 'x-user-id': {
25
- type: 'string',
26
- },
27
- jq_filter: {
28
- type: 'string',
29
- title: 'jq Filter',
30
- description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
31
- },
32
- },
33
- required: ['productId', 'x-user-id'],
34
- },
35
- annotations: {
36
- idempotentHint: true,
37
- },
38
- };
39
- const handler = async (client, args) => {
40
- const { productId, jq_filter, ...body } = args;
41
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.cart.items.remove(productId, body)));
42
- };
43
- exports.handler = handler;
44
- exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
45
- //# sourceMappingURL=remove-cart-items.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-cart-items.js","sourceRoot":"","sources":["../../../src/tools/cart/items/remove-cart-items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,yBAAyB;IACnC,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,soBAAsoB;IACxoB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;KACrC;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACtD,OAAO,IAAA,2BAAmB,EAAC,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5G,CAAC,CAAC;AAHW,QAAA,OAAO,WAGlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,41 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from '@henrylabs/mcp/filtering';
3
- import { asTextContentResult } from '@henrylabs/mcp/tools/types';
4
- export const metadata = {
5
- resource: 'cart.items',
6
- operation: 'write',
7
- tags: [],
8
- httpMethod: 'delete',
9
- httpPath: '/cart/items/{productId}',
10
- operationId: 'deleteCartItem',
11
- };
12
- export const tool = {
13
- name: 'remove_cart_items',
14
- description: "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```",
15
- inputSchema: {
16
- type: 'object',
17
- properties: {
18
- productId: {
19
- type: 'string',
20
- },
21
- 'x-user-id': {
22
- type: 'string',
23
- },
24
- jq_filter: {
25
- type: 'string',
26
- title: 'jq Filter',
27
- description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
28
- },
29
- },
30
- required: ['productId', 'x-user-id'],
31
- },
32
- annotations: {
33
- idempotentHint: true,
34
- },
35
- };
36
- export const handler = async (client, args) => {
37
- const { productId, jq_filter, ...body } = args;
38
- return asTextContentResult(await maybeFilter(jq_filter, await client.cart.items.remove(productId, body)));
39
- };
40
- export default { metadata, tool, handler };
41
- //# sourceMappingURL=remove-cart-items.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"remove-cart-items.mjs","sourceRoot":"","sources":["../../../src/tools/cart/items/remove-cart-items.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,YAAY;IACtB,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,yBAAyB;IACnC,WAAW,EAAE,gBAAgB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,soBAAsoB;IACxoB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;aACf;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;KACrC;IACD,WAAW,EAAE;QACX,cAAc,EAAE,IAAI;KACrB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACtD,OAAO,mBAAmB,CAAC,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAC5G,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
@@ -1,45 +0,0 @@
1
- import { Metadata } from '@henrylabs/mcp/tools/types';
2
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
- import HenrySDK from '@henrylabs/sdk';
4
- export declare const metadata: Metadata;
5
- export declare const tool: Tool;
6
- export declare const handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
7
- declare const _default: {
8
- metadata: Metadata;
9
- tool: {
10
- [x: string]: unknown;
11
- name: string;
12
- inputSchema: {
13
- [x: string]: unknown;
14
- type: "object";
15
- properties?: {
16
- [x: string]: unknown;
17
- } | undefined;
18
- required?: string[] | undefined;
19
- };
20
- title?: string | undefined;
21
- description?: string | undefined;
22
- outputSchema?: {
23
- [x: string]: unknown;
24
- type: "object";
25
- properties?: {
26
- [x: string]: unknown;
27
- } | undefined;
28
- required?: string[] | undefined;
29
- } | undefined;
30
- annotations?: {
31
- [x: string]: unknown;
32
- title?: string | undefined;
33
- readOnlyHint?: boolean | undefined;
34
- destructiveHint?: boolean | undefined;
35
- idempotentHint?: boolean | undefined;
36
- openWorldHint?: boolean | undefined;
37
- } | undefined;
38
- _meta?: {
39
- [x: string]: unknown;
40
- } | undefined;
41
- };
42
- handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
43
- };
44
- export default _default;
45
- //# sourceMappingURL=confirm-checkout-checkout-session.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-checkout-checkout-session.d.mts","sourceRoot":"","sources":["../../../src/tools/checkout/session/confirm-checkout-checkout-session.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0ElB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
@@ -1,45 +0,0 @@
1
- import { Metadata } from '@henrylabs/mcp/tools/types';
2
- import { Tool } from '@modelcontextprotocol/sdk/types.js';
3
- import HenrySDK from '@henrylabs/sdk';
4
- export declare const metadata: Metadata;
5
- export declare const tool: Tool;
6
- export declare const handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
7
- declare const _default: {
8
- metadata: Metadata;
9
- tool: {
10
- [x: string]: unknown;
11
- name: string;
12
- inputSchema: {
13
- [x: string]: unknown;
14
- type: "object";
15
- properties?: {
16
- [x: string]: unknown;
17
- } | undefined;
18
- required?: string[] | undefined;
19
- };
20
- title?: string | undefined;
21
- description?: string | undefined;
22
- outputSchema?: {
23
- [x: string]: unknown;
24
- type: "object";
25
- properties?: {
26
- [x: string]: unknown;
27
- } | undefined;
28
- required?: string[] | undefined;
29
- } | undefined;
30
- annotations?: {
31
- [x: string]: unknown;
32
- title?: string | undefined;
33
- readOnlyHint?: boolean | undefined;
34
- destructiveHint?: boolean | undefined;
35
- idempotentHint?: boolean | undefined;
36
- openWorldHint?: boolean | undefined;
37
- } | undefined;
38
- _meta?: {
39
- [x: string]: unknown;
40
- } | undefined;
41
- };
42
- handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
43
- };
44
- export default _default;
45
- //# sourceMappingURL=confirm-checkout-checkout-session.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-checkout-checkout-session.d.ts","sourceRoot":"","sources":["../../../src/tools/checkout/session/confirm-checkout-checkout-session.ts"],"names":[],"mappings":"OAGO,EAAE,QAAQ,EAAuB,MAAM,4BAA4B;OAEnE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,QAAQ,MAAM,gBAAgB;AAErC,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0ElB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,QAAQ,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,iEAKxF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBALoC,QAAQ,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAOzF,wBAA2C"}
@@ -1,94 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.handler = exports.tool = exports.metadata = void 0;
5
- const filtering_1 = require("@henrylabs/mcp/filtering");
6
- const types_1 = require("@henrylabs/mcp/tools/types");
7
- exports.metadata = {
8
- resource: 'checkout.session',
9
- operation: 'write',
10
- tags: [],
11
- httpMethod: 'post',
12
- httpPath: '/checkout/session/confirm',
13
- operationId: 'confirmCheckoutSession',
14
- };
15
- exports.tool = {
16
- name: 'confirm_checkout_checkout_session',
17
- description: "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\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```",
18
- inputSchema: {
19
- type: 'object',
20
- properties: {
21
- 'x-session-token': {
22
- type: 'string',
23
- },
24
- shippingDetails: {
25
- type: 'object',
26
- properties: {
27
- addressLine1: {
28
- type: 'string',
29
- description: 'Address line 1',
30
- },
31
- city: {
32
- type: 'string',
33
- description: 'City',
34
- },
35
- countryCode: {
36
- type: 'string',
37
- description: 'Country code',
38
- },
39
- email: {
40
- type: 'string',
41
- description: 'Email',
42
- },
43
- fullName: {
44
- type: 'string',
45
- description: 'Full name',
46
- },
47
- phoneNumber: {
48
- type: 'string',
49
- description: 'Phone number',
50
- },
51
- postalCode: {
52
- type: 'string',
53
- description: 'Postal code',
54
- },
55
- stateOrProvince: {
56
- type: 'string',
57
- description: 'State or province',
58
- },
59
- addressLine2: {
60
- type: 'string',
61
- description: 'Address line 2',
62
- },
63
- },
64
- required: [
65
- 'addressLine1',
66
- 'city',
67
- 'countryCode',
68
- 'email',
69
- 'fullName',
70
- 'phoneNumber',
71
- 'postalCode',
72
- 'stateOrProvince',
73
- ],
74
- },
75
- 'x-user-id': {
76
- type: 'string',
77
- },
78
- jq_filter: {
79
- type: 'string',
80
- title: 'jq Filter',
81
- description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
82
- },
83
- },
84
- required: ['x-session-token'],
85
- },
86
- annotations: {},
87
- };
88
- const handler = async (client, args) => {
89
- const { jq_filter, ...body } = args;
90
- return (0, types_1.asTextContentResult)(await (0, filtering_1.maybeFilter)(jq_filter, await client.checkout.session.confirmCheckout(body)));
91
- };
92
- exports.handler = handler;
93
- exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
94
- //# sourceMappingURL=confirm-checkout-checkout-session.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-checkout-checkout-session.js","sourceRoot":"","sources":["../../../src/tools/checkout/session/confirm-checkout-checkout-session.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAuD;AACvD,sDAA2E;AAK9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,2BAA2B;IACrC,WAAW,EAAE,wBAAwB;CACtC,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,mCAAmC;IACzC,WAAW,EACT,01HAA01H;IAC51H,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;aACf;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,YAAY,EAAE;wBACZ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gBAAgB;qBAC9B;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,MAAM;qBACpB;oBACD,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,cAAc;qBAC5B;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,OAAO;qBACrB;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,WAAW;qBACzB;oBACD,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,cAAc;qBAC5B;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,aAAa;qBAC3B;oBACD,eAAe,EAAE;wBACf,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,mBAAmB;qBACjC;oBACD,YAAY,EAAE;wBACZ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gBAAgB;qBAC9B;iBACF;gBACD,QAAQ,EAAE;oBACR,cAAc;oBACd,MAAM;oBACN,aAAa;oBACb,OAAO;oBACP,UAAU;oBACV,aAAa;oBACb,YAAY;oBACZ,iBAAiB;iBAClB;aACF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;KAC9B;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,IAAA,2BAAmB,EACxB,MAAM,IAAA,uBAAW,EAAC,SAAS,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAClF,CAAC;AACJ,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
@@ -1,90 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { maybeFilter } from '@henrylabs/mcp/filtering';
3
- import { asTextContentResult } from '@henrylabs/mcp/tools/types';
4
- export const metadata = {
5
- resource: 'checkout.session',
6
- operation: 'write',
7
- tags: [],
8
- httpMethod: 'post',
9
- httpPath: '/checkout/session/confirm',
10
- operationId: 'confirmCheckoutSession',
11
- };
12
- export const tool = {
13
- name: 'confirm_checkout_checkout_session',
14
- description: "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\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```",
15
- inputSchema: {
16
- type: 'object',
17
- properties: {
18
- 'x-session-token': {
19
- type: 'string',
20
- },
21
- shippingDetails: {
22
- type: 'object',
23
- properties: {
24
- addressLine1: {
25
- type: 'string',
26
- description: 'Address line 1',
27
- },
28
- city: {
29
- type: 'string',
30
- description: 'City',
31
- },
32
- countryCode: {
33
- type: 'string',
34
- description: 'Country code',
35
- },
36
- email: {
37
- type: 'string',
38
- description: 'Email',
39
- },
40
- fullName: {
41
- type: 'string',
42
- description: 'Full name',
43
- },
44
- phoneNumber: {
45
- type: 'string',
46
- description: 'Phone number',
47
- },
48
- postalCode: {
49
- type: 'string',
50
- description: 'Postal code',
51
- },
52
- stateOrProvince: {
53
- type: 'string',
54
- description: 'State or province',
55
- },
56
- addressLine2: {
57
- type: 'string',
58
- description: 'Address line 2',
59
- },
60
- },
61
- required: [
62
- 'addressLine1',
63
- 'city',
64
- 'countryCode',
65
- 'email',
66
- 'fullName',
67
- 'phoneNumber',
68
- 'postalCode',
69
- 'stateOrProvince',
70
- ],
71
- },
72
- 'x-user-id': {
73
- type: 'string',
74
- },
75
- jq_filter: {
76
- type: 'string',
77
- title: 'jq Filter',
78
- description: 'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
79
- },
80
- },
81
- required: ['x-session-token'],
82
- },
83
- annotations: {},
84
- };
85
- export const handler = async (client, args) => {
86
- const { jq_filter, ...body } = args;
87
- return asTextContentResult(await maybeFilter(jq_filter, await client.checkout.session.confirmCheckout(body)));
88
- };
89
- export default { metadata, tool, handler };
90
- //# sourceMappingURL=confirm-checkout-checkout-session.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-checkout-checkout-session.mjs","sourceRoot":"","sources":["../../../src/tools/checkout/session/confirm-checkout-checkout-session.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE,MAAM,0BAA0B;OAC/C,EAAY,mBAAmB,EAAE,MAAM,4BAA4B;AAK1E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,kBAAkB;IAC5B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,2BAA2B;IACrC,WAAW,EAAE,wBAAwB;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,mCAAmC;IACzC,WAAW,EACT,01HAA01H;IAC51H,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;aACf;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,YAAY,EAAE;wBACZ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gBAAgB;qBAC9B;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,MAAM;qBACpB;oBACD,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,cAAc;qBAC5B;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,OAAO;qBACrB;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,WAAW;qBACzB;oBACD,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,cAAc;qBAC5B;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,aAAa;qBAC3B;oBACD,eAAe,EAAE;wBACf,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,mBAAmB;qBACjC;oBACD,YAAY,EAAE;wBACZ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,gBAAgB;qBAC9B;iBACF;gBACD,QAAQ,EAAE;oBACR,cAAc;oBACd,MAAM;oBACN,aAAa;oBACb,OAAO;oBACP,UAAU;oBACV,aAAa;oBACb,YAAY;oBACZ,iBAAiB;iBAClB;aACF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;aACf;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,WAAW;gBAClB,WAAW,EACT,kWAAkW;aACrW;SACF;QACD,QAAQ,EAAE,CAAC,iBAAiB,CAAC;KAC9B;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAyC,EAAE,EAAE;IAC3F,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IAC3C,OAAO,mBAAmB,CACxB,MAAM,WAAW,CAAC,SAAS,EAAE,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAClF,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}