reloadpi-mcp 1.0.1 → 1.1.3
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 +1 -1
- package/index.js +14 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ You need USDC on Base mainnet. Get it at [Coinbase](https://coinbase.com) or bri
|
|
|
98
98
|
|
|
99
99
|
- **Browse / polling tools** — free, no payment
|
|
100
100
|
- **Purchase tools** — x402 micropayment in USDC deducted automatically per call
|
|
101
|
-
- Refunds: eSIM orders
|
|
101
|
+
- Refunds: eSIM orders and carrier-rejected topups auto-refund on `FULFILLMENT_FAILED`/`EXPIRED` (auto_on_fail, ~24h window); voucher codes and delivered airtime are non-refundable
|
|
102
102
|
|
|
103
103
|
---
|
|
104
104
|
|
package/index.js
CHANGED
|
@@ -31,7 +31,6 @@ if (!process.env.EVM_PRIVATE_KEY) {
|
|
|
31
31
|
|
|
32
32
|
// ── x402 axios client ─────────────────────────────────────────────────────────
|
|
33
33
|
|
|
34
|
-
|
|
35
34
|
function buildHttpClient() {
|
|
36
35
|
if (!process.env.EVM_PRIVATE_KEY) {
|
|
37
36
|
throw new Error("EVM_PRIVATE_KEY is required for purchase tools. Add it to your MCP config env block.");
|
|
@@ -191,18 +190,23 @@ function createMcpServer() {
|
|
|
191
190
|
|
|
192
191
|
server.tool(
|
|
193
192
|
"browse_esim_offers",
|
|
194
|
-
"Browse eSIM data plans across 190+ countries and regions — including unlimited data plans, regional multi-country
|
|
193
|
+
"Browse eSIM data plans across 190+ countries and regions — including unlimited data plans, regional multi-country bundles, and global roaming. Filter by single country (e.g. ES) or by a multi-country region. Set regional:true to list ONLY multi-country regional bundles (e.g. ESIM-N-AMERICA-10D-UNLIMITED covering US+CA+MX); these have no single country code. Call this before purchasing to discover available offer IDs and prices.",
|
|
195
194
|
{
|
|
196
|
-
country:
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
195
|
+
country: z.string().optional().describe("ISO country code for single-country plans, e.g. ES, US, JP. Omit when using regional/regions."),
|
|
196
|
+
regions: z.enum([
|
|
197
|
+
"Global", "Africa", "Asia", "Caribbean", "Central America",
|
|
198
|
+
"Eastern Europe", "Western Europe", "North America", "Oceania",
|
|
199
|
+
"South America", "South Asia", "Southeast Asia",
|
|
200
|
+
"Middle East and North Africa",
|
|
201
|
+
]).optional().describe("Multi-country region to filter by (exact Zendit enum value)."),
|
|
202
|
+
regional: z.boolean().optional().describe("true → return ONLY multi-country regional bundles (country is empty). Combine with `regions` to scope to one region."),
|
|
203
|
+
limit: z.number().optional().default(10),
|
|
204
|
+
offset: z.number().optional().default(0),
|
|
201
205
|
},
|
|
202
|
-
async ({ country,
|
|
206
|
+
async ({ country, regions, regional, limit, offset }) => {
|
|
203
207
|
const api = buildHttpClient();
|
|
204
208
|
const res = await api.get("/esims/offers", {
|
|
205
|
-
params: { country,
|
|
209
|
+
params: { country, regions, regional: regional ? "true" : undefined, limit, offset },
|
|
206
210
|
});
|
|
207
211
|
return { content: [{ type: "text", text: JSON.stringify(res.data) }] };
|
|
208
212
|
}
|
|
@@ -268,7 +272,7 @@ function createMcpServer() {
|
|
|
268
272
|
|
|
269
273
|
server.tool(
|
|
270
274
|
"claim_refund",
|
|
271
|
-
"Claim a refund for a failed or expired eSIM order. Only eligible when status is FULFILLMENT_FAILED or EXPIRED and refund_policy is auto_on_fail. Requires the txHash from the original purchase response as proof of payment.
|
|
275
|
+
"Claim a refund for a failed or expired eSIM order, or a carrier-rejected topup. Only eligible when status is FULFILLMENT_FAILED or EXPIRED and refund_policy is auto_on_fail. Requires the txHash from the original purchase response as proof of payment. Voucher orders and successfully delivered topups are non-refundable. Free — no payment required.",
|
|
272
276
|
{
|
|
273
277
|
orderId: z.string().describe("Order UUID from the purchase response"),
|
|
274
278
|
txHash: z.string().describe("On-chain txHash from the purchase response — proves you are the original payer"),
|