@carrierllc/mcp 0.13.9 → 0.13.10
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/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ import {
|
|
|
37
37
|
locationZoneCreateParams,
|
|
38
38
|
mccToIso,
|
|
39
39
|
mergeEnvLocal,
|
|
40
|
+
modifySubscriberStatusParams,
|
|
40
41
|
networkEventRows,
|
|
41
42
|
networkEventsOverPeriodParams,
|
|
42
43
|
ocsHlrBitrate,
|
|
@@ -69,7 +70,7 @@ import {
|
|
|
69
70
|
usageOverPeriodParams,
|
|
70
71
|
verifyStorefront,
|
|
71
72
|
withOcsListSummary
|
|
72
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-AUOGFI2I.js";
|
|
73
74
|
import "./chunk-SHKKVIIA.js";
|
|
74
75
|
|
|
75
76
|
// src/index.ts
|
|
@@ -1200,7 +1201,7 @@ var DESTRUCTIVE_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1200
1201
|
// S6 live-smoke gap fill (CAR-105)
|
|
1201
1202
|
"change_network_profile_of_location_zone"
|
|
1202
1203
|
]);
|
|
1203
|
-
function wrapHandler(toolName, ocsMethod, requiredScope, ctx, handler) {
|
|
1204
|
+
function wrapHandler(toolName, ocsMethod, requiredScope, ctx, handler, options) {
|
|
1204
1205
|
return async (args) => {
|
|
1205
1206
|
const start = Date.now();
|
|
1206
1207
|
const isDryRun = args.dry_run === true;
|
|
@@ -1253,11 +1254,12 @@ function wrapHandler(toolName, ocsMethod, requiredScope, ctx, handler) {
|
|
|
1253
1254
|
dry_run: true,
|
|
1254
1255
|
duration_ms: 0
|
|
1255
1256
|
});
|
|
1257
|
+
const preview = options?.dryRunPayload ? options.dryRunPayload(args) : args;
|
|
1256
1258
|
return {
|
|
1257
1259
|
content: [
|
|
1258
1260
|
{
|
|
1259
1261
|
type: "text",
|
|
1260
|
-
text: `[dry_run=true] Would execute '${toolName}' (OCS method '${ocsMethod}') with args: ${JSON.stringify(
|
|
1262
|
+
text: `[dry_run=true] Would execute '${toolName}' (OCS method '${ocsMethod}') with args: ${JSON.stringify(preview)}. No changes made.`
|
|
1261
1263
|
}
|
|
1262
1264
|
]
|
|
1263
1265
|
};
|
|
@@ -1458,7 +1460,7 @@ function registerAllTools(server2, ctx) {
|
|
|
1458
1460
|
"list_steering_lists",
|
|
1459
1461
|
{
|
|
1460
1462
|
title: "List Steering Lists",
|
|
1461
|
-
description: "Use this to retrieve all network steering lists configured for this reseller. A steering list is a named configuration of excluded and priority mobile operators that controls which networks an eSIM prefers to roam onto \u2014 the primary mechanism for network quality optimisation and cost control. Call this before `modify_subscriber_steering_list` to obtain valid steering list IDs. Params: `resellerId` (integer, optional \u2014 omit to use the token owner's reseller). Returns: array of steering list records with `steeringListId`, `name`, and configured operators. Do NOT use this to assign a steering list to a subscriber \u2014 use `modify_subscriber_steering_list`. Do NOT use this to push a steering change to a device \u2014 use `push_steering_to_subscriber` after assignment.",
|
|
1463
|
+
description: "Use this to retrieve all network steering lists configured for this reseller. A steering list is a named configuration of excluded and priority mobile operators that controls which networks an eSIM prefers to roam onto \u2014 the primary mechanism for network quality optimisation and cost control. Call this before `modify_subscriber_steering_list` to obtain valid steering list IDs. Params: `resellerId` (integer, optional \u2014 omit to use the token owner's reseller). Returns: an array of steering list records with `steeringListId`, `name`, and configured operators. An empty catalog is `[]`. When OCS answers a successful list with null, that null is this empty array, not an error. Do NOT use this to assign a steering list to a subscriber \u2014 use `modify_subscriber_steering_list`. Do NOT use this to push a steering change to a device \u2014 use `push_steering_to_subscriber` after assignment.",
|
|
1462
1464
|
inputSchema: {
|
|
1463
1465
|
resellerId: z.number().optional().describe("Reseller ID (omit to use token owner's reseller)")
|
|
1464
1466
|
},
|
|
@@ -1576,7 +1578,7 @@ function registerAllTools(server2, ctx) {
|
|
|
1576
1578
|
"modify_subscriber_status",
|
|
1577
1579
|
{
|
|
1578
1580
|
title: "Modify Subscriber Status",
|
|
1579
|
-
description: "Use this to change the OCS lifecycle status of a subscriber. Common transitions: ACTIVE \u2192 SUSPENDED (pause without losing packages), SUSPENDED \u2192 ACTIVE (reactivate), ACTIVE/SUSPENDED \u2192 TERMINATED (irreversible). WARNING: TERMINATED status is permanent \u2014 the subscriber record cannot be reactivated. \u26A0 Setting status to END_OF_LIFE is irreversible. The subscriber becomes read-only (OCS error 17 on subsequent mutations). Confirm before calling. Params: `iccid` (subscriber identifier), `status` (new status string, e.g. 'ACTIVE', 'SUSPENDED', 'TERMINATED', 'END_OF_LIFE'). Returns: updated subscriber record with the new status. Do NOT use this to disable the SIM card at the network level \u2014 use `change_sim_status` for that. Always call `get_subscriber` first to confirm current status before modifying.",
|
|
1581
|
+
description: "Use this to change the OCS lifecycle status of a subscriber. Common transitions: ACTIVE \u2192 SUSPENDED (pause without losing packages), SUSPENDED \u2192 ACTIVE (reactivate), ACTIVE/SUSPENDED \u2192 TERMINATED (irreversible). WARNING: TERMINATED status is permanent \u2014 the subscriber record cannot be reactivated. \u26A0 Setting status to END_OF_LIFE is irreversible. The subscriber becomes read-only (OCS error 17 on subsequent mutations). Confirm before calling. Params: `iccid` (subscriber identifier), `status` (new status string, e.g. 'ACTIVE', 'SUSPENDED', 'TERMINATED', 'END_OF_LIFE'). OCS receives `{ subscriber: { iccid }, newStatus }`. `subscriber` is a SubscriberId object, never a bare ICCID string. Returns: updated subscriber record with the new status. Do NOT use this to disable the SIM card at the network level \u2014 use `change_sim_status` for that. Always call `get_subscriber` first to confirm current status before modifying.",
|
|
1580
1582
|
inputSchema: {
|
|
1581
1583
|
iccid: z.string().describe("The subscriber ICCID"),
|
|
1582
1584
|
status: z.string().describe("New status value"),
|
|
@@ -1589,10 +1591,15 @@ function registerAllTools(server2, ctx) {
|
|
|
1589
1591
|
"modifySubscriberStatus",
|
|
1590
1592
|
TOOL_SCOPES["modify_subscriber_status"],
|
|
1591
1593
|
ctx,
|
|
1592
|
-
async ({ iccid, status }, token2) => ocsCall(
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1594
|
+
async ({ iccid, status }, token2) => ocsCall(
|
|
1595
|
+
ctx.env,
|
|
1596
|
+
token2,
|
|
1597
|
+
"modifySubscriberStatus",
|
|
1598
|
+
modifySubscriberStatusParams(iccid, status)
|
|
1599
|
+
),
|
|
1600
|
+
{
|
|
1601
|
+
dryRunPayload: ({ iccid, status }) => modifySubscriberStatusParams(iccid, status)
|
|
1602
|
+
}
|
|
1596
1603
|
)
|
|
1597
1604
|
);
|
|
1598
1605
|
server2.registerTool(
|
|
@@ -1640,7 +1647,7 @@ function registerAllTools(server2, ctx) {
|
|
|
1640
1647
|
"get_sim_provider_status",
|
|
1641
1648
|
{
|
|
1642
1649
|
title: "Get SIM Provider Status",
|
|
1643
|
-
description: "Use this to check the physical SIM/eSIM card status at the SIM provider level (ENABLED, DISABLED, DELETED) \u2014 distinct from the OCS subscriber status. Useful when `get_subscriber` shows ACTIVE but connectivity is broken; the SIM may be DISABLED at the provider level. Internally resolves ICCID \u2192 numeric simId. Params: `iccid` (subscriber identifier). Returns: provider status
|
|
1650
|
+
description: "Use this to check the physical SIM/eSIM card status at the SIM provider level (ENABLED, DISABLED, DELETED) \u2014 distinct from the OCS subscriber status. Useful when `get_subscriber` shows ACTIVE but connectivity is broken; the SIM may be DISABLED at the provider level. Internally resolves ICCID \u2192 numeric simId. Params: `iccid` (subscriber identifier). Returns: an array of provider status periods. Each entry has `status`, `start`, `end`, `profileType`, and `statusModification`. Do NOT use this to change the SIM status \u2014 use `change_sim_status` for that.",
|
|
1644
1651
|
inputSchema: {
|
|
1645
1652
|
iccid: z.string().describe("The subscriber ICCID")
|
|
1646
1653
|
},
|
|
@@ -2042,7 +2049,7 @@ function registerAllTools(server2, ctx) {
|
|
|
2042
2049
|
"modify_package_status",
|
|
2043
2050
|
{
|
|
2044
2051
|
title: "Modify Package Status",
|
|
2045
|
-
description: "Use this to activate or deactivate a specific prepaid package on a subscriber without removing it. A deactivated package retains its allowances and can be reactivated later. Params: `iccid` (subscriber identifier), `packageId` (integer from `list_subscriber_packages`), `status` (new package status string, e.g. 'ACTIVE', 'INACTIVE'). Returns: updated
|
|
2052
|
+
description: "Use this to activate or deactivate a specific prepaid package on a subscriber without removing it. A deactivated package retains its allowances and can be reactivated later. Params: `iccid` (subscriber identifier), `packageId` (integer from `list_subscriber_packages`), `status` (new package status string, e.g. 'ACTIVE', 'INACTIVE'). Returns: confirmation `{ updated: true, subsPrepaidPackageId, active, status }` where `status` is `ACTIVE` or `INACTIVE`. OCS accepts the write and returns no package body, so a null response is this confirmation rather than a missing record. Do NOT use this to delete a package \u2014 use `delete_subscriber_package` for permanent removal. Do NOT use this to change the subscriber's overall account status \u2014 use `modify_subscriber_status`.",
|
|
2046
2053
|
inputSchema: {
|
|
2047
2054
|
iccid: z.string().describe("The subscriber ICCID"),
|
|
2048
2055
|
packageId: z.number().describe("The active package ID"),
|