@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
package/README.md CHANGED
@@ -10,8 +10,7 @@ You can run the MCP Server directly via `npx`:
10
10
 
11
11
  ```sh
12
12
  export HENRY_SDK_API_KEY="My API Key"
13
- export HENRY_SDK_ACCESS_TOKEN="My Access Token"
14
- export HENRY_SDK_ENVIRONMENT="production"
13
+ export HENRY_SDK_ENVIRONMENT="sandbox"
15
14
  npx -y @henrylabs/mcp@latest
16
15
  ```
17
16
 
@@ -30,8 +29,7 @@ For clients with a configuration JSON, it might look something like this:
30
29
  "args": ["-y", "@henrylabs/mcp", "--client=claude", "--tools=all"],
31
30
  "env": {
32
31
  "HENRY_SDK_API_KEY": "My API Key",
33
- "HENRY_SDK_ACCESS_TOKEN": "My Access Token",
34
- "HENRY_SDK_ENVIRONMENT": "production"
32
+ "HENRY_SDK_ENVIRONMENT": "sandbox"
35
33
  }
36
34
  }
37
35
  }
@@ -56,6 +54,7 @@ You can filter by multiple aspects:
56
54
  - `--tool` includes a specific tool by name
57
55
  - `--resource` includes all tools under a specific resource, and can have wildcards, e.g. `my.resource*`
58
56
  - `--operation` includes just read (get/list) or just write operations
57
+ - `--tag` includes a set of endpoints with custom tags provided
59
58
 
60
59
  ### Dynamic tools
61
60
 
@@ -136,9 +135,8 @@ Launching the client with `--transport=http` launches the server as a remote ser
136
135
 
137
136
  Authorization can be provided via the following headers:
138
137
  | Header | Equivalent client option | Security scheme |
139
- | ---------------- | ------------------------ | --------------- |
138
+ | ----------- | ------------------------ | --------------- |
140
139
  | `x-api-key` | `apiKey` | ApiKeyAuth |
141
- | `x-access-token` | `accessToken` | AccessTokenAuth |
142
140
 
143
141
  A configuration JSON for this server might look like this, assuming the server is hosted at `http://localhost:3000`:
144
142
 
@@ -175,7 +173,7 @@ http://localhost:3000?client=cursor&capability=tool-name-length%3D40
175
173
  import { server, endpoints, init } from "@henrylabs/mcp/server";
176
174
 
177
175
  // import a specific tool
178
- import retrieveDetailsProducts from "@henrylabs/mcp/tools/products/retrieve-details-products";
176
+ import retrieveProductDetails from "@henrylabs/mcp/tools/products/retrieve-product-details";
179
177
 
180
178
  // initialize the server and all endpoints
181
179
  init({ server, endpoints });
@@ -200,7 +198,7 @@ const myCustomEndpoint = {
200
198
  };
201
199
 
202
200
  // initialize the server with your custom endpoints
