@henrylabs/mcp 0.15.0 → 0.18.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.
- package/README.md +13 -334
- package/code-tool.d.mts +2 -44
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +2 -44
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +7 -3
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +7 -3
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +3 -3
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +3 -3
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +1 -1
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +1 -18
- package/http.js.map +1 -1
- package/http.mjs +1 -18
- package/http.mjs.map +1 -1
- package/index.js +4 -40
- package/index.js.map +1 -1
- package/index.mjs +4 -40
- package/index.mjs.map +1 -1
- package/options.d.mts +0 -9
- package/options.d.mts.map +1 -1
- package/options.d.ts +0 -9
- package/options.d.ts.map +1 -1
- package/options.js +4 -359
- package/options.js.map +1 -1
- package/options.mjs +4 -359
- package/options.mjs.map +1 -1
- package/package.json +9 -49
- package/server.d.mts +3 -8
- package/server.d.mts.map +1 -1
- package/server.d.ts +3 -8
- package/server.d.ts.map +1 -1
- package/server.js +12 -65
- package/server.js.map +1 -1
- package/server.mjs +11 -62
- package/server.mjs.map +1 -1
- package/src/code-tool.ts +7 -3
- package/src/docs-search-tool.ts +1 -1
- package/src/http.ts +1 -19
- package/src/index.ts +5 -52
- package/src/options.ts +5 -386
- package/src/server.ts +12 -72
- package/src/stdio.ts +2 -3
- package/src/{tools/types.ts → types.ts} +1 -1
- package/stdio.d.mts +1 -2
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -2
- package/stdio.d.ts.map +1 -1
- package/stdio.js +2 -2
- package/stdio.js.map +1 -1
- package/stdio.mjs +2 -2
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +1 -1
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +1 -1
- package/types.d.ts.map +1 -0
- package/types.js.map +1 -0
- package/types.mjs.map +1 -0
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -3
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -3
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -24
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -16
- package/filtering.mjs.map +0 -1
- package/src/compat.ts +0 -483
- package/src/dynamic-tools.ts +0 -153
- package/src/filtering.ts +0 -18
- package/src/tools/cart/create-cart-checkout.ts +0 -60
- package/src/tools/cart/items/add-cart-items.ts +0 -100
- package/src/tools/cart/items/clear-cart-items.ts +0 -54
- package/src/tools/cart/items/list-cart-items.ts +0 -54
- package/src/tools/cart/items/remove-cart-items.ts +0 -57
- package/src/tools/index.ts +0 -87
- package/src/tools/orders/retrieve-status-orders.ts +0 -54
- package/src/tools/products/retrieve-product-details.ts +0 -48
- package/src/tools/products/search-products.ts +0 -110
- package/src/tools/wallet/collect-payment-details.ts +0 -56
- package/src/tools.ts +0 -1
- package/tools/cart/create-cart-checkout.d.mts +0 -51
- package/tools/cart/create-cart-checkout.d.mts.map +0 -1
- package/tools/cart/create-cart-checkout.d.ts +0 -51
- package/tools/cart/create-cart-checkout.d.ts.map +0 -1
- package/tools/cart/create-cart-checkout.js +0 -60
- package/tools/cart/create-cart-checkout.js.map +0 -1
- package/tools/cart/create-cart-checkout.mjs +0 -53
- package/tools/cart/create-cart-checkout.mjs.map +0 -1
- package/tools/cart/items/add-cart-items.d.mts +0 -51
- package/tools/cart/items/add-cart-items.d.mts.map +0 -1
- package/tools/cart/items/add-cart-items.d.ts +0 -51
- package/tools/cart/items/add-cart-items.d.ts.map +0 -1
- package/tools/cart/items/add-cart-items.js +0 -98
- package/tools/cart/items/add-cart-items.js.map +0 -1
- package/tools/cart/items/add-cart-items.mjs +0 -91
- package/tools/cart/items/add-cart-items.mjs.map +0 -1
- package/tools/cart/items/clear-cart-items.d.mts +0 -51
- package/tools/cart/items/clear-cart-items.d.mts.map +0 -1
- package/tools/cart/items/clear-cart-items.d.ts +0 -51
- package/tools/cart/items/clear-cart-items.d.ts.map +0 -1
- package/tools/cart/items/clear-cart-items.js +0 -54
- package/tools/cart/items/clear-cart-items.js.map +0 -1
- package/tools/cart/items/clear-cart-items.mjs +0 -47
- package/tools/cart/items/clear-cart-items.mjs.map +0 -1
- package/tools/cart/items/list-cart-items.d.mts +0 -51
- package/tools/cart/items/list-cart-items.d.mts.map +0 -1
- package/tools/cart/items/list-cart-items.d.ts +0 -51
- package/tools/cart/items/list-cart-items.d.ts.map +0 -1
- package/tools/cart/items/list-cart-items.js +0 -54
- package/tools/cart/items/list-cart-items.js.map +0 -1
- package/tools/cart/items/list-cart-items.mjs +0 -47
- package/tools/cart/items/list-cart-items.mjs.map +0 -1
- package/tools/cart/items/remove-cart-items.d.mts +0 -51
- package/tools/cart/items/remove-cart-items.d.mts.map +0 -1
- package/tools/cart/items/remove-cart-items.d.ts +0 -51
- package/tools/cart/items/remove-cart-items.d.ts.map +0 -1
- package/tools/cart/items/remove-cart-items.js +0 -57
- package/tools/cart/items/remove-cart-items.js.map +0 -1
- package/tools/cart/items/remove-cart-items.mjs +0 -50
- package/tools/cart/items/remove-cart-items.mjs.map +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -71
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -64
- package/tools/index.mjs.map +0 -1
- package/tools/orders/retrieve-status-orders.d.mts +0 -51
- package/tools/orders/retrieve-status-orders.d.mts.map +0 -1
- package/tools/orders/retrieve-status-orders.d.ts +0 -51
- package/tools/orders/retrieve-status-orders.d.ts.map +0 -1
- package/tools/orders/retrieve-status-orders.js +0 -54
- package/tools/orders/retrieve-status-orders.js.map +0 -1
- package/tools/orders/retrieve-status-orders.mjs +0 -47
- package/tools/orders/retrieve-status-orders.mjs.map +0 -1
- package/tools/products/retrieve-product-details.d.mts +0 -51
- package/tools/products/retrieve-product-details.d.mts.map +0 -1
- package/tools/products/retrieve-product-details.d.ts +0 -51
- package/tools/products/retrieve-product-details.d.ts.map +0 -1
- package/tools/products/retrieve-product-details.js +0 -49
- package/tools/products/retrieve-product-details.js.map +0 -1
- package/tools/products/retrieve-product-details.mjs +0 -42
- package/tools/products/retrieve-product-details.mjs.map +0 -1
- package/tools/products/search-products.d.mts +0 -51
- package/tools/products/search-products.d.mts.map +0 -1
- package/tools/products/search-products.d.ts +0 -51
- package/tools/products/search-products.d.ts.map +0 -1
- package/tools/products/search-products.js +0 -110
- package/tools/products/search-products.js.map +0 -1
- package/tools/products/search-products.mjs +0 -103
- package/tools/products/search-products.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools/wallet/collect-payment-details.d.mts +0 -51
- package/tools/wallet/collect-payment-details.d.mts.map +0 -1
- package/tools/wallet/collect-payment-details.d.ts +0 -51
- package/tools/wallet/collect-payment-details.d.ts.map +0 -1
- package/tools/wallet/collect-payment-details.js +0 -56
- package/tools/wallet/collect-payment-details.js.map +0 -1
- package/tools/wallet/collect-payment-details.mjs +0 -49
- package/tools/wallet/collect-payment-details.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
- /package/{tools/types.js → types.js} +0 -0
- /package/{tools/types.mjs → types.mjs} +0 -0
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ For clients with a configuration JSON, it might look something like this:
|
|
|
24
24
|
"mcpServers": {
|
|
25
25
|
"henrylabs_sdk_api": {
|
|
26
26
|
"command": "npx",
|
|
27
|
-
"args": ["-y", "@henrylabs/mcp"
|
|
27
|
+
"args": ["-y", "@henrylabs/mcp"],
|
|
28
28
|
"env": {
|
|
29
29
|
"HENRY_SDK_API_KEY": "My API Key",
|
|
30
30
|
"HENRY_SDK_ENVIRONMENT": "sandbox"
|
|
@@ -57,110 +57,22 @@ environment variables in Claude Code's `.claude.json`, which can be found in you
|
|
|
57
57
|
claude mcp add --transport stdio henrylabs_sdk_api --env HENRY_SDK_API_KEY="Your HENRY_SDK_API_KEY here." -- npx -y @henrylabs/mcp
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
##
|
|
60
|
+
## Code Mode
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
This MCP server is built on the "Code Mode" tool scheme. In this MCP Server,
|
|
63
|
+
your agent will write code against the TypeScript SDK, which will then be executed in an
|
|
64
|
+
isolated sandbox. To accomplish this, the server will expose two tools to your agent:
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
3. Exposing a docs search tool and a code execution tool, allowing the client to write code to be executed against the TypeScript client
|
|
66
|
+
- The first tool is a docs search tool, which can be used to generically query for
|
|
67
|
+
documentation about your API/SDK.
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
- The second tool is a code tool, where the agent can write code against the TypeScript SDK.
|
|
70
|
+
The code will be executed in a sandbox environment without web or filesystem access. Then,
|
|
71
|
+
anything the code returns or prints will be returned to the agent as the result of the
|
|
72
|
+
tool call.
|
|
69
73
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
context window.
|
|
73
|
-
|
|
74
|
-
You can filter by multiple aspects:
|
|
75
|
-
|
|
76
|
-
- `--tool` includes a specific tool by name
|
|
77
|
-
- `--resource` includes all tools under a specific resource, and can have wildcards, e.g. `my.resource*`
|
|
78
|
-
- `--operation` includes just read (get/list) or just write operations
|
|
79
|
-
|
|
80
|
-
### Dynamic tools
|
|
81
|
-
|
|
82
|
-
If you specify `--tools=dynamic` to the MCP server, instead of exposing one tool per endpoint in the API, it will
|
|
83
|
-
expose the following tools:
|
|
84
|
-
|
|
85
|
-
1. `list_api_endpoints` - Discovers available endpoints, with optional filtering by search query
|
|
86
|
-
2. `get_api_endpoint_schema` - Gets detailed schema information for a specific endpoint
|
|
87
|
-
3. `invoke_api_endpoint` - Executes any endpoint with the appropriate parameters
|
|
88
|
-
|
|
89
|
-
This allows you to have the full set of API endpoints available to your MCP Client, while not requiring that all
|
|
90
|
-
of their schemas be loaded into context at once. Instead, the LLM will automatically use these tools together to
|
|
91
|
-
search for, look up, and invoke endpoints dynamically. However, due to the indirect nature of the schemas, it
|
|
92
|
-
can struggle to provide the correct properties a bit more than when tools are imported explicitly. Therefore,
|
|
93
|
-
you can opt-in to explicit tools, the dynamic tools, or both.
|
|
94
|
-
|
|
95
|
-
See more information with `--help`.
|
|
96
|
-
|
|
97
|
-
All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. `--no-tool`).
|
|
98
|
-
|
|
99
|
-
Use `--list` to see the list of available tools, or see below.
|
|
100
|
-
|
|
101
|
-
### Code execution
|
|
102
|
-
|
|
103
|
-
If you specify `--tools=code` to the MCP server, it will expose just two tools:
|
|
104
|
-
|
|
105
|
-
- `search_docs` - Searches the API documentation and returns a list of markdown results
|
|
106
|
-
- `execute` - Runs code against the TypeScript client
|
|
107
|
-
|
|
108
|
-
This allows the LLM to implement more complex logic by chaining together many API calls without loading
|
|
109
|
-
intermediary results into its context window.
|
|
110
|
-
|
|
111
|
-
The code execution itself happens in a Deno sandbox that has network access only to the base URL for the API.
|
|
112
|
-
|
|
113
|
-
### Specifying the MCP Client
|
|
114
|
-
|
|
115
|
-
Different clients have varying abilities to handle arbitrary tools and schemas.
|
|
116
|
-
|
|
117
|
-
You can specify the client you are using with the `--client` argument, and the MCP server will automatically
|
|
118
|
-
serve tools and schemas that are more compatible with that client.
|
|
119
|
-
|
|
120
|
-
- `--client=<type>`: Set all capabilities based on a known MCP client
|
|
121
|
-
|
|
122
|
-
- Valid values: `openai-agents`, `claude`, `claude-code`, `cursor`
|
|
123
|
-
- Example: `--client=cursor`
|
|
124
|
-
|
|
125
|
-
Additionally, if you have a client not on the above list, or the client has gotten better
|
|
126
|
-
over time, you can manually enable or disable certain capabilities:
|
|
127
|
-
|
|
128
|
-
- `--capability=<name>`: Specify individual client capabilities
|
|
129
|
-
- Available capabilities:
|
|
130
|
-
- `top-level-unions`: Enable support for top-level unions in tool schemas
|
|
131
|
-
- `valid-json`: Enable JSON string parsing for arguments
|
|
132
|
-
- `refs`: Enable support for $ref pointers in schemas
|
|
133
|
-
- `unions`: Enable support for union types (anyOf) in schemas
|
|
134
|
-
- `formats`: Enable support for format validations in schemas (e.g. date-time, email)
|
|
135
|
-
- `tool-name-length=N`: Set maximum tool name length to N characters
|
|
136
|
-
- Example: `--capability=top-level-unions --capability=tool-name-length=40`
|
|
137
|
-
- Example: `--capability=top-level-unions,tool-name-length=40`
|
|
138
|
-
|
|
139
|
-
### Examples
|
|
140
|
-
|
|
141
|
-
1. Filter for read operations on cards:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
--resource=cards --operation=read
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
2. Exclude specific tools while including others:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
--resource=cards --no-tool=create_cards
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
3. Configure for Cursor client with custom max tool name length:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
--client=cursor --capability=tool-name-length=40
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
4. Complex filtering with multiple criteria:
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards
|
|
163
|
-
```
|
|
74
|
+
Using this scheme, agents are capable of performing very complex tasks deterministically
|
|
75
|
+
and repeatably.
|
|
164
76
|
|
|
165
77
|
## Running remotely
|
|
166
78
|
|
|
@@ -185,236 +97,3 @@ A configuration JSON for this server might look like this, assuming the server i
|
|
|
185
97
|
}
|
|
186
98
|
}
|
|
187
99
|
```
|
|
188
|
-
|
|
189
|
-
The command-line arguments for filtering tools and specifying clients can also be used as query parameters in the URL.
|
|
190
|
-
For example, to exclude specific tools while including others, use the URL:
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
http://localhost:3000?resource=cards&resource=accounts&no_tool=create_cards
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Or, to configure for the Cursor client, with a custom max tool name length, use the URL:
|
|
197
|
-
|
|
198
|
-
```
|
|
199
|
-
http://localhost:3000?client=cursor&capability=tool-name-length%3D40
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
## Importing the tools and server individually
|
|
203
|
-
|
|
204
|
-
```js
|
|
205
|
-
// Import the server, generated endpoints, or the init function
|
|
206
|
-
import { server, endpoints, init } from "@henrylabs/mcp/server";
|
|
207
|
-
|
|
208
|
-
// import a specific tool
|
|
209
|
-
import retrieveProductDetails from "@henrylabs/mcp/tools/products/retrieve-product-details";
|
|
210
|
-
|
|
211
|
-
// initialize the server and all endpoints
|
|
212
|
-
init({ server, endpoints });
|
|
213
|
-
|
|
214
|
-
// manually start server
|
|
215
|
-
const transport = new StdioServerTransport();
|
|
216
|
-
await server.connect(transport);
|
|
217
|
-
|
|
218
|
-
// or initialize your own server with specific tools
|
|
219
|
-
const myServer = new McpServer(...);
|
|
220
|
-
|
|
221
|
-
// define your own endpoint
|
|
222
|
-
const myCustomEndpoint = {
|
|
223
|
-
tool: {
|
|
224
|
-
name: 'my_custom_tool',
|
|
225
|
-
description: 'My custom tool',
|
|
226
|
-
inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
|
|
227
|
-
},
|
|
228
|
-
handler: async (client: client, args: any) => {
|
|
229
|
-
return { myResponse: 'Hello world!' };
|
|
230
|
-
})
|
|
231
|
-
};
|
|
232
|
-
|
|
233
|
-
// initialize the server with your custom endpoints
|
|
234
|
-
init({ server: myServer, endpoints: [retrieveProductDetails, myCustomEndpoint] });
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
## Available Tools
|
|
238
|
-
|
|
239
|
-
The following tools are available in this MCP server.
|
|
240
|
-
|
|
241
|
-
### Resource `products`:
|
|
242
|
-
|
|
243
|
-
- `retrieve_product_details` (`read`): Retrieve comprehensive product details using a product ID from search results.
|
|
244
|
-
|
|
245
|
-
MUST BE CALLED BEFORE adding items to cart - this is the only way to get the productLink required for cart operations.
|
|
246
|
-
|
|
247
|
-
Returns:
|
|
248
|
-
|
|
249
|
-
- Product title, brand, rating, review count
|
|
250
|
-
- Stores array with name, price, shipping, total, and LINK for each retailer
|
|
251
|
-
- Available variants (sizes, colors, etc.) with availability status
|
|
252
|
-
- Thumbnail images (multiple angles)
|
|
253
|
-
|
|
254
|
-
- `search_products` (`write`): Search for products using keywords and filters (price range, color, size, gender, manufacturer, region).
|
|
255
|
-
|
|
256
|
-
Returns basic product information:
|
|
257
|
-
|
|
258
|
-
- Product ID (required for next step)
|
|
259
|
-
- Name, price, currency, description
|
|
260
|
-
- Thumbnail image URL
|
|
261
|
-
|
|
262
|
-
You MUST call retrieve_product_details() with each product's ID to get:
|
|
263
|
-
|
|
264
|
-
- Actual store links for purchasing
|
|
265
|
-
- All available variants
|
|
266
|
-
- Detailed reviews and ratings
|
|
267
|
-
- Price comparisons across stores
|
|
268
|
-
|
|
269
|
-
Recommended flow:
|
|
270
|
-
|
|
271
|
-
1. search_products(query, filters) - Get product IDs
|
|
272
|
-
2. retrieve_product_details(productId) - Get store URLs and variants for each
|
|
273
|
-
3. Present results with images, prices, AND clickable store links
|
|
274
|
-
|
|
275
|
-
Common filters: limit (default 10), greaterThanPrice, lowerThanPrice, color, size, gender
|
|
276
|
-
|
|
277
|
-
### Resource `cart`:
|
|
278
|
-
|
|
279
|
-
- `create_cart_checkout` (`write`): Generates a fully-hosted checkout URL for the user's cart. This is the SIMPLEST checkout method.
|
|
280
|
-
|
|
281
|
-
The hosted page handles:
|
|
282
|
-
|
|
283
|
-
- Order review
|
|
284
|
-
- Shipping address collection
|
|
285
|
-
- Payment information (via Stripe)
|
|
286
|
-
- Order confirmation
|
|
287
|
-
- All UI and validation
|
|
288
|
-
|
|
289
|
-
Returns: checkout_url (direct link for user to complete purchase)
|
|
290
|
-
|
|
291
|
-
Parameters:
|
|
292
|
-
|
|
293
|
-
- auth: true (default) - requires user authentication, false for guest checkout
|
|
294
|
-
|
|
295
|
-
Use this when:
|
|
296
|
-
|
|
297
|
-
- You want a quick, complete checkout solution
|
|
298
|
-
- Don't need custom checkout UI
|
|
299
|
-
- Want Stripe to handle payment collection
|
|
300
|
-
|
|
301
|
-
For custom checkout UI, use the headless flow instead:
|
|
302
|
-
create_checkout_session → collect_payment_details → confirm_checkout_session
|
|
303
|
-
|
|
304
|
-
### Resource `cart.items`:
|
|
305
|
-
|
|
306
|
-
- `list_cart_items` (`read`): Retrieve all products currently in the user's cart.
|
|
307
|
-
|
|
308
|
-
Returns products array with:
|
|
309
|
-
|
|
310
|
-
- name, price, productLink, quantity
|
|
311
|
-
- productId (if provided when added)
|
|
312
|
-
- metadata (variant selections)
|
|
313
|
-
- productImageLink (thumbnail)
|
|
314
|
-
- affiliateProductLink (if used)
|
|
315
|
-
|
|
316
|
-
Use this to:
|
|
317
|
-
|
|
318
|
-
- Show cart contents before checkout
|
|
319
|
-
- Calculate totals
|
|
320
|
-
- Verify items before creating checkout
|
|
321
|
-
|
|
322
|
-
- `add_cart_items` (`write`): Add products to cart or update quantities if already in cart.
|
|
323
|
-
|
|
324
|
-
Required fields per product:
|
|
325
|
-
|
|
326
|
-
- name: Product name (from retrieve_product_details)
|
|
327
|
-
- price: Price as string, e.g. "29.99" (from stores[0].price)
|
|
328
|
-
- productLink: Store URL (from stores[0].link - MUST call retrieve_product_details first)
|
|
329
|
-
- quantity: Number of items
|
|
330
|
-
|
|
331
|
-
Optional but IMPORTANT:
|
|
332
|
-
|
|
333
|
-
- metadata: Object containing variant selections (size, color, etc.)
|
|
334
|
-
Example: {"size": "Large", "color": "Blue"}
|
|
335
|
-
- productImageLink: Thumbnail URL (from thumbnails[0])
|
|
336
|
-
- affiliateProductLink: Use instead of productLink for affiliate tracking
|
|
337
|
-
- productId: Include for easier tracking
|
|
338
|
-
|
|
339
|
-
VARIANT HANDLING:
|
|
340
|
-
If retrieve_product_details shows variants array, you MUST:
|
|
341
|
-
|
|
342
|
-
1. Show variants to user: "Available sizes: S, M, L, XL"
|
|
343
|
-
2. Get user's selection
|
|
344
|
-
3. Include in metadata: {"size": "L"}
|
|
345
|
-
|
|
346
|
-
Optional: Set checkVariantAvailability: true to verify variants exist at stores
|
|
347
|
-
|
|
348
|
-
Returns:
|
|
349
|
-
|
|
350
|
-
- added_products: New items in cart
|
|
351
|
-
- updated_products: Items with quantity increases
|
|
352
|
-
- cart_summary: total_items and total_unique_products
|
|
353
|
-
- variant_checks: Availability verification results (if requested)
|
|
354
|
-
|
|
355
|
-
- `clear_cart_items` (`write`): Remove ALL products from the cart. Cannot be undone.
|
|
356
|
-
|
|
357
|
-
Use when:
|
|
358
|
-
|
|
359
|
-
- User wants to start over
|
|
360
|
-
- Clearing abandoned cart
|
|
361
|
-
- After successful order completion
|
|
362
|
-
|
|
363
|
-
Returns success confirmation message.
|
|
364
|
-
|
|
365
|
-
- `remove_cart_items` (`write`): Remove a specific product from the cart by its productId.
|
|
366
|
-
|
|
367
|
-
Required: productId (must match the ID used when adding item)
|
|
368
|
-
|
|
369
|
-
Returns success confirmation message.
|
|
370
|
-
|
|
371
|
-
### Resource `orders`:
|
|
372
|
-
|
|
373
|
-
- `retrieve_status_orders` (`read`): Check the status and details of an order using its order ID.
|
|
374
|
-
|
|
375
|
-
Returns:
|
|
376
|
-
|
|
377
|
-
- id: Order ID
|
|
378
|
-
- status: Current order status (e.g., "processing", "shipped", "delivered")
|
|
379
|
-
- statusMessage: Detailed status description
|
|
380
|
-
- products: Array with productName, quantity, productMetadata (variants)
|
|
381
|
-
- currency, subtotal, shipping, tax, grandTotal
|
|
382
|
-
- shippingDetails: Full delivery address
|
|
383
|
-
- userId: User who placed order
|
|
384
|
-
- cardLast4: Payment card used (last 4 digits)
|
|
385
|
-
|
|
386
|
-
Use for:
|
|
387
|
-
|
|
388
|
-
- Order tracking
|
|
389
|
-
- Status updates
|
|
390
|
-
- Order history
|
|
391
|
-
- Customer support
|
|
392
|
-
|
|
393
|
-
### Resource `wallet`:
|
|
394
|
-
|
|
395
|
-
- `collect_payment_details` (`write`): Generate a modal URL for securely collecting payment card information via Stripe.
|
|
396
|
-
|
|
397
|
-
MUST be called in headless checkout flow BEFORE confirm_checkout_session.
|
|
398
|
-
|
|
399
|
-
Parameters:
|
|
400
|
-
|
|
401
|
-
- auth: true (default) - requires authentication, false for guest checkout
|
|
402
|
-
|
|
403
|
-
Returns:
|
|
404
|
-
|
|
405
|
-
- modal_url: Stripe-hosted page for card collection
|
|
406
|
-
|
|
407
|
-
Workflow:
|
|
408
|
-
|
|
409
|
-
1. Call this endpoint
|
|
410
|
-
2. Direct user to modal_url to enter payment details
|
|
411
|
-
3. After user completes payment form, proceed with confirm_checkout_session
|
|
412
|
-
|
|
413
|
-
The modal handles:
|
|
414
|
-
|
|
415
|
-
- PCI-compliant card collection
|
|
416
|
-
- Card validation
|
|
417
|
-
- Secure tokenization
|
|
418
|
-
- Saving card for future use
|
|
419
|
-
|
|
420
|
-
For hosted checkout, payment collection is automatic (use create_cart_checkout instead).
|
package/code-tool.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { McpTool } from "./types.mjs";
|
|
2
2
|
/**
|
|
3
3
|
* A tool that runs code against a copy of the SDK.
|
|
4
4
|
*
|
|
@@ -8,47 +8,5 @@ import { Metadata, ToolCallResult } from "./tools/types.mjs";
|
|
|
8
8
|
*
|
|
9
9
|
* @param endpoints - The endpoints to include in the list.
|
|
10
10
|
*/
|
|
11
|
-
export declare function codeTool():
|
|
12
|
-
metadata: Metadata;
|
|
13
|
-
tool: {
|
|
14
|
-
inputSchema: {
|
|
15
|
-
[x: string]: unknown;
|
|
16
|
-
type: "object";
|
|
17
|
-
properties?: {
|
|
18
|
-
[x: string]: object;
|
|
19
|
-
} | undefined;
|
|
20
|
-
required?: string[] | undefined;
|
|
21
|
-
};
|
|
22
|
-
name: string;
|
|
23
|
-
description?: string | undefined;
|
|
24
|
-
outputSchema?: {
|
|
25
|
-
[x: string]: unknown;
|
|
26
|
-
type: "object";
|
|
27
|
-
properties?: {
|
|
28
|
-
[x: string]: object;
|
|
29
|
-
} | undefined;
|
|
30
|
-
required?: string[] | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
annotations?: {
|
|
33
|
-
title?: string | undefined;
|
|
34
|
-
readOnlyHint?: boolean | undefined;
|
|
35
|
-
destructiveHint?: boolean | undefined;
|
|
36
|
-
idempotentHint?: boolean | undefined;
|
|
37
|
-
openWorldHint?: boolean | undefined;
|
|
38
|
-
} | undefined;
|
|
39
|
-
execution?: {
|
|
40
|
-
taskSupport?: "optional" | "required" | "forbidden" | undefined;
|
|
41
|
-
} | undefined;
|
|
42
|
-
_meta?: {
|
|
43
|
-
[x: string]: unknown;
|
|
44
|
-
} | undefined;
|
|
45
|
-
icons?: {
|
|
46
|
-
src: string;
|
|
47
|
-
mimeType?: string | undefined;
|
|
48
|
-
sizes?: string[] | undefined;
|
|
49
|
-
}[] | undefined;
|
|
50
|
-
title?: string | undefined;
|
|
51
|
-
};
|
|
52
|
-
handler: (_: unknown, args: any) => Promise<ToolCallResult>;
|
|
53
|
-
}>;
|
|
11
|
+
export declare function codeTool(): McpTool;
|
|
54
12
|
//# sourceMappingURL=code-tool.d.mts.map
|
package/code-tool.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,
|
|
1
|
+
{"version":3,"file":"code-tool.d.mts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAiD;AAIjE;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA8ClC"}
|
package/code-tool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { McpTool } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* A tool that runs code against a copy of the SDK.
|
|
4
4
|
*
|
|
@@ -8,47 +8,5 @@ import { Metadata, ToolCallResult } from "./tools/types.js";
|
|
|
8
8
|
*
|
|
9
9
|
* @param endpoints - The endpoints to include in the list.
|
|
10
10
|
*/
|
|
11
|
-
export declare function codeTool():
|
|
12
|
-
metadata: Metadata;
|
|
13
|
-
tool: {
|
|
14
|
-
inputSchema: {
|
|
15
|
-
[x: string]: unknown;
|
|
16
|
-
type: "object";
|
|
17
|
-
properties?: {
|
|
18
|
-
[x: string]: object;
|
|
19
|
-
} | undefined;
|
|
20
|
-
required?: string[] | undefined;
|
|
21
|
-
};
|
|
22
|
-
name: string;
|
|
23
|
-
description?: string | undefined;
|
|
24
|
-
outputSchema?: {
|
|
25
|
-
[x: string]: unknown;
|
|
26
|
-
type: "object";
|
|
27
|
-
properties?: {
|
|
28
|
-
[x: string]: object;
|
|
29
|
-
} | undefined;
|
|
30
|
-
required?: string[] | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
annotations?: {
|
|
33
|
-
title?: string | undefined;
|
|
34
|
-
readOnlyHint?: boolean | undefined;
|
|
35
|
-
destructiveHint?: boolean | undefined;
|
|
36
|
-
idempotentHint?: boolean | undefined;
|
|
37
|
-
openWorldHint?: boolean | undefined;
|
|
38
|
-
} | undefined;
|
|
39
|
-
execution?: {
|
|
40
|
-
taskSupport?: "optional" | "required" | "forbidden" | undefined;
|
|
41
|
-
} | undefined;
|
|
42
|
-
_meta?: {
|
|
43
|
-
[x: string]: unknown;
|
|
44
|
-
} | undefined;
|
|
45
|
-
icons?: {
|
|
46
|
-
src: string;
|
|
47
|
-
mimeType?: string | undefined;
|
|
48
|
-
sizes?: string[] | undefined;
|
|
49
|
-
}[] | undefined;
|
|
50
|
-
title?: string | undefined;
|
|
51
|
-
};
|
|
52
|
-
handler: (_: unknown, args: any) => Promise<ToolCallResult>;
|
|
53
|
-
}>;
|
|
11
|
+
export declare function codeTool(): McpTool;
|
|
54
12
|
//# sourceMappingURL=code-tool.d.ts.map
|
package/code-tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,
|
|
1
|
+
{"version":3,"file":"code-tool.d.ts","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"OAEO,EAAE,OAAO,EAAiD;AAIjE;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA8ClC"}
|
package/code-tool.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.codeTool = codeTool;
|
|
5
|
-
const types_1 = require("./
|
|
5
|
+
const types_1 = require("./types.js");
|
|
6
6
|
const server_1 = require("./server.js");
|
|
7
7
|
/**
|
|
8
8
|
* A tool that runs code against a copy of the SDK.
|
|
@@ -13,7 +13,7 @@ const server_1 = require("./server.js");
|
|
|
13
13
|
*
|
|
14
14
|
* @param endpoints - The endpoints to include in the list.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
function codeTool() {
|
|
17
17
|
const metadata = { resource: 'all', operation: 'write', tags: [] };
|
|
18
18
|
const tool = {
|
|
19
19
|
name: 'execute',
|
|
@@ -31,10 +31,14 @@ async function codeTool() {
|
|
|
31
31
|
headers: {
|
|
32
32
|
...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
|
|
33
33
|
'Content-Type': 'application/json',
|
|
34
|
-
client_envs: JSON.stringify({
|
|
34
|
+
client_envs: JSON.stringify({
|
|
35
|
+
HENRY_SDK_API_KEY: (0, server_1.readEnv)('HENRY_SDK_API_KEY'),
|
|
36
|
+
HENRY_SDK_BASE_URL: (0, server_1.readEnv)('HENRY_SDK_BASE_URL'),
|
|
37
|
+
}),
|
|
35
38
|
},
|
|
36
39
|
body: JSON.stringify({
|
|
37
40
|
project_name: 'henry-sdk',
|
|
41
|
+
client_opts: { environment: ((0, server_1.readEnv)('HENRY_SDK_ENVIRONMENT') || undefined) },
|
|
38
42
|
code,
|
|
39
43
|
}),
|
|
40
44
|
});
|
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;;AAetF,
|
|
1
|
+
{"version":3,"file":"code-tool.js","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAetF,4BA8CC;AA3DD,sCAAiF;AAEjF,wCAAmC;AAEnC;;;;;;;;GAQG;AACH,SAAgB,QAAQ;IACtB,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,iiCAAiiC;QACniC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;KAC1E,CAAC;IACF,MAAM,OAAO,GAAG,KAAK,EAAE,CAAU,EAAE,IAAS,EAA2B,EAAE;QACvE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;QAEjC,sFAAsF;QACtF,sFAAsF;QACtF,MAAM,eAAe,GAAG,IAAA,gBAAO,EAAC,mBAAmB,CAAC,CAAC;QACrD,MAAM,gBAAgB,GACpB,IAAA,gBAAO,EAAC,wBAAwB,CAAC,IAAI,4CAA4C,CAAC;QAEpF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,GAAG,CAAC,eAAe,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;gBAC1D,cAAc,EAAE,kBAAkB;gBAClC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC1B,iBAAiB,EAAE,IAAA,gBAAO,EAAC,mBAAmB,CAAC;oBAC/C,kBAAkB,EAAE,IAAA,gBAAO,EAAC,oBAAoB,CAAC;iBAClD,CAAC;aACH;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,YAAY,EAAE,WAAW;gBACzB,WAAW,EAAE,EAAE,WAAW,EAAE,CAAC,IAAA,gBAAO,EAAC,uBAAuB,CAAC,IAAI,SAAS,CAAQ,EAAE;gBACpF,IAAI;aACL,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,MAAM,KACX,GAAG,CAAC,UACN,4DAA4D,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,2BAAmB,EAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
|
package/code-tool.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { asTextContentResult } from "./
|
|
2
|
+
import { asTextContentResult } from "./types.mjs";
|
|
3
3
|
import { readEnv } from "./server.mjs";
|
|
4
4
|
/**
|
|
5
5
|
* A tool that runs code against a copy of the SDK.
|
|
@@ -10,7 +10,7 @@ import { readEnv } from "./server.mjs";
|
|
|
10
10
|
*
|
|
11
11
|
* @param endpoints - The endpoints to include in the list.
|
|
12
12
|
*/
|
|
13
|
-
export
|
|
13
|
+
export function codeTool() {
|
|
14
14
|
const metadata = { resource: 'all', operation: 'write', tags: [] };
|
|
15
15
|
const tool = {
|
|
16
16
|
name: 'execute',
|
|
@@ -28,10 +28,14 @@ export async function codeTool() {
|
|
|
28
28
|
headers: {
|
|
29
29
|
...(stainlessAPIKey && { Authorization: stainlessAPIKey }),
|
|
30
30
|
'Content-Type': 'application/json',
|
|
31
|
-
client_envs: JSON.stringify({
|
|
31
|
+
client_envs: JSON.stringify({
|
|
32
|
+
HENRY_SDK_API_KEY: readEnv('HENRY_SDK_API_KEY'),
|
|
33
|
+
HENRY_SDK_BASE_URL: readEnv('HENRY_SDK_BASE_URL'),
|
|
34
|
+
}),
|
|
32
35
|
},
|
|
33
36
|
body: JSON.stringify({
|
|
34
37
|
project_name: 'henry-sdk',
|
|
38
|
+
client_opts: { environment: (readEnv('HENRY_SDK_ENVIRONMENT') || undefined) },
|
|
35
39
|
code,
|
|
36
40
|
}),
|
|
37
41
|
});
|
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,
|
|
1
|
+
{"version":3,"file":"code-tool.mjs","sourceRoot":"","sources":["src/code-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAqC,mBAAmB,EAAE;OAE1D,EAAE,OAAO,EAAE;AAElB;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ;IACtB,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,iiCAAiiC;QACniC,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;KAC1E,CAAC;IACF,MAAM,OAAO,GAAG,KAAK,EAAE,CAAU,EAAE,IAAS,EAA2B,EAAE;QACvE,MAAM,IAAI,GAAG,IAAI,CAAC,IAAc,CAAC;QAEjC,sFAAsF;QACtF,sFAAsF;QACtF,MAAM,eAAe,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;QACrD,MAAM,gBAAgB,GACpB,OAAO,CAAC,wBAAwB,CAAC,IAAI,4CAA4C,CAAC;QAEpF,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,gBAAgB,EAAE;YACxC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE;gBACP,GAAG,CAAC,eAAe,IAAI,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC;gBAC1D,cAAc,EAAE,kBAAkB;gBAClC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;oBAC1B,iBAAiB,EAAE,OAAO,CAAC,mBAAmB,CAAC;oBAC/C,kBAAkB,EAAE,OAAO,CAAC,oBAAoB,CAAC;iBAClD,CAAC;aACH;YACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,YAAY,EAAE,WAAW;gBACzB,WAAW,EAAE,EAAE,WAAW,EAAE,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,SAAS,CAAQ,EAAE;gBACpF,IAAI;aACL,CAAC;SACH,CAAC,CAAC;QAEH,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,GAAG,GAAG,CAAC,MAAM,KACX,GAAG,CAAC,UACN,4DAA4D,MAAM,GAAG,CAAC,IAAI,EAAE,EAAE,CAC/E,CAAC;QACJ,CAAC;QAED,OAAO,mBAAmB,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAkB,CAAC,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC"}
|
package/docs-search-tool.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Metadata } from "./
|
|
1
|
+
import { Metadata } from "./types.mjs";
|
|
2
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
3
|
export declare const metadata: Metadata;
|
|
4
4
|
export declare const tool: Tool;
|
|
5
|
-
export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./
|
|
5
|
+
export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
|
|
6
6
|
declare const _default: {
|
|
7
7
|
metadata: Metadata;
|
|
8
8
|
tool: {
|
|
@@ -44,7 +44,7 @@ declare const _default: {
|
|
|
44
44
|
}[] | undefined;
|
|
45
45
|
title?: string | undefined;
|
|
46
46
|
};
|
|
47
|
-
handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./
|
|
47
|
+
handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
|
|
48
48
|
};
|
|
49
49
|
export default _default;
|
|
50
50
|
//# sourceMappingURL=docs-search-tool.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,8CAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
|
package/docs-search-tool.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Metadata } from "./
|
|
1
|
+
import { Metadata } from "./types.js";
|
|
2
2
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
3
|
export declare const metadata: Metadata;
|
|
4
4
|
export declare const tool: Tool;
|
|
5
|
-
export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./
|
|
5
|
+
export declare const handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
|
|
6
6
|
declare const _default: {
|
|
7
7
|
metadata: Metadata;
|
|
8
8
|
tool: {
|
|
@@ -44,7 +44,7 @@ declare const _default: {
|
|
|
44
44
|
}[] | undefined;
|
|
45
45
|
title?: string | undefined;
|
|
46
46
|
};
|
|
47
|
-
handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./
|
|
47
|
+
handler: (_: unknown, args: Record<string, unknown> | undefined) => Promise<import("./types").ToolCallResult>;
|
|
48
48
|
};
|
|
49
49
|
export default _default;
|
|
50
50
|
//# sourceMappingURL=docs-search-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB;OAEjC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,GAAG,OAAO,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,8CAYlF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAZ+B,OAAO,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAcnF,wBAA2C"}
|
package/docs-search-tool.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
-
const types_1 = require("./
|
|
5
|
+
const types_1 = require("./types.js");
|
|
6
6
|
exports.metadata = {
|
|
7
7
|
resource: 'all',
|
|
8
8
|
operation: 'read',
|
package/docs-search-tool.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-search-tool.js","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"docs-search-tool.js","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAAwD;AAI3C,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8EAA8E;IAC3F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;gBACtD,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;aAClG;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iCAAiC;gBAC9C,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;aAC7B;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC;KAChC;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,aAAa,GACjB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,8DAA8D,CAAC;AAE5F,MAAM,OAAO,GAAG,KAAK,EAAE,CAAU,EAAE,IAAyC,EAAE,EAAE;IACrF,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;IACnD,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,GAAG,aAAa,IAAI,KAAK,EAAE,CAAC,CAAC;IAExD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,yCAAyC,MAAM,MAAM,CAAC,IAAI,EAAE,EAAE,CACrG,CAAC;IACJ,CAAC;IAED,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
package/docs-search-tool.mjs
CHANGED
package/http.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.mts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;
|
|
1
|
+
{"version":3,"file":"http.d.mts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;OACtB,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAA+B;AAuErD,eAAO,MAAM,iBAAiB,GAAI,gCAG/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,KAAG,OAAO,CAAC,OAUX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,SAAS,UAAU,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,kBAYtG,CAAC"}
|
package/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAKO,OAAO,MAAM,SAAS;OACtB,EAAE,UAAU,EAAE;OACd,EAAE,aAAa,EAA+B;AAuErD,eAAO,MAAM,iBAAiB,GAAI,gCAG/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,KAAG,OAAO,CAAC,OAUX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,SAAS,UAAU,EAAE,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,kBAYtG,CAAC"}
|