@carrierllc/mcp 0.2.4 → 0.2.5

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/index.js CHANGED
@@ -530,13 +530,22 @@ function registerAllTools(server2, ctx) {
530
530
  "list_subscribers",
531
531
  {
532
532
  title: "List Subscribers",
533
- description: "Use this to list subscribers with optional filters and pagination. Good for fleet enumeration, bulk status checks, and finding subscribers by account or status. Params: `accountId` (integer, filter by account), `status` (string, e.g. 'ACTIVE'/'SUSPENDED'), `offset` (integer, for pagination \u2014 default 0), `limit` (integer, max results \u2014 always set to avoid unbounded fetches; recommended max 100 per call). Returns: array of subscriber summary records with ICCID, status, and account. Do NOT use this to fetch full details for a specific subscriber \u2014 use `get_subscriber` for that.",
534
- inputSchema: {
533
+ description: "Use this to list subscribers with optional filters and pagination. Good for fleet enumeration, bulk status checks, and finding subscribers by account or status. OCS REQUIRES at least one search key \u2014 provide exactly one of: `imsi`, `iccid`, `activationCode`, `accountId`, or `msisdn`. Calling with no key will be rejected before reaching OCS. Params: `imsi` (string), `iccid` (string), `activationCode` (string), `accountId` (integer), `msisdn` (string), `status` (string, e.g. 'ACTIVE'/'SUSPENDED'), `offset` (integer, pagination \u2014 default 0), `limit` (integer, max results \u2014 always set to avoid unbounded fetches; recommended max 100 per call). Returns: array of subscriber summary records with ICCID, status, and account. Do NOT use this to fetch full details for a specific subscriber \u2014 use `get_subscriber` for that.",
534
+ inputSchema: z.object({
535
+ imsi: z.string().optional().describe("Filter by IMSI"),
536
+ iccid: z.string().optional().describe("Filter by ICCID"),
537
+ activationCode: z.string().optional().describe("Filter by activation code"),
535
538
  accountId: z.number().optional().describe("Filter by account ID"),
539
+ msisdn: z.string().optional().describe("Filter by MSISDN"),
536
540
  status: z.string().optional().describe("Filter by status"),
537
541
  offset: z.number().optional().describe("Pagination offset"),
538
542
  limit: z.number().optional().describe("Max results to return")
539
- },
543
+ }).refine(
544
+ (d) => d.imsi !== void 0 || d.iccid !== void 0 || d.activationCode !== void 0 || d.accountId !== void 0 || d.msisdn !== void 0,
545
+ {
546
+ message: "Provide at least one of: imsi, iccid, activationCode, accountId, msisdn"
547
+ }
548
+ ),
540
549
  annotations: { readOnlyHint: true }
541
550
  },
542
551
  wrapHandler(
@@ -546,7 +555,11 @@ function registerAllTools(server2, ctx) {
546
555
  ctx,
547
556
  async (args, token2) => {
548
557
  const params = {};
558
+ if (args.imsi) params.imsi = args.imsi;
559
+ if (args.iccid) params.iccid = args.iccid;
560
+ if (args.activationCode) params.activationCode = args.activationCode;
549
561
  if (args.accountId !== void 0) params.accountId = args.accountId;
562
+ if (args.msisdn) params.msisdn = args.msisdn;
550
563
  if (args.status) params.status = args.status;
551
564
  if (args.offset !== void 0) params.offset = args.offset;
552
565
  const client = new OcsClient(ctx.env.CARRIER_OCS_BASE_URL, token2);