@sly_ai/mcp-server 0.1.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 +250 -0
- package/dist/chunk-4TYFE45V.js +1263 -0
- package/dist/chunk-7VGOP77O.js +2069 -0
- package/dist/chunk-DUH5YKYI.js +1334 -0
- package/dist/chunk-EHDJW7S4.js +1260 -0
- package/dist/chunk-HIYKNQTJ.js +1202 -0
- package/dist/chunk-IRPIEJZP.js +1929 -0
- package/dist/chunk-LB6XWJAE.js +1288 -0
- package/dist/chunk-OHTORKDB.js +1301 -0
- package/dist/chunk-Y5FGTJ5F.js +2072 -0
- package/dist/chunk-Y7U7ZXH5.js +1298 -0
- package/dist/chunk-YDZJAN2U.js +2042 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +44 -0
- package/dist/server-factory.d.ts +28 -0
- package/dist/server-factory.js +7 -0
- package/dist/tools.d.ts +12 -0
- package/dist/tools.js +6 -0
- package/package.json +51 -0
- package/src/index.test.ts +75 -0
- package/src/index.ts +72 -0
- package/src/server-factory.ts +1664 -0
- package/src/tools.ts +2064 -0
- package/tsconfig.json +15 -0
- package/vitest.config.ts +8 -0
|
@@ -0,0 +1,1929 @@
|
|
|
1
|
+
// src/tools.ts
|
|
2
|
+
var tools = [
|
|
3
|
+
// ==========================================================================
|
|
4
|
+
// Core Settlement Tools
|
|
5
|
+
// ==========================================================================
|
|
6
|
+
{
|
|
7
|
+
name: "get_settlement_quote",
|
|
8
|
+
description: "Get a settlement quote for cross-border payment with FX rates and fees",
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: "object",
|
|
11
|
+
properties: {
|
|
12
|
+
fromCurrency: {
|
|
13
|
+
type: "string",
|
|
14
|
+
enum: ["USD", "BRL", "MXN", "USDC"],
|
|
15
|
+
description: "Source currency"
|
|
16
|
+
},
|
|
17
|
+
toCurrency: {
|
|
18
|
+
type: "string",
|
|
19
|
+
enum: ["USD", "BRL", "MXN", "USDC"],
|
|
20
|
+
description: "Destination currency"
|
|
21
|
+
},
|
|
22
|
+
amount: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Amount to convert"
|
|
25
|
+
},
|
|
26
|
+
rail: {
|
|
27
|
+
type: "string",
|
|
28
|
+
enum: ["pix", "spei", "wire", "usdc"],
|
|
29
|
+
description: "Settlement rail (optional)"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
required: ["fromCurrency", "toCurrency", "amount"]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "create_settlement",
|
|
37
|
+
description: "Execute a settlement using a quote",
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
quoteId: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Quote ID from get_settlement_quote"
|
|
44
|
+
},
|
|
45
|
+
destinationAccountId: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "Destination account ID"
|
|
48
|
+
},
|
|
49
|
+
metadata: {
|
|
50
|
+
type: "object",
|
|
51
|
+
description: "Optional metadata"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
required: ["quoteId", "destinationAccountId"]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "get_settlement_status",
|
|
59
|
+
description: "Check the status of a settlement",
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
settlementId: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Settlement ID"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
required: ["settlementId"]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
// ==========================================================================
|
|
72
|
+
// UCP (Universal Commerce Protocol) Tools
|
|
73
|
+
// ==========================================================================
|
|
74
|
+
{
|
|
75
|
+
name: "ucp_discover",
|
|
76
|
+
description: "Discover a UCP merchant's capabilities by fetching their /.well-known/ucp profile. Use this to find out what a merchant supports before creating a checkout.",
|
|
77
|
+
inputSchema: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
merchantUrl: {
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "The merchant's base URL (e.g., https://shop.example.com)"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
required: ["merchantUrl"]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
// UCP Checkout Session Management
|
|
89
|
+
{
|
|
90
|
+
name: "ucp_create_checkout",
|
|
91
|
+
description: "Create a UCP checkout session with line items, buyer info, and payment configuration. Sessions expire after 6 hours by default.",
|
|
92
|
+
inputSchema: {
|
|
93
|
+
type: "object",
|
|
94
|
+
properties: {
|
|
95
|
+
currency: {
|
|
96
|
+
type: "string",
|
|
97
|
+
description: 'ISO 4217 pricing currency, exactly 3 characters (e.g., "USD", "BRL", "MXN"). This is the display/pricing currency \u2014 the actual payment method (USDC, card, etc.) is set via the payment instrument.'
|
|
98
|
+
},
|
|
99
|
+
line_items: {
|
|
100
|
+
type: "array",
|
|
101
|
+
description: "Items in the checkout",
|
|
102
|
+
items: {
|
|
103
|
+
type: "object",
|
|
104
|
+
properties: {
|
|
105
|
+
id: { type: "string", description: 'Unique item identifier (required, e.g., "item_sneakers")' },
|
|
106
|
+
name: { type: "string", description: "Item name" },
|
|
107
|
+
quantity: { type: "integer", description: "Quantity (positive integer)" },
|
|
108
|
+
unit_price: { type: "integer", description: "Price per unit in cents (e.g., 2999 = $29.99)" },
|
|
109
|
+
total_price: { type: "integer", description: "Line total in cents (quantity * unit_price)" },
|
|
110
|
+
description: { type: "string", description: "Item description (optional)" },
|
|
111
|
+
image_url: { type: "string", description: "Product image URL (optional)" },
|
|
112
|
+
product_url: { type: "string", description: "Product page URL (optional)" }
|
|
113
|
+
},
|
|
114
|
+
required: ["id", "name", "quantity", "unit_price", "total_price"]
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
buyer: {
|
|
118
|
+
type: "object",
|
|
119
|
+
description: "Buyer information (optional)",
|
|
120
|
+
properties: {
|
|
121
|
+
email: { type: "string" },
|
|
122
|
+
name: { type: "string" },
|
|
123
|
+
phone: { type: "string" }
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
shipping_address: {
|
|
127
|
+
type: "object",
|
|
128
|
+
description: "Shipping address (optional)",
|
|
129
|
+
properties: {
|
|
130
|
+
line1: { type: "string" },
|
|
131
|
+
line2: { type: "string" },
|
|
132
|
+
city: { type: "string" },
|
|
133
|
+
state: { type: "string" },
|
|
134
|
+
postal_code: { type: "string" },
|
|
135
|
+
country: { type: "string" }
|
|
136
|
+
},
|
|
137
|
+
required: ["line1", "city", "postal_code", "country"]
|
|
138
|
+
},
|
|
139
|
+
payment_config: {
|
|
140
|
+
type: "object",
|
|
141
|
+
description: "Payment configuration (optional)",
|
|
142
|
+
properties: {
|
|
143
|
+
handlers: {
|
|
144
|
+
type: "array",
|
|
145
|
+
items: { type: "string" },
|
|
146
|
+
description: "Accepted payment handlers"
|
|
147
|
+
},
|
|
148
|
+
default_handler: { type: "string" },
|
|
149
|
+
capture_method: { type: "string", enum: ["automatic", "manual"] }
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
payment_instruments: {
|
|
153
|
+
type: "array",
|
|
154
|
+
description: "Payment instruments. If provided, the first is auto-selected \u2014 the checkout can skip the add-instrument step and go straight to ready_for_complete.",
|
|
155
|
+
items: {
|
|
156
|
+
type: "object",
|
|
157
|
+
properties: {
|
|
158
|
+
id: { type: "string", description: 'Unique instrument identifier (e.g., "pi_sly_usdc_1")' },
|
|
159
|
+
handler: { type: "string", description: 'Payment handler (e.g., "sly")' },
|
|
160
|
+
type: { type: "string", description: 'Instrument type (e.g., "usdc", "card")' },
|
|
161
|
+
last4: { type: "string", description: "Last 4 digits (optional)" },
|
|
162
|
+
brand: { type: "string", description: "Brand name (optional)" }
|
|
163
|
+
},
|
|
164
|
+
required: ["id", "handler", "type"]
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
checkout_type: {
|
|
168
|
+
type: "string",
|
|
169
|
+
enum: ["physical", "digital", "service"],
|
|
170
|
+
description: 'Checkout type. "digital" and "service" skip the shipping address requirement. Default: "physical".'
|
|
171
|
+
},
|
|
172
|
+
metadata: {
|
|
173
|
+
type: "object",
|
|
174
|
+
description: "Custom metadata (optional)"
|
|
175
|
+
},
|
|
176
|
+
agent_id: {
|
|
177
|
+
type: "string",
|
|
178
|
+
description: "Agent ID to attribute this checkout to (optional)"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
required: ["currency", "line_items"]
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "ucp_get_checkout",
|
|
186
|
+
description: "Get UCP checkout session details including line items, totals, payment instruments, and messages.",
|
|
187
|
+
inputSchema: {
|
|
188
|
+
type: "object",
|
|
189
|
+
properties: {
|
|
190
|
+
checkoutId: {
|
|
191
|
+
type: "string",
|
|
192
|
+
description: "UUID of the checkout session"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
required: ["checkoutId"]
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "ucp_list_checkouts",
|
|
200
|
+
description: "List UCP checkout sessions with optional filtering by status or agent.",
|
|
201
|
+
inputSchema: {
|
|
202
|
+
type: "object",
|
|
203
|
+
properties: {
|
|
204
|
+
status: {
|
|
205
|
+
type: "string",
|
|
206
|
+
enum: ["incomplete", "requires_escalation", "ready_for_complete", "complete_in_progress", "completed", "canceled"],
|
|
207
|
+
description: "Filter by checkout status (optional)"
|
|
208
|
+
},
|
|
209
|
+
agent_id: {
|
|
210
|
+
type: "string",
|
|
211
|
+
description: "Filter by agent ID (optional)"
|
|
212
|
+
},
|
|
213
|
+
page: { type: "number", description: "Page number (optional)" },
|
|
214
|
+
limit: { type: "number", description: "Results per page (optional)" }
|
|
215
|
+
},
|
|
216
|
+
required: []
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "ucp_update_checkout",
|
|
221
|
+
description: "Update a UCP checkout session \u2014 change line items, addresses, buyer info, or metadata. Cannot update completed or cancelled checkouts.",
|
|
222
|
+
inputSchema: {
|
|
223
|
+
type: "object",
|
|
224
|
+
properties: {
|
|
225
|
+
checkoutId: {
|
|
226
|
+
type: "string",
|
|
227
|
+
description: "UUID of the checkout session"
|
|
228
|
+
},
|
|
229
|
+
line_items: {
|
|
230
|
+
type: "array",
|
|
231
|
+
description: "Updated line items (optional)",
|
|
232
|
+
items: {
|
|
233
|
+
type: "object",
|
|
234
|
+
properties: {
|
|
235
|
+
name: { type: "string" },
|
|
236
|
+
quantity: { type: "number" },
|
|
237
|
+
unit_price: { type: "number" },
|
|
238
|
+
total_price: { type: "number" }
|
|
239
|
+
},
|
|
240
|
+
required: ["name", "quantity", "unit_price", "total_price"]
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
buyer: { type: "object", description: "Updated buyer info (optional)" },
|
|
244
|
+
shipping_address: { type: "object", description: "Updated shipping address (optional)" },
|
|
245
|
+
billing_address: { type: "object", description: "Updated billing address (optional)" },
|
|
246
|
+
metadata: { type: "object", description: "Updated metadata (optional)" }
|
|
247
|
+
},
|
|
248
|
+
required: ["checkoutId"]
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "ucp_complete_checkout",
|
|
253
|
+
description: "Complete a UCP checkout \u2014 processes payment and creates an order. The checkout must have all required fields and a selected payment instrument. If a mandate_id is in the checkout metadata, the mandate budget must have sufficient remaining balance or the checkout will be rejected.",
|
|
254
|
+
inputSchema: {
|
|
255
|
+
type: "object",
|
|
256
|
+
properties: {
|
|
257
|
+
checkoutId: {
|
|
258
|
+
type: "string",
|
|
259
|
+
description: "UUID of the checkout session to complete"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
required: ["checkoutId"]
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "ucp_cancel_checkout",
|
|
267
|
+
description: "Cancel a UCP checkout session.",
|
|
268
|
+
inputSchema: {
|
|
269
|
+
type: "object",
|
|
270
|
+
properties: {
|
|
271
|
+
checkoutId: {
|
|
272
|
+
type: "string",
|
|
273
|
+
description: "UUID of the checkout session to cancel"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
required: ["checkoutId"]
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: "ucp_add_payment_instrument",
|
|
281
|
+
description: "Add a payment instrument (method) to a UCP checkout session.",
|
|
282
|
+
inputSchema: {
|
|
283
|
+
type: "object",
|
|
284
|
+
properties: {
|
|
285
|
+
checkoutId: {
|
|
286
|
+
type: "string",
|
|
287
|
+
description: "UUID of the checkout session"
|
|
288
|
+
},
|
|
289
|
+
id: {
|
|
290
|
+
type: "string",
|
|
291
|
+
description: 'Unique instrument identifier (e.g., "pi_sly_usdc_1")'
|
|
292
|
+
},
|
|
293
|
+
handler: {
|
|
294
|
+
type: "string",
|
|
295
|
+
description: 'Payment handler identifier (e.g., "stripe", "sly")'
|
|
296
|
+
},
|
|
297
|
+
type: {
|
|
298
|
+
type: "string",
|
|
299
|
+
description: 'Instrument type (e.g., "card", "wallet", "usdc")'
|
|
300
|
+
},
|
|
301
|
+
last4: {
|
|
302
|
+
type: "string",
|
|
303
|
+
description: "Last 4 digits for display (optional)"
|
|
304
|
+
},
|
|
305
|
+
brand: {
|
|
306
|
+
type: "string",
|
|
307
|
+
description: "Card brand or wallet name (optional)"
|
|
308
|
+
},
|
|
309
|
+
metadata: {
|
|
310
|
+
type: "object",
|
|
311
|
+
description: "Additional instrument data (optional)"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
required: ["checkoutId", "id", "handler", "type"]
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
name: "ucp_batch_checkout",
|
|
319
|
+
description: "Create and complete multiple UCP checkouts in one call. Each checkout spec should include all required fields (line_items, buyer, shipping_address or checkout_type=digital/service, and payment_instruments). Checkouts that reach ready_for_complete are auto-completed. Returns an array of results.",
|
|
320
|
+
inputSchema: {
|
|
321
|
+
type: "object",
|
|
322
|
+
properties: {
|
|
323
|
+
checkouts: {
|
|
324
|
+
type: "array",
|
|
325
|
+
description: "Array of checkout specifications to create and complete",
|
|
326
|
+
items: {
|
|
327
|
+
type: "object",
|
|
328
|
+
properties: {
|
|
329
|
+
currency: { type: "string", description: 'ISO 4217 currency (e.g., "USD")' },
|
|
330
|
+
line_items: {
|
|
331
|
+
type: "array",
|
|
332
|
+
items: {
|
|
333
|
+
type: "object",
|
|
334
|
+
properties: {
|
|
335
|
+
id: { type: "string" },
|
|
336
|
+
name: { type: "string" },
|
|
337
|
+
quantity: { type: "integer" },
|
|
338
|
+
unit_price: { type: "integer" },
|
|
339
|
+
total_price: { type: "integer" },
|
|
340
|
+
description: { type: "string" }
|
|
341
|
+
},
|
|
342
|
+
required: ["id", "name", "quantity", "unit_price", "total_price"]
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
buyer: {
|
|
346
|
+
type: "object",
|
|
347
|
+
properties: {
|
|
348
|
+
email: { type: "string" },
|
|
349
|
+
name: { type: "string" }
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
shipping_address: {
|
|
353
|
+
type: "object",
|
|
354
|
+
properties: {
|
|
355
|
+
line1: { type: "string" },
|
|
356
|
+
city: { type: "string" },
|
|
357
|
+
postal_code: { type: "string" },
|
|
358
|
+
country: { type: "string" },
|
|
359
|
+
state: { type: "string" }
|
|
360
|
+
},
|
|
361
|
+
required: ["line1", "city", "postal_code", "country"]
|
|
362
|
+
},
|
|
363
|
+
payment_instruments: {
|
|
364
|
+
type: "array",
|
|
365
|
+
items: {
|
|
366
|
+
type: "object",
|
|
367
|
+
properties: {
|
|
368
|
+
id: { type: "string" },
|
|
369
|
+
handler: { type: "string" },
|
|
370
|
+
type: { type: "string" }
|
|
371
|
+
},
|
|
372
|
+
required: ["id", "handler", "type"]
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
checkout_type: {
|
|
376
|
+
type: "string",
|
|
377
|
+
enum: ["physical", "digital", "service"]
|
|
378
|
+
},
|
|
379
|
+
metadata: { type: "object" },
|
|
380
|
+
agent_id: { type: "string", description: "Agent ID to attribute this checkout to" }
|
|
381
|
+
},
|
|
382
|
+
required: ["currency", "line_items"]
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
},
|
|
386
|
+
required: ["checkouts"]
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
name: "ucp_batch_complete",
|
|
391
|
+
description: "Batch-complete multiple pending UCP checkouts. Adds a payment instrument to each checkout and completes it in one call. Use after ucp_batch_checkout when checkouts were created without payment instruments.",
|
|
392
|
+
inputSchema: {
|
|
393
|
+
type: "object",
|
|
394
|
+
properties: {
|
|
395
|
+
checkout_ids: {
|
|
396
|
+
type: "array",
|
|
397
|
+
description: "Array of checkout UUIDs to complete",
|
|
398
|
+
items: { type: "string" }
|
|
399
|
+
},
|
|
400
|
+
default_payment_instrument: {
|
|
401
|
+
type: "object",
|
|
402
|
+
description: "Payment instrument applied to all checkouts",
|
|
403
|
+
properties: {
|
|
404
|
+
id: { type: "string" },
|
|
405
|
+
handler: { type: "string" },
|
|
406
|
+
type: { type: "string" }
|
|
407
|
+
},
|
|
408
|
+
required: ["id", "handler", "type"]
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
required: ["checkout_ids", "default_payment_instrument"]
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
// UCP Order Management
|
|
415
|
+
{
|
|
416
|
+
name: "ucp_list_orders",
|
|
417
|
+
description: "List UCP orders with optional filtering by status or agent.",
|
|
418
|
+
inputSchema: {
|
|
419
|
+
type: "object",
|
|
420
|
+
properties: {
|
|
421
|
+
status: {
|
|
422
|
+
type: "string",
|
|
423
|
+
enum: ["confirmed", "processing", "shipped", "delivered", "cancelled", "refunded"],
|
|
424
|
+
description: "Filter by order status (optional)"
|
|
425
|
+
},
|
|
426
|
+
agent_id: {
|
|
427
|
+
type: "string",
|
|
428
|
+
description: "Filter by agent ID (optional)"
|
|
429
|
+
},
|
|
430
|
+
page: { type: "number", description: "Page number (optional)" },
|
|
431
|
+
limit: { type: "number", description: "Results per page (optional)" }
|
|
432
|
+
},
|
|
433
|
+
required: []
|
|
434
|
+
}
|
|
435
|
+
},
|
|
436
|
+
{
|
|
437
|
+
name: "ucp_get_order",
|
|
438
|
+
description: "Get UCP order details including line items, payment info, fulfillment events, and adjustments.",
|
|
439
|
+
inputSchema: {
|
|
440
|
+
type: "object",
|
|
441
|
+
properties: {
|
|
442
|
+
orderId: {
|
|
443
|
+
type: "string",
|
|
444
|
+
description: "UUID of the order"
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
required: ["orderId"]
|
|
448
|
+
}
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
name: "ucp_update_order_status",
|
|
452
|
+
description: "Update UCP order status. Valid transitions: confirmed \u2192 processing \u2192 shipped \u2192 delivered.",
|
|
453
|
+
inputSchema: {
|
|
454
|
+
type: "object",
|
|
455
|
+
properties: {
|
|
456
|
+
orderId: {
|
|
457
|
+
type: "string",
|
|
458
|
+
description: "UUID of the order"
|
|
459
|
+
},
|
|
460
|
+
status: {
|
|
461
|
+
type: "string",
|
|
462
|
+
enum: ["processing", "shipped", "delivered"],
|
|
463
|
+
description: "New order status"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
required: ["orderId", "status"]
|
|
467
|
+
}
|
|
468
|
+
},
|
|
469
|
+
{
|
|
470
|
+
name: "ucp_cancel_order",
|
|
471
|
+
description: "Cancel a UCP order. Optionally provide a reason.",
|
|
472
|
+
inputSchema: {
|
|
473
|
+
type: "object",
|
|
474
|
+
properties: {
|
|
475
|
+
orderId: {
|
|
476
|
+
type: "string",
|
|
477
|
+
description: "UUID of the order to cancel"
|
|
478
|
+
},
|
|
479
|
+
reason: {
|
|
480
|
+
type: "string",
|
|
481
|
+
description: "Cancellation reason (optional)"
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
required: ["orderId"]
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
name: "ucp_add_fulfillment_event",
|
|
489
|
+
description: "Record a fulfillment event on a UCP order (e.g., shipped, in_transit, delivered).",
|
|
490
|
+
inputSchema: {
|
|
491
|
+
type: "object",
|
|
492
|
+
properties: {
|
|
493
|
+
orderId: {
|
|
494
|
+
type: "string",
|
|
495
|
+
description: "UUID of the order"
|
|
496
|
+
},
|
|
497
|
+
type: {
|
|
498
|
+
type: "string",
|
|
499
|
+
enum: ["shipped", "in_transit", "out_for_delivery", "delivered", "returned"],
|
|
500
|
+
description: "Event type"
|
|
501
|
+
},
|
|
502
|
+
description: {
|
|
503
|
+
type: "string",
|
|
504
|
+
description: "Event description"
|
|
505
|
+
},
|
|
506
|
+
tracking_number: {
|
|
507
|
+
type: "string",
|
|
508
|
+
description: "Tracking number (optional)"
|
|
509
|
+
},
|
|
510
|
+
carrier: {
|
|
511
|
+
type: "string",
|
|
512
|
+
description: "Shipping carrier (optional)"
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
required: ["orderId", "type", "description"]
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
// ==========================================================================
|
|
519
|
+
// Merchant Catalog Tools
|
|
520
|
+
// ==========================================================================
|
|
521
|
+
{
|
|
522
|
+
name: "list_merchants",
|
|
523
|
+
description: "List merchants with product catalogs available in the tenant. Filter by type, country, or search by name.",
|
|
524
|
+
inputSchema: {
|
|
525
|
+
type: "object",
|
|
526
|
+
properties: {
|
|
527
|
+
type: {
|
|
528
|
+
type: "string",
|
|
529
|
+
description: 'Merchant type filter (e.g., "restaurant", "bar", "hotel", "retail")'
|
|
530
|
+
},
|
|
531
|
+
country: {
|
|
532
|
+
type: "string",
|
|
533
|
+
description: 'Country code filter (e.g., "PA", "CR")'
|
|
534
|
+
},
|
|
535
|
+
search: {
|
|
536
|
+
type: "string",
|
|
537
|
+
description: "Search merchants by name"
|
|
538
|
+
},
|
|
539
|
+
limit: {
|
|
540
|
+
type: "number",
|
|
541
|
+
description: "Max results (default 50, max 100)"
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
required: []
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
name: "get_merchant",
|
|
549
|
+
description: "Get a merchant's full product catalog by ID. Returns all products with prices, categories, and descriptions.",
|
|
550
|
+
inputSchema: {
|
|
551
|
+
type: "object",
|
|
552
|
+
properties: {
|
|
553
|
+
merchantId: {
|
|
554
|
+
type: "string",
|
|
555
|
+
description: 'Merchant UUID or merchant_id (e.g., "invu_merch_003")'
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
required: ["merchantId"]
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
// ==========================================================================
|
|
562
|
+
// Agent Management Tools
|
|
563
|
+
// ==========================================================================
|
|
564
|
+
{
|
|
565
|
+
name: "list_accounts",
|
|
566
|
+
description: "List entity records (persons and businesses) in the tenant's payment ledger. Use this to find a business entity for agent creation.",
|
|
567
|
+
inputSchema: {
|
|
568
|
+
type: "object",
|
|
569
|
+
properties: {
|
|
570
|
+
type: {
|
|
571
|
+
type: "string",
|
|
572
|
+
enum: ["person", "business"],
|
|
573
|
+
description: "Filter by account type (optional)"
|
|
574
|
+
},
|
|
575
|
+
status: {
|
|
576
|
+
type: "string",
|
|
577
|
+
enum: ["active", "inactive", "suspended"],
|
|
578
|
+
description: "Filter by account status (optional)"
|
|
579
|
+
}
|
|
580
|
+
},
|
|
581
|
+
required: []
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
{
|
|
585
|
+
name: "create_account",
|
|
586
|
+
description: "Register a new person or business entity in the tenant's payment ledger. This adds a data record \u2014 it does not create a login or sign up for any external service.",
|
|
587
|
+
inputSchema: {
|
|
588
|
+
type: "object",
|
|
589
|
+
properties: {
|
|
590
|
+
type: {
|
|
591
|
+
type: "string",
|
|
592
|
+
enum: ["person", "business"],
|
|
593
|
+
description: "Account type"
|
|
594
|
+
},
|
|
595
|
+
name: {
|
|
596
|
+
type: "string",
|
|
597
|
+
description: "Account holder name (1-255 chars)"
|
|
598
|
+
},
|
|
599
|
+
email: {
|
|
600
|
+
type: "string",
|
|
601
|
+
description: "Email address (optional)"
|
|
602
|
+
},
|
|
603
|
+
metadata: {
|
|
604
|
+
type: "object",
|
|
605
|
+
description: "Optional metadata"
|
|
606
|
+
}
|
|
607
|
+
},
|
|
608
|
+
required: ["type", "name"]
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
name: "update_account",
|
|
613
|
+
description: "Update an entity record in the tenant's payment ledger. Can change name, email, or metadata.",
|
|
614
|
+
inputSchema: {
|
|
615
|
+
type: "object",
|
|
616
|
+
properties: {
|
|
617
|
+
accountId: {
|
|
618
|
+
type: "string",
|
|
619
|
+
description: "UUID of the account to update"
|
|
620
|
+
},
|
|
621
|
+
name: {
|
|
622
|
+
type: "string",
|
|
623
|
+
description: "New name (optional)"
|
|
624
|
+
},
|
|
625
|
+
email: {
|
|
626
|
+
type: "string",
|
|
627
|
+
description: "New email (optional)"
|
|
628
|
+
},
|
|
629
|
+
metadata: {
|
|
630
|
+
type: "object",
|
|
631
|
+
description: "Metadata object (replaces existing)"
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
required: ["accountId"]
|
|
635
|
+
}
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
name: "get_tenant_info",
|
|
639
|
+
description: "Get information about the current tenant/organization this API key belongs to.",
|
|
640
|
+
inputSchema: {
|
|
641
|
+
type: "object",
|
|
642
|
+
properties: {},
|
|
643
|
+
required: []
|
|
644
|
+
}
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
name: "create_agent",
|
|
648
|
+
description: "Register a new AI agent under a business account. The agent can then be verified and given spending mandates.",
|
|
649
|
+
inputSchema: {
|
|
650
|
+
type: "object",
|
|
651
|
+
properties: {
|
|
652
|
+
accountId: {
|
|
653
|
+
type: "string",
|
|
654
|
+
description: "UUID of the parent business account"
|
|
655
|
+
},
|
|
656
|
+
name: {
|
|
657
|
+
type: "string",
|
|
658
|
+
description: 'Name for the agent (e.g., "Shopping Agent")'
|
|
659
|
+
},
|
|
660
|
+
description: {
|
|
661
|
+
type: "string",
|
|
662
|
+
description: "Description of what the agent does (optional)"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
required: ["accountId", "name"]
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
name: "verify_agent",
|
|
670
|
+
description: "Verify an agent at a KYA (Know Your Agent) tier. Higher tiers unlock higher spending limits. Tier 1 is sufficient for most use cases.",
|
|
671
|
+
inputSchema: {
|
|
672
|
+
type: "object",
|
|
673
|
+
properties: {
|
|
674
|
+
agentId: {
|
|
675
|
+
type: "string",
|
|
676
|
+
description: "UUID of the agent to verify"
|
|
677
|
+
},
|
|
678
|
+
tier: {
|
|
679
|
+
type: "number",
|
|
680
|
+
enum: [1, 2, 3],
|
|
681
|
+
description: "KYA verification tier (1=Standard, 2=Advanced, 3=Enterprise)"
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
required: ["agentId", "tier"]
|
|
685
|
+
}
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: "get_agent",
|
|
689
|
+
description: "Get details of a specific agent including its KYA tier, status, and permissions.",
|
|
690
|
+
inputSchema: {
|
|
691
|
+
type: "object",
|
|
692
|
+
properties: {
|
|
693
|
+
agentId: {
|
|
694
|
+
type: "string",
|
|
695
|
+
description: "UUID of the agent"
|
|
696
|
+
}
|
|
697
|
+
},
|
|
698
|
+
required: ["agentId"]
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
name: "get_agent_limits",
|
|
703
|
+
description: "Get the spending limits and current usage for an agent. Shows per-transaction and daily limits based on KYA tier.",
|
|
704
|
+
inputSchema: {
|
|
705
|
+
type: "object",
|
|
706
|
+
properties: {
|
|
707
|
+
agentId: {
|
|
708
|
+
type: "string",
|
|
709
|
+
description: "UUID of the agent"
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
required: ["agentId"]
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
name: "get_agent_transactions",
|
|
717
|
+
description: "Get transaction history for an agent. Returns all UCP and ACP checkouts attributed to the agent, with pagination and optional date filters.",
|
|
718
|
+
inputSchema: {
|
|
719
|
+
type: "object",
|
|
720
|
+
properties: {
|
|
721
|
+
agentId: {
|
|
722
|
+
type: "string",
|
|
723
|
+
description: "UUID of the agent"
|
|
724
|
+
},
|
|
725
|
+
limit: {
|
|
726
|
+
type: "number",
|
|
727
|
+
description: "Max results per page (default 20)"
|
|
728
|
+
},
|
|
729
|
+
offset: {
|
|
730
|
+
type: "number",
|
|
731
|
+
description: "Offset for pagination (default 0)"
|
|
732
|
+
},
|
|
733
|
+
from: {
|
|
734
|
+
type: "string",
|
|
735
|
+
description: "Filter from date (ISO 8601, optional)"
|
|
736
|
+
},
|
|
737
|
+
to: {
|
|
738
|
+
type: "string",
|
|
739
|
+
description: "Filter to date (ISO 8601, optional)"
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
required: ["agentId"]
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: "delete_agent",
|
|
747
|
+
description: "Delete an agent. Removes the agent record. Cannot be undone.",
|
|
748
|
+
inputSchema: {
|
|
749
|
+
type: "object",
|
|
750
|
+
properties: {
|
|
751
|
+
agentId: {
|
|
752
|
+
type: "string",
|
|
753
|
+
description: "UUID of the agent to delete"
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
required: ["agentId"]
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
// ==========================================================================
|
|
760
|
+
// AP2 (Agent-to-Agent Protocol) Mandate Tools
|
|
761
|
+
// ==========================================================================
|
|
762
|
+
{
|
|
763
|
+
name: "ap2_cancel_mandate",
|
|
764
|
+
description: "Cancel an active mandate. Sets status to cancelled so no further executions can be made.",
|
|
765
|
+
inputSchema: {
|
|
766
|
+
type: "object",
|
|
767
|
+
properties: {
|
|
768
|
+
mandateId: {
|
|
769
|
+
type: "string",
|
|
770
|
+
description: "UUID or external mandate_id of the mandate to cancel"
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
required: ["mandateId"]
|
|
774
|
+
}
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
name: "ap2_create_mandate",
|
|
778
|
+
description: "Create a spending mandate that authorizes an agent to spend up to a budget. The mandate tracks spending and enforces limits.",
|
|
779
|
+
inputSchema: {
|
|
780
|
+
type: "object",
|
|
781
|
+
properties: {
|
|
782
|
+
mandate_id: {
|
|
783
|
+
type: "string",
|
|
784
|
+
description: 'Unique identifier for the mandate (e.g., "mandate_shopping_001")'
|
|
785
|
+
},
|
|
786
|
+
agent_id: {
|
|
787
|
+
type: "string",
|
|
788
|
+
description: "UUID of the agent this mandate is for"
|
|
789
|
+
},
|
|
790
|
+
account_id: {
|
|
791
|
+
type: "string",
|
|
792
|
+
description: "UUID of the account funding the mandate"
|
|
793
|
+
},
|
|
794
|
+
authorized_amount: {
|
|
795
|
+
type: "number",
|
|
796
|
+
description: "Maximum amount the agent can spend under this mandate"
|
|
797
|
+
},
|
|
798
|
+
currency: {
|
|
799
|
+
type: "string",
|
|
800
|
+
description: "Currency for the mandate (default: USD)"
|
|
801
|
+
},
|
|
802
|
+
mandate_type: {
|
|
803
|
+
type: "string",
|
|
804
|
+
enum: ["intent", "cart", "payment"],
|
|
805
|
+
description: "Type of mandate (default: payment)"
|
|
806
|
+
},
|
|
807
|
+
description: {
|
|
808
|
+
type: "string",
|
|
809
|
+
description: "Human-readable description of what this mandate is for (optional)"
|
|
810
|
+
},
|
|
811
|
+
expires_at: {
|
|
812
|
+
type: "string",
|
|
813
|
+
description: "ISO 8601 expiration timestamp (optional)"
|
|
814
|
+
},
|
|
815
|
+
metadata: {
|
|
816
|
+
type: "object",
|
|
817
|
+
description: 'Optional metadata. Use "priority" key (number 1-3) to set mandate priority: 1=High, 2=Medium, 3=Low. Example: {"priority": 1}'
|
|
818
|
+
},
|
|
819
|
+
mandate_data: {
|
|
820
|
+
type: "object",
|
|
821
|
+
description: "Optional mandate data (e.g., destination info, constraints)"
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
required: ["mandate_id", "agent_id", "account_id", "authorized_amount"]
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
name: "ap2_get_mandate",
|
|
829
|
+
description: "Get mandate details including execution history, remaining budget, and status.",
|
|
830
|
+
inputSchema: {
|
|
831
|
+
type: "object",
|
|
832
|
+
properties: {
|
|
833
|
+
mandateId: {
|
|
834
|
+
type: "string",
|
|
835
|
+
description: "The mandate ID"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
required: ["mandateId"]
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
name: "ap2_execute_mandate",
|
|
843
|
+
description: "Execute a payment against a mandate. Deducts from the mandate budget and creates a transfer.",
|
|
844
|
+
inputSchema: {
|
|
845
|
+
type: "object",
|
|
846
|
+
properties: {
|
|
847
|
+
mandateId: {
|
|
848
|
+
type: "string",
|
|
849
|
+
description: "The mandate ID to execute against"
|
|
850
|
+
},
|
|
851
|
+
amount: {
|
|
852
|
+
type: "number",
|
|
853
|
+
description: "Amount to pay"
|
|
854
|
+
},
|
|
855
|
+
currency: {
|
|
856
|
+
type: "string",
|
|
857
|
+
description: "Currency (should match mandate currency)"
|
|
858
|
+
},
|
|
859
|
+
description: {
|
|
860
|
+
type: "string",
|
|
861
|
+
description: "Description of this payment (optional)"
|
|
862
|
+
},
|
|
863
|
+
order_ids: {
|
|
864
|
+
type: "array",
|
|
865
|
+
items: { type: "string" },
|
|
866
|
+
description: "Array of UCP order IDs funded by this execution (optional)"
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
required: ["mandateId", "amount"]
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: "ap2_list_mandates",
|
|
874
|
+
description: "List mandates with optional filtering by status, agent, or account.",
|
|
875
|
+
inputSchema: {
|
|
876
|
+
type: "object",
|
|
877
|
+
properties: {
|
|
878
|
+
status: {
|
|
879
|
+
type: "string",
|
|
880
|
+
enum: ["active", "completed", "cancelled", "expired"],
|
|
881
|
+
description: "Filter by mandate status (optional)"
|
|
882
|
+
},
|
|
883
|
+
agent_id: {
|
|
884
|
+
type: "string",
|
|
885
|
+
description: "Filter by agent ID (optional)"
|
|
886
|
+
},
|
|
887
|
+
account_id: {
|
|
888
|
+
type: "string",
|
|
889
|
+
description: "Filter by account ID (optional)"
|
|
890
|
+
},
|
|
891
|
+
limit: {
|
|
892
|
+
type: "number",
|
|
893
|
+
description: "Max results to return (optional)"
|
|
894
|
+
}
|
|
895
|
+
},
|
|
896
|
+
required: []
|
|
897
|
+
}
|
|
898
|
+
},
|
|
899
|
+
{
|
|
900
|
+
name: "ap2_update_mandate",
|
|
901
|
+
description: "Update a mandate. Can change authorized_amount, expires_at, status, metadata, mandate_data, or description.",
|
|
902
|
+
inputSchema: {
|
|
903
|
+
type: "object",
|
|
904
|
+
properties: {
|
|
905
|
+
mandateId: {
|
|
906
|
+
type: "string",
|
|
907
|
+
description: "UUID or external mandate_id of the mandate to update"
|
|
908
|
+
},
|
|
909
|
+
authorized_amount: {
|
|
910
|
+
type: "number",
|
|
911
|
+
description: "New authorized amount (optional)"
|
|
912
|
+
},
|
|
913
|
+
status: {
|
|
914
|
+
type: "string",
|
|
915
|
+
description: "New status (optional)"
|
|
916
|
+
},
|
|
917
|
+
expires_at: {
|
|
918
|
+
type: "string",
|
|
919
|
+
description: "New expiration timestamp ISO 8601 (optional)"
|
|
920
|
+
},
|
|
921
|
+
metadata: {
|
|
922
|
+
type: "object",
|
|
923
|
+
description: 'Updated metadata object. Use "priority" key (number 1-3) to set priority: 1=High, 2=Medium, 3=Low (optional)'
|
|
924
|
+
},
|
|
925
|
+
mandate_data: {
|
|
926
|
+
type: "object",
|
|
927
|
+
description: "Updated mandate_data object (optional)"
|
|
928
|
+
},
|
|
929
|
+
description: {
|
|
930
|
+
type: "string",
|
|
931
|
+
description: "Updated description (optional)"
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
required: ["mandateId"]
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
// ==========================================================================
|
|
938
|
+
// ACP (Agentic Commerce Protocol) Checkout Tools
|
|
939
|
+
// ==========================================================================
|
|
940
|
+
{
|
|
941
|
+
name: "acp_create_checkout",
|
|
942
|
+
description: "Create a checkout session with items for an agent to purchase. This is the first step in the shopping flow.",
|
|
943
|
+
inputSchema: {
|
|
944
|
+
type: "object",
|
|
945
|
+
properties: {
|
|
946
|
+
checkout_id: {
|
|
947
|
+
type: "string",
|
|
948
|
+
description: 'Unique identifier for the checkout (e.g., "checkout_001")'
|
|
949
|
+
},
|
|
950
|
+
agent_id: {
|
|
951
|
+
type: "string",
|
|
952
|
+
description: "UUID of the agent making the purchase"
|
|
953
|
+
},
|
|
954
|
+
account_id: {
|
|
955
|
+
type: "string",
|
|
956
|
+
description: "UUID of the account funding the checkout (optional, defaults to agent's account)"
|
|
957
|
+
},
|
|
958
|
+
merchant_id: {
|
|
959
|
+
type: "string",
|
|
960
|
+
description: 'Identifier for the merchant (e.g., "merchant_nike")'
|
|
961
|
+
},
|
|
962
|
+
items: {
|
|
963
|
+
type: "array",
|
|
964
|
+
description: "Array of items to purchase",
|
|
965
|
+
items: {
|
|
966
|
+
type: "object",
|
|
967
|
+
properties: {
|
|
968
|
+
name: {
|
|
969
|
+
type: "string",
|
|
970
|
+
description: "Item name"
|
|
971
|
+
},
|
|
972
|
+
description: {
|
|
973
|
+
type: "string",
|
|
974
|
+
description: "Item description (optional)"
|
|
975
|
+
},
|
|
976
|
+
quantity: {
|
|
977
|
+
type: "number",
|
|
978
|
+
description: "Quantity to purchase"
|
|
979
|
+
},
|
|
980
|
+
unit_price: {
|
|
981
|
+
type: "number",
|
|
982
|
+
description: "Price per unit"
|
|
983
|
+
},
|
|
984
|
+
total_price: {
|
|
985
|
+
type: "number",
|
|
986
|
+
description: "Total price for this line item (quantity * unit_price)"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
required: ["name", "quantity", "unit_price", "total_price"]
|
|
990
|
+
}
|
|
991
|
+
},
|
|
992
|
+
tax_amount: {
|
|
993
|
+
type: "number",
|
|
994
|
+
description: "Tax amount (optional)"
|
|
995
|
+
},
|
|
996
|
+
shipping_amount: {
|
|
997
|
+
type: "number",
|
|
998
|
+
description: "Shipping amount (optional)"
|
|
999
|
+
},
|
|
1000
|
+
payment_method: {
|
|
1001
|
+
type: "string",
|
|
1002
|
+
description: "Payment method (optional)"
|
|
1003
|
+
},
|
|
1004
|
+
checkout_data: {
|
|
1005
|
+
type: "object",
|
|
1006
|
+
description: "Additional checkout data (optional)"
|
|
1007
|
+
}
|
|
1008
|
+
},
|
|
1009
|
+
required: ["checkout_id", "agent_id", "merchant_id", "items"]
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
name: "acp_get_checkout",
|
|
1014
|
+
description: "Get checkout details including items, totals, and current status.",
|
|
1015
|
+
inputSchema: {
|
|
1016
|
+
type: "object",
|
|
1017
|
+
properties: {
|
|
1018
|
+
checkoutId: {
|
|
1019
|
+
type: "string",
|
|
1020
|
+
description: "The checkout ID"
|
|
1021
|
+
}
|
|
1022
|
+
},
|
|
1023
|
+
required: ["checkoutId"]
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
name: "acp_complete_checkout",
|
|
1028
|
+
description: "Complete and pay for a checkout. Use the checkout UUID (not the string checkout_id). In sandbox, a test payment token is generated automatically.",
|
|
1029
|
+
inputSchema: {
|
|
1030
|
+
type: "object",
|
|
1031
|
+
properties: {
|
|
1032
|
+
checkoutId: {
|
|
1033
|
+
type: "string",
|
|
1034
|
+
description: "The checkout UUID (id field, not checkout_id)"
|
|
1035
|
+
},
|
|
1036
|
+
shared_payment_token: {
|
|
1037
|
+
type: "string",
|
|
1038
|
+
description: "Shared payment token. In sandbox, defaults to a test token (spt_test_...) if omitted."
|
|
1039
|
+
},
|
|
1040
|
+
payment_method: {
|
|
1041
|
+
type: "string",
|
|
1042
|
+
description: "Payment method (optional)"
|
|
1043
|
+
}
|
|
1044
|
+
},
|
|
1045
|
+
required: ["checkoutId"]
|
|
1046
|
+
}
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
name: "acp_list_checkouts",
|
|
1050
|
+
description: "List checkouts with optional filtering by status, agent, or merchant.",
|
|
1051
|
+
inputSchema: {
|
|
1052
|
+
type: "object",
|
|
1053
|
+
properties: {
|
|
1054
|
+
status: {
|
|
1055
|
+
type: "string",
|
|
1056
|
+
enum: ["pending", "completed", "cancelled", "expired"],
|
|
1057
|
+
description: "Filter by checkout status (optional)"
|
|
1058
|
+
},
|
|
1059
|
+
agent_id: {
|
|
1060
|
+
type: "string",
|
|
1061
|
+
description: "Filter by agent ID (optional)"
|
|
1062
|
+
},
|
|
1063
|
+
merchant_id: {
|
|
1064
|
+
type: "string",
|
|
1065
|
+
description: "Filter by merchant ID (optional)"
|
|
1066
|
+
},
|
|
1067
|
+
limit: {
|
|
1068
|
+
type: "number",
|
|
1069
|
+
description: "Max results to return (optional)"
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
required: []
|
|
1073
|
+
}
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
name: "acp_batch_checkout",
|
|
1077
|
+
description: "Batch-create multiple ACP checkout sessions in one call. Each checkout spec should include all required fields (checkout_id, agent_id, account_id, merchant_id, items). Returns an array of results.",
|
|
1078
|
+
inputSchema: {
|
|
1079
|
+
type: "object",
|
|
1080
|
+
properties: {
|
|
1081
|
+
checkouts: {
|
|
1082
|
+
type: "array",
|
|
1083
|
+
description: "Array of ACP checkout specifications to create",
|
|
1084
|
+
items: {
|
|
1085
|
+
type: "object",
|
|
1086
|
+
properties: {
|
|
1087
|
+
checkout_id: { type: "string", description: "Unique identifier for the checkout" },
|
|
1088
|
+
agent_id: { type: "string", description: "UUID of the agent making the purchase" },
|
|
1089
|
+
account_id: { type: "string", description: "UUID of the account funding the checkout" },
|
|
1090
|
+
merchant_id: { type: "string", description: "Identifier for the merchant" },
|
|
1091
|
+
merchant_name: { type: "string", description: "Merchant display name (optional)" },
|
|
1092
|
+
items: {
|
|
1093
|
+
type: "array",
|
|
1094
|
+
items: {
|
|
1095
|
+
type: "object",
|
|
1096
|
+
properties: {
|
|
1097
|
+
name: { type: "string" },
|
|
1098
|
+
description: { type: "string" },
|
|
1099
|
+
quantity: { type: "number" },
|
|
1100
|
+
unit_price: { type: "number" },
|
|
1101
|
+
total_price: { type: "number" }
|
|
1102
|
+
},
|
|
1103
|
+
required: ["name", "quantity", "unit_price", "total_price"]
|
|
1104
|
+
}
|
|
1105
|
+
},
|
|
1106
|
+
tax_amount: { type: "number", description: "Tax amount (optional)" },
|
|
1107
|
+
shipping_amount: { type: "number", description: "Shipping amount (optional)" },
|
|
1108
|
+
currency: { type: "string", description: "Currency (default: USDC)" },
|
|
1109
|
+
metadata: { type: "object", description: "Custom metadata (optional)" }
|
|
1110
|
+
},
|
|
1111
|
+
required: ["checkout_id", "agent_id", "account_id", "merchant_id", "items"]
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
},
|
|
1115
|
+
required: ["checkouts"]
|
|
1116
|
+
}
|
|
1117
|
+
},
|
|
1118
|
+
// ==========================================================================
|
|
1119
|
+
// Wallet Management Tools
|
|
1120
|
+
// ==========================================================================
|
|
1121
|
+
{
|
|
1122
|
+
name: "list_wallets",
|
|
1123
|
+
description: "List wallets for the current tenant. Can filter by account, agent, or status.",
|
|
1124
|
+
inputSchema: {
|
|
1125
|
+
type: "object",
|
|
1126
|
+
properties: {
|
|
1127
|
+
owner_account_id: {
|
|
1128
|
+
type: "string",
|
|
1129
|
+
description: "Filter by owner account UUID (optional)"
|
|
1130
|
+
},
|
|
1131
|
+
managed_by_agent_id: {
|
|
1132
|
+
type: "string",
|
|
1133
|
+
description: "Filter by managing agent UUID (optional)"
|
|
1134
|
+
},
|
|
1135
|
+
status: {
|
|
1136
|
+
type: "string",
|
|
1137
|
+
enum: ["active", "frozen", "depleted"],
|
|
1138
|
+
description: "Filter by wallet status (optional)"
|
|
1139
|
+
},
|
|
1140
|
+
page: {
|
|
1141
|
+
type: "number",
|
|
1142
|
+
description: "Page number (optional)"
|
|
1143
|
+
},
|
|
1144
|
+
limit: {
|
|
1145
|
+
type: "number",
|
|
1146
|
+
description: "Results per page (optional)"
|
|
1147
|
+
}
|
|
1148
|
+
},
|
|
1149
|
+
required: []
|
|
1150
|
+
}
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
name: "create_wallet",
|
|
1154
|
+
description: "Create a new wallet for an account. Supports internal (Sly-managed), Circle custodial, and Circle MPC wallet types.",
|
|
1155
|
+
inputSchema: {
|
|
1156
|
+
type: "object",
|
|
1157
|
+
properties: {
|
|
1158
|
+
accountId: {
|
|
1159
|
+
type: "string",
|
|
1160
|
+
description: "UUID of the account that owns this wallet"
|
|
1161
|
+
},
|
|
1162
|
+
name: {
|
|
1163
|
+
type: "string",
|
|
1164
|
+
description: "Human-readable wallet name (optional)"
|
|
1165
|
+
},
|
|
1166
|
+
currency: {
|
|
1167
|
+
type: "string",
|
|
1168
|
+
enum: ["USDC", "EURC"],
|
|
1169
|
+
description: "Wallet currency (default: USDC)"
|
|
1170
|
+
},
|
|
1171
|
+
walletType: {
|
|
1172
|
+
type: "string",
|
|
1173
|
+
enum: ["internal", "circle_custodial", "circle_mpc"],
|
|
1174
|
+
description: "Wallet type (default: internal)"
|
|
1175
|
+
},
|
|
1176
|
+
blockchain: {
|
|
1177
|
+
type: "string",
|
|
1178
|
+
enum: ["base", "eth", "polygon", "avax", "sol"],
|
|
1179
|
+
description: "Blockchain network (optional)"
|
|
1180
|
+
},
|
|
1181
|
+
initialBalance: {
|
|
1182
|
+
type: "number",
|
|
1183
|
+
description: "Initial balance to fund the wallet with (optional)"
|
|
1184
|
+
},
|
|
1185
|
+
managedByAgentId: {
|
|
1186
|
+
type: "string",
|
|
1187
|
+
description: "UUID of an agent that manages this wallet (optional)"
|
|
1188
|
+
},
|
|
1189
|
+
purpose: {
|
|
1190
|
+
type: "string",
|
|
1191
|
+
description: "Purpose of the wallet (optional)"
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
required: ["accountId"]
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
name: "get_wallet",
|
|
1199
|
+
description: "Get wallet details including balance and recent transactions.",
|
|
1200
|
+
inputSchema: {
|
|
1201
|
+
type: "object",
|
|
1202
|
+
properties: {
|
|
1203
|
+
walletId: {
|
|
1204
|
+
type: "string",
|
|
1205
|
+
description: "UUID of the wallet"
|
|
1206
|
+
}
|
|
1207
|
+
},
|
|
1208
|
+
required: ["walletId"]
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
name: "get_wallet_balance",
|
|
1213
|
+
description: "Get the current balance of a wallet with sync status information.",
|
|
1214
|
+
inputSchema: {
|
|
1215
|
+
type: "object",
|
|
1216
|
+
properties: {
|
|
1217
|
+
walletId: {
|
|
1218
|
+
type: "string",
|
|
1219
|
+
description: "UUID of the wallet"
|
|
1220
|
+
}
|
|
1221
|
+
},
|
|
1222
|
+
required: ["walletId"]
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
name: "wallet_deposit",
|
|
1227
|
+
description: "Deposit funds into a wallet from an account.",
|
|
1228
|
+
inputSchema: {
|
|
1229
|
+
type: "object",
|
|
1230
|
+
properties: {
|
|
1231
|
+
walletId: {
|
|
1232
|
+
type: "string",
|
|
1233
|
+
description: "UUID of the wallet to deposit into"
|
|
1234
|
+
},
|
|
1235
|
+
amount: {
|
|
1236
|
+
type: "number",
|
|
1237
|
+
description: "Amount to deposit"
|
|
1238
|
+
},
|
|
1239
|
+
fromAccountId: {
|
|
1240
|
+
type: "string",
|
|
1241
|
+
description: "UUID of the source account"
|
|
1242
|
+
},
|
|
1243
|
+
reference: {
|
|
1244
|
+
type: "string",
|
|
1245
|
+
description: "Reference note for the deposit (optional)"
|
|
1246
|
+
}
|
|
1247
|
+
},
|
|
1248
|
+
required: ["walletId", "amount", "fromAccountId"]
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
name: "wallet_withdraw",
|
|
1253
|
+
description: "Withdraw funds from a wallet to an account.",
|
|
1254
|
+
inputSchema: {
|
|
1255
|
+
type: "object",
|
|
1256
|
+
properties: {
|
|
1257
|
+
walletId: {
|
|
1258
|
+
type: "string",
|
|
1259
|
+
description: "UUID of the wallet to withdraw from"
|
|
1260
|
+
},
|
|
1261
|
+
amount: {
|
|
1262
|
+
type: "number",
|
|
1263
|
+
description: "Amount to withdraw"
|
|
1264
|
+
},
|
|
1265
|
+
destinationAccountId: {
|
|
1266
|
+
type: "string",
|
|
1267
|
+
description: "UUID of the destination account"
|
|
1268
|
+
},
|
|
1269
|
+
reference: {
|
|
1270
|
+
type: "string",
|
|
1271
|
+
description: "Reference note for the withdrawal (optional)"
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
required: ["walletId", "amount", "destinationAccountId"]
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
{
|
|
1278
|
+
name: "wallet_test_fund",
|
|
1279
|
+
description: "Add test funds to a wallet (sandbox/test mode only). Max 100,000 USDC per request.",
|
|
1280
|
+
inputSchema: {
|
|
1281
|
+
type: "object",
|
|
1282
|
+
properties: {
|
|
1283
|
+
walletId: {
|
|
1284
|
+
type: "string",
|
|
1285
|
+
description: "UUID of the wallet to fund"
|
|
1286
|
+
},
|
|
1287
|
+
amount: {
|
|
1288
|
+
type: "number",
|
|
1289
|
+
description: "Amount of test funds to add (max 100,000)"
|
|
1290
|
+
},
|
|
1291
|
+
currency: {
|
|
1292
|
+
type: "string",
|
|
1293
|
+
enum: ["USDC", "EURC"],
|
|
1294
|
+
description: "Currency (default: USDC)"
|
|
1295
|
+
},
|
|
1296
|
+
reference: {
|
|
1297
|
+
type: "string",
|
|
1298
|
+
description: "Reference note (optional)"
|
|
1299
|
+
}
|
|
1300
|
+
},
|
|
1301
|
+
required: ["walletId", "amount"]
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
// ==========================================================================
|
|
1305
|
+
// Agent Wallet Policy Tools (Epic 18)
|
|
1306
|
+
// ==========================================================================
|
|
1307
|
+
{
|
|
1308
|
+
name: "agent_wallet_evaluate_policy",
|
|
1309
|
+
description: "Evaluate contract policy for an agent payment (dry-run). Returns approve/escalate/deny decision with detailed check results and optional counter-offer.",
|
|
1310
|
+
inputSchema: {
|
|
1311
|
+
type: "object",
|
|
1312
|
+
properties: {
|
|
1313
|
+
agentId: {
|
|
1314
|
+
type: "string",
|
|
1315
|
+
description: "UUID of the agent whose wallet policy to evaluate"
|
|
1316
|
+
},
|
|
1317
|
+
amount: {
|
|
1318
|
+
type: "number",
|
|
1319
|
+
description: "Payment amount to evaluate"
|
|
1320
|
+
},
|
|
1321
|
+
currency: {
|
|
1322
|
+
type: "string",
|
|
1323
|
+
description: "Currency (default: USDC)"
|
|
1324
|
+
},
|
|
1325
|
+
action_type: {
|
|
1326
|
+
type: "string",
|
|
1327
|
+
enum: ["payment", "escrow_create", "escrow_release", "contract_sign", "negotiation_check", "counterparty_check"],
|
|
1328
|
+
description: "Type of action to evaluate (default: negotiation_check)"
|
|
1329
|
+
},
|
|
1330
|
+
contract_type: {
|
|
1331
|
+
type: "string",
|
|
1332
|
+
description: "Contract type (e.g. payment, escrow, subscription, loan)"
|
|
1333
|
+
},
|
|
1334
|
+
counterparty_agent_id: {
|
|
1335
|
+
type: "string",
|
|
1336
|
+
description: "UUID of the counterparty agent (optional)"
|
|
1337
|
+
},
|
|
1338
|
+
counterparty_address: {
|
|
1339
|
+
type: "string",
|
|
1340
|
+
description: "Wallet address of external counterparty (optional)"
|
|
1341
|
+
}
|
|
1342
|
+
},
|
|
1343
|
+
required: ["agentId", "amount"]
|
|
1344
|
+
}
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
name: "agent_wallet_get_exposures",
|
|
1348
|
+
description: "List per-counterparty exposure windows (24h/7d/30d) for an agent wallet. Shows active contracts, escrows, and total volume per counterparty.",
|
|
1349
|
+
inputSchema: {
|
|
1350
|
+
type: "object",
|
|
1351
|
+
properties: {
|
|
1352
|
+
agentId: {
|
|
1353
|
+
type: "string",
|
|
1354
|
+
description: "UUID of the agent"
|
|
1355
|
+
}
|
|
1356
|
+
},
|
|
1357
|
+
required: ["agentId"]
|
|
1358
|
+
}
|
|
1359
|
+
},
|
|
1360
|
+
{
|
|
1361
|
+
name: "agent_wallet_get_evaluations",
|
|
1362
|
+
description: "Get the policy evaluation audit log for an agent wallet. Shows historical approve/escalate/deny decisions with check details.",
|
|
1363
|
+
inputSchema: {
|
|
1364
|
+
type: "object",
|
|
1365
|
+
properties: {
|
|
1366
|
+
agentId: {
|
|
1367
|
+
type: "string",
|
|
1368
|
+
description: "UUID of the agent"
|
|
1369
|
+
},
|
|
1370
|
+
page: {
|
|
1371
|
+
type: "number",
|
|
1372
|
+
description: "Page number (optional)"
|
|
1373
|
+
},
|
|
1374
|
+
limit: {
|
|
1375
|
+
type: "number",
|
|
1376
|
+
description: "Results per page (optional)"
|
|
1377
|
+
}
|
|
1378
|
+
},
|
|
1379
|
+
required: ["agentId"]
|
|
1380
|
+
}
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
name: "agent_wallet_get",
|
|
1384
|
+
description: "Get an agent's wallet details including balance, status, and spending policy.",
|
|
1385
|
+
inputSchema: {
|
|
1386
|
+
type: "object",
|
|
1387
|
+
properties: {
|
|
1388
|
+
agentId: {
|
|
1389
|
+
type: "string",
|
|
1390
|
+
description: "UUID of the agent"
|
|
1391
|
+
}
|
|
1392
|
+
},
|
|
1393
|
+
required: ["agentId"]
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
name: "agent_wallet_freeze",
|
|
1398
|
+
description: "Freeze an agent's wallet, disabling all payments. Use to emergency-stop an agent.",
|
|
1399
|
+
inputSchema: {
|
|
1400
|
+
type: "object",
|
|
1401
|
+
properties: {
|
|
1402
|
+
agentId: {
|
|
1403
|
+
type: "string",
|
|
1404
|
+
description: "UUID of the agent whose wallet to freeze"
|
|
1405
|
+
}
|
|
1406
|
+
},
|
|
1407
|
+
required: ["agentId"]
|
|
1408
|
+
}
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
name: "agent_wallet_unfreeze",
|
|
1412
|
+
description: "Unfreeze an agent's wallet, re-enabling payments.",
|
|
1413
|
+
inputSchema: {
|
|
1414
|
+
type: "object",
|
|
1415
|
+
properties: {
|
|
1416
|
+
agentId: {
|
|
1417
|
+
type: "string",
|
|
1418
|
+
description: "UUID of the agent whose wallet to unfreeze"
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
required: ["agentId"]
|
|
1422
|
+
}
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
name: "agent_wallet_set_policy",
|
|
1426
|
+
description: "Set or update the spending and contract policy on an agent's wallet. Supports daily/monthly limits, approval thresholds, counterparty blocklists, exposure caps, and contract type restrictions.",
|
|
1427
|
+
inputSchema: {
|
|
1428
|
+
type: "object",
|
|
1429
|
+
properties: {
|
|
1430
|
+
agentId: {
|
|
1431
|
+
type: "string",
|
|
1432
|
+
description: "UUID of the agent"
|
|
1433
|
+
},
|
|
1434
|
+
dailySpendLimit: {
|
|
1435
|
+
type: "number",
|
|
1436
|
+
description: "Daily spending limit in wallet currency (optional)"
|
|
1437
|
+
},
|
|
1438
|
+
monthlySpendLimit: {
|
|
1439
|
+
type: "number",
|
|
1440
|
+
description: "Monthly spending limit (optional)"
|
|
1441
|
+
},
|
|
1442
|
+
requiresApprovalAbove: {
|
|
1443
|
+
type: "number",
|
|
1444
|
+
description: "Amount above which human approval is required (optional)"
|
|
1445
|
+
},
|
|
1446
|
+
approvedVendors: {
|
|
1447
|
+
type: "array",
|
|
1448
|
+
items: { type: "string" },
|
|
1449
|
+
description: "List of approved vendor domains (optional)"
|
|
1450
|
+
},
|
|
1451
|
+
contractPolicy: {
|
|
1452
|
+
type: "object",
|
|
1453
|
+
description: "Contract policy rules (optional)",
|
|
1454
|
+
properties: {
|
|
1455
|
+
counterpartyBlocklist: {
|
|
1456
|
+
type: "array",
|
|
1457
|
+
items: { type: "string" },
|
|
1458
|
+
description: "Blocked agent IDs or addresses"
|
|
1459
|
+
},
|
|
1460
|
+
counterpartyAllowlist: {
|
|
1461
|
+
type: "array",
|
|
1462
|
+
items: { type: "string" },
|
|
1463
|
+
description: "Allowed agent IDs or addresses (if set, only these are permitted)"
|
|
1464
|
+
},
|
|
1465
|
+
minCounterpartyKyaTier: {
|
|
1466
|
+
type: "number",
|
|
1467
|
+
description: "Minimum counterparty KYA tier (0-3)"
|
|
1468
|
+
},
|
|
1469
|
+
allowedContractTypes: {
|
|
1470
|
+
type: "array",
|
|
1471
|
+
items: { type: "string" },
|
|
1472
|
+
description: "Allowed contract types (e.g. payment, escrow)"
|
|
1473
|
+
},
|
|
1474
|
+
blockedContractTypes: {
|
|
1475
|
+
type: "array",
|
|
1476
|
+
items: { type: "string" },
|
|
1477
|
+
description: "Blocked contract types (e.g. loan)"
|
|
1478
|
+
},
|
|
1479
|
+
maxExposure24h: {
|
|
1480
|
+
type: "number",
|
|
1481
|
+
description: "Max 24h exposure per counterparty"
|
|
1482
|
+
},
|
|
1483
|
+
maxExposure7d: {
|
|
1484
|
+
type: "number",
|
|
1485
|
+
description: "Max 7d exposure per counterparty"
|
|
1486
|
+
},
|
|
1487
|
+
maxExposure30d: {
|
|
1488
|
+
type: "number",
|
|
1489
|
+
description: "Max 30d exposure per counterparty"
|
|
1490
|
+
},
|
|
1491
|
+
maxActiveContracts: {
|
|
1492
|
+
type: "number",
|
|
1493
|
+
description: "Max active contracts per counterparty"
|
|
1494
|
+
},
|
|
1495
|
+
maxActiveEscrows: {
|
|
1496
|
+
type: "number",
|
|
1497
|
+
description: "Max active escrows per counterparty"
|
|
1498
|
+
},
|
|
1499
|
+
escalateAbove: {
|
|
1500
|
+
type: "number",
|
|
1501
|
+
description: "Amount above which to escalate to human approval"
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
required: ["agentId"]
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
// ==========================================================================
|
|
1510
|
+
// x402 Micropayment Tools
|
|
1511
|
+
// ==========================================================================
|
|
1512
|
+
{
|
|
1513
|
+
name: "x402_create_endpoint",
|
|
1514
|
+
description: "Register an x402 payment endpoint. This defines a paid API route with pricing, volume discounts, and webhook notifications.",
|
|
1515
|
+
inputSchema: {
|
|
1516
|
+
type: "object",
|
|
1517
|
+
properties: {
|
|
1518
|
+
name: {
|
|
1519
|
+
type: "string",
|
|
1520
|
+
description: "Endpoint name (1-255 chars)"
|
|
1521
|
+
},
|
|
1522
|
+
path: {
|
|
1523
|
+
type: "string",
|
|
1524
|
+
description: "API path (must start with /, max 500 chars)"
|
|
1525
|
+
},
|
|
1526
|
+
method: {
|
|
1527
|
+
type: "string",
|
|
1528
|
+
enum: ["GET", "POST", "PUT", "DELETE", "PATCH", "ANY"],
|
|
1529
|
+
description: "HTTP method"
|
|
1530
|
+
},
|
|
1531
|
+
description: {
|
|
1532
|
+
type: "string",
|
|
1533
|
+
description: "What this endpoint provides (optional, max 1000 chars)"
|
|
1534
|
+
},
|
|
1535
|
+
accountId: {
|
|
1536
|
+
type: "string",
|
|
1537
|
+
description: "UUID of the account receiving payments"
|
|
1538
|
+
},
|
|
1539
|
+
basePrice: {
|
|
1540
|
+
type: "number",
|
|
1541
|
+
description: "Price per request in token units (e.g., 0.50 for $0.50 USDC). Min 0.0001, max 999999."
|
|
1542
|
+
},
|
|
1543
|
+
currency: {
|
|
1544
|
+
type: "string",
|
|
1545
|
+
enum: ["USDC", "EURC"],
|
|
1546
|
+
description: "Payment currency (default: USDC)"
|
|
1547
|
+
},
|
|
1548
|
+
volumeDiscounts: {
|
|
1549
|
+
type: "array",
|
|
1550
|
+
description: "Volume discount tiers (optional)",
|
|
1551
|
+
items: {
|
|
1552
|
+
type: "object",
|
|
1553
|
+
properties: {
|
|
1554
|
+
threshold: { type: "integer", description: "Minimum call count to qualify for discount" },
|
|
1555
|
+
priceMultiplier: { type: "number", description: "Price multiplier (0-1, e.g., 0.9 = 10% off)" }
|
|
1556
|
+
},
|
|
1557
|
+
required: ["threshold", "priceMultiplier"]
|
|
1558
|
+
}
|
|
1559
|
+
},
|
|
1560
|
+
webhookUrl: {
|
|
1561
|
+
type: "string",
|
|
1562
|
+
description: "URL to notify on payment (optional, must be valid URL)"
|
|
1563
|
+
},
|
|
1564
|
+
network: {
|
|
1565
|
+
type: "string",
|
|
1566
|
+
description: "Blockchain network (default: base-mainnet)"
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
required: ["name", "path", "method", "accountId", "basePrice"]
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
name: "x402_list_endpoints",
|
|
1574
|
+
description: "List x402 payment endpoints with optional filtering.",
|
|
1575
|
+
inputSchema: {
|
|
1576
|
+
type: "object",
|
|
1577
|
+
properties: {
|
|
1578
|
+
status: {
|
|
1579
|
+
type: "string",
|
|
1580
|
+
enum: ["active", "paused", "disabled"],
|
|
1581
|
+
description: "Filter by endpoint status (optional)"
|
|
1582
|
+
},
|
|
1583
|
+
account_id: {
|
|
1584
|
+
type: "string",
|
|
1585
|
+
description: "Filter by account UUID (optional)"
|
|
1586
|
+
},
|
|
1587
|
+
page: {
|
|
1588
|
+
type: "number",
|
|
1589
|
+
description: "Page number (optional)"
|
|
1590
|
+
},
|
|
1591
|
+
limit: {
|
|
1592
|
+
type: "number",
|
|
1593
|
+
description: "Results per page (optional)"
|
|
1594
|
+
}
|
|
1595
|
+
},
|
|
1596
|
+
required: []
|
|
1597
|
+
}
|
|
1598
|
+
},
|
|
1599
|
+
{
|
|
1600
|
+
name: "x402_get_endpoint",
|
|
1601
|
+
description: "Get x402 endpoint details including pricing, stats, and recent transactions.",
|
|
1602
|
+
inputSchema: {
|
|
1603
|
+
type: "object",
|
|
1604
|
+
properties: {
|
|
1605
|
+
endpointId: {
|
|
1606
|
+
type: "string",
|
|
1607
|
+
description: "UUID of the endpoint"
|
|
1608
|
+
}
|
|
1609
|
+
},
|
|
1610
|
+
required: ["endpointId"]
|
|
1611
|
+
}
|
|
1612
|
+
},
|
|
1613
|
+
{
|
|
1614
|
+
name: "x402_pay",
|
|
1615
|
+
description: "Make an x402 micropayment to a paid endpoint. Deducts from a wallet and returns a payment proof JWT.",
|
|
1616
|
+
inputSchema: {
|
|
1617
|
+
type: "object",
|
|
1618
|
+
properties: {
|
|
1619
|
+
endpointId: {
|
|
1620
|
+
type: "string",
|
|
1621
|
+
description: "UUID of the x402 endpoint to pay"
|
|
1622
|
+
},
|
|
1623
|
+
walletId: {
|
|
1624
|
+
type: "string",
|
|
1625
|
+
description: "UUID of the wallet to pay from"
|
|
1626
|
+
},
|
|
1627
|
+
amount: {
|
|
1628
|
+
type: "number",
|
|
1629
|
+
description: "Payment amount (must match endpoint basePrice)"
|
|
1630
|
+
},
|
|
1631
|
+
currency: {
|
|
1632
|
+
type: "string",
|
|
1633
|
+
enum: ["USDC", "EURC"],
|
|
1634
|
+
description: "Payment currency (must match endpoint currency)"
|
|
1635
|
+
},
|
|
1636
|
+
method: {
|
|
1637
|
+
type: "string",
|
|
1638
|
+
description: 'HTTP method of the request being paid for (e.g., "GET")'
|
|
1639
|
+
},
|
|
1640
|
+
path: {
|
|
1641
|
+
type: "string",
|
|
1642
|
+
description: 'Path of the request being paid for (e.g., "/api/data")'
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
required: ["endpointId", "walletId", "amount", "currency", "method", "path"]
|
|
1646
|
+
}
|
|
1647
|
+
},
|
|
1648
|
+
{
|
|
1649
|
+
name: "x402_verify",
|
|
1650
|
+
description: "Verify an x402 payment was completed. Supports fast JWT verification or database verification.",
|
|
1651
|
+
inputSchema: {
|
|
1652
|
+
type: "object",
|
|
1653
|
+
properties: {
|
|
1654
|
+
jwt: {
|
|
1655
|
+
type: "string",
|
|
1656
|
+
description: "JWT payment proof for fast verification (~1ms)"
|
|
1657
|
+
},
|
|
1658
|
+
requestId: {
|
|
1659
|
+
type: "string",
|
|
1660
|
+
description: "Request ID for database verification (use with transferId)"
|
|
1661
|
+
},
|
|
1662
|
+
transferId: {
|
|
1663
|
+
type: "string",
|
|
1664
|
+
description: "Transfer ID for database verification (use with requestId)"
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1667
|
+
required: []
|
|
1668
|
+
}
|
|
1669
|
+
},
|
|
1670
|
+
// ==========================================================================
|
|
1671
|
+
// A2A Tools (Google Agent-to-Agent Protocol)
|
|
1672
|
+
// ==========================================================================
|
|
1673
|
+
{
|
|
1674
|
+
name: "a2a_discover_agent",
|
|
1675
|
+
description: "Discover a remote A2A agent by URL. Fetches the agent's Agent Card from /.well-known/agent.json, a /card URL, or a per-agent discovery URL (/a2a/{id}/.well-known/agent.json). Returns the agent's capabilities, skills, and payment protocols.",
|
|
1676
|
+
inputSchema: {
|
|
1677
|
+
type: "object",
|
|
1678
|
+
properties: {
|
|
1679
|
+
url: {
|
|
1680
|
+
type: "string",
|
|
1681
|
+
description: "Base URL of the remote agent (e.g., https://example.com), direct card URL ending in /card, or per-agent .well-known URL"
|
|
1682
|
+
}
|
|
1683
|
+
},
|
|
1684
|
+
required: ["url"]
|
|
1685
|
+
}
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
name: "a2a_send_task",
|
|
1689
|
+
description: "Send a message to a local or remote A2A v1.0 agent (message/send). For local agents, provide agent_id. For remote agents, provide remote_url. The message should contain parts describing what the agent should do.",
|
|
1690
|
+
inputSchema: {
|
|
1691
|
+
type: "object",
|
|
1692
|
+
properties: {
|
|
1693
|
+
agent_id: {
|
|
1694
|
+
type: "string",
|
|
1695
|
+
description: "Local Sly agent ID (for sending to a local agent)"
|
|
1696
|
+
},
|
|
1697
|
+
remote_url: {
|
|
1698
|
+
type: "string",
|
|
1699
|
+
description: "Remote A2A JSON-RPC endpoint URL (for sending to an external agent)"
|
|
1700
|
+
},
|
|
1701
|
+
message: {
|
|
1702
|
+
type: "string",
|
|
1703
|
+
description: "Text message to send to the agent (will be wrapped as a text part)"
|
|
1704
|
+
},
|
|
1705
|
+
context_id: {
|
|
1706
|
+
type: "string",
|
|
1707
|
+
description: "Context ID for multi-turn conversations (optional)"
|
|
1708
|
+
}
|
|
1709
|
+
},
|
|
1710
|
+
required: ["message"]
|
|
1711
|
+
}
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
name: "a2a_get_task",
|
|
1715
|
+
description: "Get the status and details of an A2A task, including its messages, artifacts, and payment info.",
|
|
1716
|
+
inputSchema: {
|
|
1717
|
+
type: "object",
|
|
1718
|
+
properties: {
|
|
1719
|
+
task_id: {
|
|
1720
|
+
type: "string",
|
|
1721
|
+
description: "The A2A task ID"
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
required: ["task_id"]
|
|
1725
|
+
}
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
name: "a2a_list_tasks",
|
|
1729
|
+
description: "List A2A tasks for the tenant. Can filter by agent, state, and direction (inbound/outbound).",
|
|
1730
|
+
inputSchema: {
|
|
1731
|
+
type: "object",
|
|
1732
|
+
properties: {
|
|
1733
|
+
agent_id: {
|
|
1734
|
+
type: "string",
|
|
1735
|
+
description: "Filter by agent ID"
|
|
1736
|
+
},
|
|
1737
|
+
state: {
|
|
1738
|
+
type: "string",
|
|
1739
|
+
enum: ["submitted", "working", "input-required", "completed", "failed", "canceled", "rejected"],
|
|
1740
|
+
description: "Filter by task state"
|
|
1741
|
+
},
|
|
1742
|
+
direction: {
|
|
1743
|
+
type: "string",
|
|
1744
|
+
enum: ["inbound", "outbound"],
|
|
1745
|
+
description: "Filter by direction"
|
|
1746
|
+
},
|
|
1747
|
+
limit: {
|
|
1748
|
+
type: "number",
|
|
1749
|
+
description: "Number of results per page (default: 20, max: 100)"
|
|
1750
|
+
},
|
|
1751
|
+
page: {
|
|
1752
|
+
type: "number",
|
|
1753
|
+
description: "Page number (default: 1)"
|
|
1754
|
+
}
|
|
1755
|
+
},
|
|
1756
|
+
required: []
|
|
1757
|
+
}
|
|
1758
|
+
},
|
|
1759
|
+
// ==========================================================================
|
|
1760
|
+
// MPP (Machine Payments Protocol) Tools
|
|
1761
|
+
// ==========================================================================
|
|
1762
|
+
{
|
|
1763
|
+
name: "mpp_pay",
|
|
1764
|
+
description: "Make a one-shot MPP payment to a service. The payment goes through governance checks (spending limits, approval thresholds) before execution.",
|
|
1765
|
+
inputSchema: {
|
|
1766
|
+
type: "object",
|
|
1767
|
+
properties: {
|
|
1768
|
+
service_url: {
|
|
1769
|
+
type: "string",
|
|
1770
|
+
description: 'URL of the service to pay (e.g., "https://api.example.com")'
|
|
1771
|
+
},
|
|
1772
|
+
amount: {
|
|
1773
|
+
type: "number",
|
|
1774
|
+
description: "Payment amount"
|
|
1775
|
+
},
|
|
1776
|
+
currency: {
|
|
1777
|
+
type: "string",
|
|
1778
|
+
description: "Currency (default: USDC)"
|
|
1779
|
+
},
|
|
1780
|
+
intent: {
|
|
1781
|
+
type: "string",
|
|
1782
|
+
description: "Description of what the payment is for (optional)"
|
|
1783
|
+
},
|
|
1784
|
+
agent_id: {
|
|
1785
|
+
type: "string",
|
|
1786
|
+
description: "UUID of the agent making the payment"
|
|
1787
|
+
},
|
|
1788
|
+
wallet_id: {
|
|
1789
|
+
type: "string",
|
|
1790
|
+
description: "UUID of the wallet to pay from (optional)"
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
required: ["service_url", "amount", "agent_id"]
|
|
1794
|
+
}
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
name: "mpp_open_session",
|
|
1798
|
+
description: "Open a streaming MPP payment session with a deposit. Sessions allow multiple voucher payments to a service within a budget.",
|
|
1799
|
+
inputSchema: {
|
|
1800
|
+
type: "object",
|
|
1801
|
+
properties: {
|
|
1802
|
+
service_url: {
|
|
1803
|
+
type: "string",
|
|
1804
|
+
description: "URL of the service"
|
|
1805
|
+
},
|
|
1806
|
+
deposit_amount: {
|
|
1807
|
+
type: "number",
|
|
1808
|
+
description: "Initial deposit amount for the session"
|
|
1809
|
+
},
|
|
1810
|
+
max_budget: {
|
|
1811
|
+
type: "number",
|
|
1812
|
+
description: "Maximum total budget for the session (optional)"
|
|
1813
|
+
},
|
|
1814
|
+
agent_id: {
|
|
1815
|
+
type: "string",
|
|
1816
|
+
description: "UUID of the agent"
|
|
1817
|
+
},
|
|
1818
|
+
wallet_id: {
|
|
1819
|
+
type: "string",
|
|
1820
|
+
description: "UUID of the wallet"
|
|
1821
|
+
},
|
|
1822
|
+
currency: {
|
|
1823
|
+
type: "string",
|
|
1824
|
+
description: "Currency (default: USDC)"
|
|
1825
|
+
}
|
|
1826
|
+
},
|
|
1827
|
+
required: ["service_url", "deposit_amount", "agent_id", "wallet_id"]
|
|
1828
|
+
}
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
name: "mpp_get_session",
|
|
1832
|
+
description: "Get MPP session details including voucher history, spending, and remaining budget.",
|
|
1833
|
+
inputSchema: {
|
|
1834
|
+
type: "object",
|
|
1835
|
+
properties: {
|
|
1836
|
+
session_id: {
|
|
1837
|
+
type: "string",
|
|
1838
|
+
description: "UUID of the session"
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1841
|
+
required: ["session_id"]
|
|
1842
|
+
}
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
name: "mpp_list_sessions",
|
|
1846
|
+
description: "List MPP sessions with optional filtering by agent or status.",
|
|
1847
|
+
inputSchema: {
|
|
1848
|
+
type: "object",
|
|
1849
|
+
properties: {
|
|
1850
|
+
agent_id: {
|
|
1851
|
+
type: "string",
|
|
1852
|
+
description: "Filter by agent ID (optional)"
|
|
1853
|
+
},
|
|
1854
|
+
status: {
|
|
1855
|
+
type: "string",
|
|
1856
|
+
enum: ["active", "closed", "expired", "exhausted"],
|
|
1857
|
+
description: "Filter by session status (optional)"
|
|
1858
|
+
},
|
|
1859
|
+
limit: {
|
|
1860
|
+
type: "number",
|
|
1861
|
+
description: "Results per page (default: 50)"
|
|
1862
|
+
},
|
|
1863
|
+
offset: {
|
|
1864
|
+
type: "number",
|
|
1865
|
+
description: "Offset for pagination (default: 0)"
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
required: []
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
name: "mpp_close_session",
|
|
1873
|
+
description: "Close an active MPP session. Remaining funds are returned to the wallet.",
|
|
1874
|
+
inputSchema: {
|
|
1875
|
+
type: "object",
|
|
1876
|
+
properties: {
|
|
1877
|
+
session_id: {
|
|
1878
|
+
type: "string",
|
|
1879
|
+
description: "UUID of the session to close"
|
|
1880
|
+
}
|
|
1881
|
+
},
|
|
1882
|
+
required: ["session_id"]
|
|
1883
|
+
}
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
name: "mpp_list_transfers",
|
|
1887
|
+
description: "List MPP payment transfers with optional filtering by service URL or session.",
|
|
1888
|
+
inputSchema: {
|
|
1889
|
+
type: "object",
|
|
1890
|
+
properties: {
|
|
1891
|
+
service_url: {
|
|
1892
|
+
type: "string",
|
|
1893
|
+
description: "Filter by service URL (optional)"
|
|
1894
|
+
},
|
|
1895
|
+
session_id: {
|
|
1896
|
+
type: "string",
|
|
1897
|
+
description: "Filter by session ID (optional)"
|
|
1898
|
+
},
|
|
1899
|
+
limit: {
|
|
1900
|
+
type: "number",
|
|
1901
|
+
description: "Results per page (default: 50)"
|
|
1902
|
+
},
|
|
1903
|
+
offset: {
|
|
1904
|
+
type: "number",
|
|
1905
|
+
description: "Offset for pagination (default: 0)"
|
|
1906
|
+
}
|
|
1907
|
+
},
|
|
1908
|
+
required: []
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
{
|
|
1912
|
+
name: "mpp_verify_receipt",
|
|
1913
|
+
description: "Verify an MPP payment receipt. Checks that the receipt is valid and matches a completed transfer.",
|
|
1914
|
+
inputSchema: {
|
|
1915
|
+
type: "object",
|
|
1916
|
+
properties: {
|
|
1917
|
+
receipt_id: {
|
|
1918
|
+
type: "string",
|
|
1919
|
+
description: "The receipt ID to verify"
|
|
1920
|
+
}
|
|
1921
|
+
},
|
|
1922
|
+
required: ["receipt_id"]
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1925
|
+
];
|
|
1926
|
+
|
|
1927
|
+
export {
|
|
1928
|
+
tools
|
|
1929
|
+
};
|