203
- init({ server: myServer, endpoints: [retrieveDetailsProducts, myCustomEndpoint] });
201
+ init({ server: myServer, endpoints: [retrieveProductDetails, myCustomEndpoint] });
204
202
  ```
205
203
 
206
204
  ## Available Tools
@@ -209,47 +207,22 @@ The following tools are available in this MCP server.
209
207
 
210
208
  ### Resource `products`:
211
209
 
212
- - `retrieve_details_products` (`read`): Retrieve detailed information about a specific product given product ID
213
- - `search_products` (`write`): Search for products using keyword and passing various filters and criteria
214
-
215
- ### Resource `products.variant_check`:
216
-
217
- - `create_products_variant_check` (`write`): ! _This endpoint is experimental and unstable. The API contract may change without notice._
218
-
219
- Creates a request to check if a specific product variant combination is in stock. Returns immediately with a request ID that can be used to poll for results.
220
-
221
- - `retrieve_status_products_variant_check` (`read`): ! _This endpoint is experimental and unstable. The API contract may change without notice._
222
-
223
- Poll the status of a variant availability check request. Returns the current status and results if completed.
210
+ - `retrieve_product_details` (`read`) tags: [headless, hosted]: Retrieve detailed information about a specific product given product ID. Must be called to first get a product link before adding an item to cart
211
+ - `search_products` (`write`) tags: [headless, hosted]: Search for products using keyword and passing various filters and criteria
224
212
 
225
213
  ### Resource `cart`:
226
214
 
227
- - `create_checkout_cart` (`write`): Generates a hosted checkout URL for the user's cart that can be embedded in an iframe or modal. The page walks the buyer through reviewing the order, entering shipping and payment information, and confirming the purchase.
228
-
229
- ### Resource `cart.items`:
230
-
231
- - `list_cart_items` (`read`): Get all products from the cart
232
- - `add_cart_items` (`write`): Adds product data to existing cart or create a new one.
233
- - `clear_cart_items` (`write`): Delete all products from the cart
234
- - `remove_cart_items` (`write`): Delete a product from the cart
215
+ - `create_cart_checkout` (`write`) tags: [hosted]: Generates 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.
235
216
 
236
217
  ### Resource `checkout.session`:
237
218
 
238
- - `confirm_checkout_checkout_session` (`write`): Confirms the checkout session and creates an order
239
- - `create_quote_checkout_session` (`write`): Creates or updates a checkout session with shipping details and returns pricing metadata plus a session token.
240
- - `list_products_checkout_session` (`read`): Returns products for the checkout session
241
- - `retrieve_shipping_info_checkout_session` (`read`): Retrieves the shipping details for the current checkout session.
219
+ - `confirm_checkout_session` (`write`): Confirms the checkout session and creates an order for the user. Returns an order ID that can be used to view order status
220
+ - `create_checkout_session` (`write`): Creates or updates a checkout session with shipping details and returns pricing metadata plus a session token needed for confirming checkout
242
221
 
243
222
  ### Resource `orders`:
244
223
 
245
- - `retrieve_status_orders` (`read`): Retrieve the status and details of an order given order ID
224
+ - `retrieve_status_orders` (`read`) tags: [headless, hosted]: Retrieve the status and details of an order given order ID
246
225
 
247
226
  ### Resource `wallet`:
248
227
 
249
- - `create_card_collection_wallet` (`write`): Returns a modal URL for users to save payment cards. Supports both authenticated and guest card collection
250
-
251
- ### Resource `merchants`:
252
-
253
- - `check_status_merchants` (`read`): Verifies whether a merchant is supported by checking their domain
254
- - `get_shipping_info_merchants` (`read`): Retrieve shipping information including shipping tiers and free shipping thresholds for merchants
255
- - `list_supported_merchants` (`read`): Returns a list of allowlist supported merchants
228
+ - `collect_payment_details` (`write`) tags: [headless]: Returns a modal URL for users to save payment cards. Supports both authenticated and guest card collection. Must be called at some point before checkout session is confirmed. After payment details are saved, they can proceed with checkout confirmation.
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAKO,EAAE,QAAQ,EAA0B;AAM3C;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,CA8HlD"}
1
+ {"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAKO,EAAE,QAAQ,EAA0B;AAM3C;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,CA6HlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAKO,EAAE,QAAQ,EAA0B;AAM3C;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,CA8HlD"}
1
+ {"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAKO,EAAE,QAAQ,EAA0B;AAM3C;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,CA6HlD"}
package/code-tool.js CHANGED
@@ -81,7 +81,6 @@ async function codeTool() {
81
81
  const opts = {
82
82
  baseURL: client.baseURL,
83
83
  apiKey: client.apiKey,
84
- accessToken: client.accessToken,
85
84
  defaultHeaders: {
86
85
  'X-Stainless-MCP': 'true',
87
86
  },
package/code-tool.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"code-tool.js","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBtF,4BA8HC;AAhJD,yCAAoC;AACpC,uCAAyC;AAQzC;;;;;;;;GAQG;AACI,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,wDAAa,2BAA2B,GAAC,CAAC;IACxE,MAAM,EAAE,UAAU,EAAE,GAAG,wDAAa,uBAAuB,GAAC,CAAC;IAE7D,MAAM,OAAO,GAAG,KAAK,EAAE,MAAgB,EAAE,IAAa,EAAE,EAAE;QACxD,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,IAAA,wBAAa,EAAC,UAAU,CAAC,EAAE;YAChE,QAAQ,EAAE;gBACR,2BAA2B;gBAC3B,qCAAqC,UAAU,CAAC,OAAO,CAA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B,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,CAAC;QACV,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/code-tool.mjs CHANGED
@@ -45,7 +45,6 @@ export async function codeTool() {
45
45
  const opts = {
46
46
  baseURL: client.baseURL,
47
47
  apiKey: client.apiKey,
48
- accessToken: client.accessToken,
49
48
  defaultHeaders: {
50
49
  'X-Stainless-MCP': 'true',
51
50
  },
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,EAAE,EAAE;QACxD,M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E,SAAS,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC;iBAChF,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAgB,CAAC;gBACvD,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,CAAC;QACV,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/headers.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"headers.d.mts","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE,MAAM,WAAW;OACpC,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,eAAO,MAAM,gBAAgB,GAAI,KAAK,eAAe,KAAG,OAAO,CAAC,aAAa,CAQ5E,CAAC"}
1
+ {"version":3,"file":"headers.d.mts","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE,MAAM,WAAW;OACpC,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,eAAO,MAAM,gBAAgB,GAAI,KAAK,eAAe,KAAG,OAAO,CAAC,aAAa,CAI5E,CAAC"}
package/headers.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE,MAAM,WAAW;OACpC,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,eAAO,MAAM,gBAAgB,GAAI,KAAK,eAAe,KAAG,OAAO,CAAC,aAAa,CAQ5E,CAAC"}
1
+ {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":"OAEO,EAAE,eAAe,EAAE,MAAM,WAAW;OACpC,EAAE,aAAa,EAAE,MAAM,gBAAgB;AAE9C,eAAO,MAAM,gBAAgB,GAAI,KAAK,eAAe,KAAG,OAAO,CAAC,aAAa,CAI5E,CAAC"}
package/headers.js CHANGED
@@ -4,10 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.parseAuthHeaders = void 0;
5
5
  const parseAuthHeaders = (req) => {
6
6
  const apiKey = Array.isArray(req.headers['x-api-key']) ? req.headers['x-api-key'][0] : req.headers['x-api-key'];
7
- const accessToken = Array.isArray(req.headers['x-access-token']) ?
8
- req.headers['x-access-token'][0]
9
- : req.headers['x-access-token'];
10
- return { apiKey, accessToken };
7
+ return { apiKey };
11
8
  };
12
9
  exports.parseAuthHeaders = parseAuthHeaders;
13
10
  //# sourceMappingURL=headers.js.map
package/headers.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"headers.js","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAK/E,MAAM,gBAAgB,GAAG,CAAC,GAAoB,EAA0B,EAAE;IAC/E,MAAM,MAAM,GACV,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACnG,MAAM,WAAW,GACf,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAC5C,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AACjC,CAAC,CAAC;AARW,QAAA,gBAAgB,oBAQ3B"}
1
+ {"version":3,"file":"headers.js","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAK/E,MAAM,gBAAgB,GAAG,CAAC,GAAoB,EAA0B,EAAE;IAC/E,MAAM,MAAM,GACV,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACnG,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B"}
package/headers.mjs CHANGED
@@ -1,9 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  export const parseAuthHeaders = (req) => {
3
3
  const apiKey = Array.isArray(req.headers['x-api-key']) ? req.headers['x-api-key'][0] : req.headers['x-api-key'];
4
- const accessToken = Array.isArray(req.headers['x-access-token']) ?
5
- req.headers['x-access-token'][0]
6
- : req.headers['x-access-token'];
7
- return { apiKey, accessToken };
4
+ return { apiKey };
8
5
  };
9
6
  //# sourceMappingURL=headers.mjs.map
package/headers.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"headers.mjs","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAKtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAoB,EAA0B,EAAE;IAC/E,MAAM,MAAM,GACV,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACnG,MAAM,WAAW,GACf,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAC5C,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AACjC,CAAC,CAAC"}
1
+ {"version":3,"file":"headers.mjs","sourceRoot":"","sources":["src/headers.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAKtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAoB,EAA0B,EAAE;IAC/E,MAAM,MAAM,GACV,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACnG,OAAO,EAAE,MAAM,EAAE,CAAC;AACpB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henrylabs/mcp",
3
- "version": "0.2.0",
3
+ "version": "0.4.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,7 +27,7 @@
27
27
  "fix": "eslint --fix --ext ts,js ."
28
28
  },
29
29
  "dependencies": {
30
- "@henrylabs/sdk": "^0.2.0",
30
+ "@henrylabs/sdk": "^0.4.0",
31
31
  "@cloudflare/cabidela": "^0.2.4",
32
32
  "@modelcontextprotocol/sdk": "^1.11.5",
33
33
  "@valtown/deno-http-worker": "^0.0.21",
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.2.0',
25
+ version: '0.4.0',
26
26
  }, { capabilities: { tools: {}, logging: {} } });
27
27
  exports.newMcpServer = newMcpServer;
28
28
  // Create server instance
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.2.0',
14
+ version: '0.4.0',
15
15
  }, { capabilities: { tools: {}, logging: {} } });
16
16
  // Create server instance
17
17
  export const server = newMcpServer();
package/src/code-tool.ts CHANGED
@@ -59,7 +59,6 @@ export async function codeTool(): Promise<Endpoint> {
59
59
  const opts: ClientOptions = {
60
60
  baseURL: client.baseURL,
61
61
  apiKey: client.apiKey,
62
- accessToken: client.accessToken,
63
62
  defaultHeaders: {
64
63
  'X-Stainless-MCP': 'true',
65
64
  },
package/src/headers.ts CHANGED
@@ -6,9 +6,5 @@ import { ClientOptions } from '@henrylabs/sdk';
6
6
  export const parseAuthHeaders = (req: IncomingMessage): Partial<ClientOptions> => {
7
7
  const apiKey =
8
8
  Array.isArray(req.headers['x-api-key']) ? req.headers['x-api-key'][0] : req.headers['x-api-key'];
9
- const accessToken =
10
- Array.isArray(req.headers['x-access-token']) ?
11
- req.headers['x-access-token'][0]
12
- : req.headers['x-access-token'];
13
- return { apiKey, accessToken };
9
+ return { apiKey };
14
10
  };
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.2.0',
37
+ version: '0.4.0',
38
38
  },
39
39
  { capabilities: { tools: {}, logging: {} } },
40
40
  );
@@ -9,16 +9,16 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'cart',
11
11
  operation: 'write',
12
- tags: [],
12
+ tags: ['hosted'],
13
13
  httpMethod: 'post',
14
14
  httpPath: '/cart/checkout',
15
15
  operationId: 'createHostedCheckoutPage',
16
16
  };
17
17
 
18
18
  export const tool: Tool = {
19
- name: 'create_checkout_cart',
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 that can be embedded in an iframe or modal. The page walks the buyer through reviewing the order, entering shipping and payment information, and confirming the purchase.\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 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```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -0,0 +1,101 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from '@henrylabs/mcp/filtering';
4
+ import { Metadata, asTextContentResult } from '@henrylabs/mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import HenrySDK from '@henrylabs/sdk';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'checkout.session',
11
+ operation: 'write',
12
+ tags: [],
13
+ httpMethod: 'post',
14
+ httpPath: '/checkout/session/confirm',
15
+ operationId: 'confirmCheckoutSession',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'confirm_checkout_session',
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```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ 'x-session-token': {
26
+ type: 'string',
27
+ },
28
+ shippingDetails: {
29
+ type: 'object',
30
+ properties: {
31
+ addressLine1: {
32
+ type: 'string',
33
+ description: 'Address line 1',
34
+ },
35
+ city: {
36
+ type: 'string',
37
+ description: 'City',
38
+ },
39
+ countryCode: {
40
+ type: 'string',
41
+ description: 'Country code',
42
+ },
43
+ email: {
44
+ type: 'string',
45
+ description: 'Email',
46
+ },
47
+ fullName: {
48
+ type: 'string',
49
+ description: 'Full name',
50
+ },
51
+ phoneNumber: {
52
+ type: 'string',
53
+ description: 'Phone number',
54
+ },
55
+ postalCode: {
56
+ type: 'string',
57
+ description: 'Postal code',
58
+ },
59
+ stateOrProvince: {
60
+ type: 'string',
61
+ description: 'State or province',
62
+ },
63
+ addressLine2: {
64
+ type: 'string',
65
+ description: 'Address line 2',
66
+ },
67
+ },
68
+ required: [
69
+ 'addressLine1',
70
+ 'city',
71
+ 'countryCode',
72
+ 'email',
73
+ 'fullName',
74
+ 'phoneNumber',
75
+ 'postalCode',
76
+ 'stateOrProvince',
77
+ ],
78
+ },
79
+ 'x-user-id': {
80
+ type: 'string',
81
+ },
82
+ jq_filter: {
83
+ type: 'string',
84
+ title: 'jq Filter',
85
+ description:
86
+ '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/).',
87
+ },
88
+ },
89
+ required: ['x-session-token'],
90
+ },
91
+ annotations: {},
92
+ };
93
+
94
+ export const handler = async (client: HenrySDK, args: Record<string, unknown> | undefined) => {
95
+ const { jq_filter, ...body } = args as any;
96
+ return asTextContentResult(
97
+ await maybeFilter(jq_filter, await client.checkout.session.confirmCheckout(body)),
98
+ );
99
+ };
100
+
101
+ export default { metadata, tool, handler };
@@ -16,9 +16,9 @@ export const metadata: Metadata = {
16
16
  };
17
17
 
18
18
  export const tool: Tool = {
19
- name: 'create_quote_checkout_session',
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.\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\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```",
22
22
  inputSchema: {
23
23
  type: 'object',
24
24
  properties: {
@@ -4,24 +4,13 @@ import { Metadata, Endpoint, HandlerFunction } from './types';
4
4
 
5
5
  export { Metadata, Endpoint, HandlerFunction };
6
6
 
7
- import retrieve_details_products from './products/retrieve-details-products';
7
+ import retrieve_product_details from './products/retrieve-product-details';
8
8
  import search_products from './products/search-products';
9
- import create_products_variant_check from './products/variant-check/create-products-variant-check';
10
- import retrieve_status_products_variant_check from './products/variant-check/retrieve-status-products-variant-check';
11
- import create_checkout_cart from './cart/create-checkout-cart';
12
- import list_cart_items from './cart/items/list-cart-items';
13
- import add_cart_items from './cart/items/add-cart-items';
14
- import clear_cart_items from './cart/items/clear-cart-items';
15
- import remove_cart_items from './cart/items/remove-cart-items';
16
- import confirm_checkout_checkout_session from './checkout/session/confirm-checkout-checkout-session';
17
- import create_quote_checkout_session from './checkout/session/create-quote-checkout-session';
18
- import list_products_checkout_session from './checkout/session/list-products-checkout-session';
19
- import retrieve_shipping_info_checkout_session from './checkout/session/retrieve-shipping-info-checkout-session';
9
+ import create_cart_checkout from './cart/create-cart-checkout';
10
+ import confirm_checkout_session from './checkout/session/confirm-checkout-session';
11
+ import create_checkout_session from './checkout/session/create-checkout-session';
20
12
  import retrieve_status_orders from './orders/retrieve-status-orders';
21
- import create_card_collection_wallet from './wallet/create-card-collection-wallet';
22
- import check_status_merchants from './merchants/check-status-merchants';
23
- import get_shipping_info_merchants from './merchants/get-shipping-info-merchants';
24
- import list_supported_merchants from './merchants/list-supported-merchants';
13
+ import collect_payment_details from './wallet/collect-payment-details';
25
14
 
26
15
  export const endpoints: Endpoint[] = [];
27
16
 
@@ -29,24 +18,13 @@ function addEndpoint(endpoint: Endpoint) {
29
18
  endpoints.push(endpoint);
30
19
  }
31
20
 
32
- addEndpoint(retrieve_details_products);
21
+ addEndpoint(retrieve_product_details);
33
22
  addEndpoint(search_products);
34
- addEndpoint(create_products_variant_check);
35
- addEndpoint(retrieve_status_products_variant_check);
36
- addEndpoint(create_checkout_cart);
37
- addEndpoint(list_cart_items);
38
- addEndpoint(add_cart_items);
39
- addEndpoint(clear_cart_items);
40
- addEndpoint(remove_cart_items);
41
- addEndpoint(confirm_checkout_checkout_session);
42
- addEndpoint(create_quote_checkout_session);
43
- addEndpoint(list_products_checkout_session);
44
- addEndpoint(retrieve_shipping_info_checkout_session);
23
+ addEndpoint(create_cart_checkout);
24
+ addEndpoint(confirm_checkout_session);
25
+ addEndpoint(create_checkout_session);
45
26
  addEndpoint(retrieve_status_orders);
46
- addEndpoint(create_card_collection_wallet);
47
- addEndpoint(check_status_merchants);
48
- addEndpoint(get_shipping_info_merchants);
49
- addEndpoint(list_supported_merchants);
27
+ addEndpoint(collect_payment_details);
50
28
 
51
29
  export type Filter = {
52
30
  type: 'resource' | 'operation' | 'tag' | 'tool';
@@ -9,7 +9,7 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'orders',
11
11
  operation: 'read',
12
- tags: [],
12
+ tags: ['headless', 'hosted'],
13
13
  httpMethod: 'get',
14
14
  httpPath: '/orders/{orderId}',
15
15
  operationId: 'getOrderStatus',
@@ -0,0 +1,48 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { maybeFilter } from '@henrylabs/mcp/filtering';
4
+ import { Metadata, asTextContentResult } from '@henrylabs/mcp/tools/types';
5
+
6
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
7
+ import HenrySDK from '@henrylabs/sdk';
8
+
9
+ export const metadata: Metadata = {
10
+ resource: 'products',
11
+ operation: 'read',
12
+ tags: ['headless', 'hosted'],
13
+ httpMethod: 'get',
14
+ httpPath: '/products/details',
15
+ operationId: 'getProductDetails',
16
+ };
17
+
18
+ export const tool: Tool = {
19
+ name: 'retrieve_product_details',
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 detailed information about a specific product given product ID. Must be called to first get a product link before adding an item to cart\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/product_retrieve_details_response',\n $defs: {\n product_retrieve_details_response: {\n type: 'object',\n properties: {\n data: {\n type: 'object',\n properties: {\n productResults: {\n type: 'object',\n properties: {\n brand: {\n type: 'string'\n },\n rating: {\n type: 'number'\n },\n reviews: {\n type: 'number'\n },\n stores: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n link: {\n type: 'string'\n },\n name: {\n type: 'string'\n },\n price: {\n type: 'string'\n },\n shipping: {\n type: 'string'\n },\n total: {\n type: 'string'\n }\n },\n required: [ 'link',\n 'name',\n 'price',\n 'shipping',\n 'total'\n ]\n }\n },\n thumbnails: {\n type: 'array',\n items: {\n type: 'string'\n }\n },\n title: {\n type: 'string'\n },\n userReviews: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n rating: {\n type: 'number'\n },\n source: {\n type: 'string'\n },\n text: {\n type: 'string'\n },\n title: {\n type: 'string'\n },\n userName: {\n type: 'string'\n }\n },\n required: [ 'rating',\n 'source',\n 'text',\n 'title',\n 'userName'\n ]\n }\n },\n variants: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n items: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n name: {\n type: 'string'\n },\n available: {\n type: 'boolean'\n },\n selected: {\n type: 'boolean'\n }\n },\n required: [ 'name'\n ]\n }\n },\n title: {\n type: 'string'\n }\n },\n required: [ 'items',\n 'title'\n ]\n }\n }\n },\n required: [ 'brand',\n 'rating',\n 'reviews',\n 'stores',\n 'thumbnails',\n 'title',\n 'userReviews',\n 'variants'\n ]\n },\n relatedSearches: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n link: {\n type: 'string'\n },\n query: {\n type: 'string'\n },\n image: {\n type: 'string'\n }\n },\n required: [ 'link',\n 'query'\n ]\n }\n }\n },\n required: [ 'productResults',\n 'relatedSearches'\n ]\n },\n message: {\n type: 'string'\n },\n status: {\n type: 'string'\n },\n success: {\n type: 'boolean'\n }\n },\n required: [ 'data',\n 'message',\n 'status',\n 'success'\n ]\n }\n }\n}\n```",
22
+ inputSchema: {
23
+ type: 'object',
24
+ properties: {
25
+ productId: {
26
+ type: 'string',
27
+ description: 'Product ID',
28
+ },
29
+ jq_filter: {
30
+ type: 'string',
31
+ title: 'jq Filter',
32
+ description:
33
+ '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/).',
34
+ },
35
+ },
36
+ required: ['productId'],
37
+ },
38
+ annotations: {
39
+ readOnlyHint: true,
40
+ },
41
+ };
42
+
43
+ export const handler = async (client: HenrySDK, args: Record<string, unknown> | undefined) => {
44
+ const { jq_filter, ...body } = args as any;
45
+ return asTextContentResult(await maybeFilter(jq_filter, await client.products.retrieveDetails(body)));
46
+ };
47
+
48
+ export default { metadata, tool, handler };
@@ -9,7 +9,7 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'products',
11
11
  operation: 'write',
12
- tags: [],
12
+ tags: ['headless', 'hosted'],
13
13
  httpMethod: 'post',
14
14
  httpPath: '/products/search',
15
15
  operationId: 'searchProducts',
@@ -9,16 +9,16 @@ import HenrySDK from '@henrylabs/sdk';
9
9
  export const metadata: Metadata = {
10
10
  resource: 'wallet',
11
11
  operation: 'write',
12
- tags: [],
12
+ tags: ['headless'],
13
13
  httpMethod: 'post',
14
14
  httpPath: '/wallet/card-collect',
15
15
  operationId: 'initiateCardCollect',
16
16
  };
17
17
 
18
18
  export const tool: Tool = {
19
- name: 'create_card_collection_wallet',
19
+ name: 'collect_payment_details',
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\nReturns a modal URL for users to save payment cards. Supports both authenticated and guest card collection\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/wallet_create_card_collection_response',\n $defs: {\n wallet_create_card_collection_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 modal_url: {\n type: 'string'\n }\n },\n required: [ 'modal_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\nReturns a modal URL for users to save payment cards. Supports both authenticated and guest card collection. Must be called at some point before checkout session is confirmed. After payment details are saved, they can proceed with checkout confirmation.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/wallet_create_card_collection_response',\n $defs: {\n wallet_create_card_collection_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 modal_url: {\n type: 'string'\n }\n },\n required: [ 'modal_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: {
@@ -42,4 +42,4 @@ declare const _default: {
42
42
  handler: (client: HenrySDK, args: Record<string, unknown> | undefined) => Promise<import("@henrylabs/mcp/tools/types").ToolCallResult>;
43
43
  };
44
44
  export default _default;
45
- //# sourceMappingURL=create-checkout-cart.d.mts.map
45
+ //# sourceMappingURL=create-cart-checkout.d.mts.map