@carrierllc/mcp 0.5.0 → 0.6.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/dist/index.js CHANGED
@@ -3,6 +3,8 @@ import {
3
3
  CARRIER_VERSION,
4
4
  TARGET_IDS,
5
5
  acquireEndpointSlot,
6
+ applySubscriberFilters,
7
+ buildListSubscriberParams,
6
8
  buildSite,
7
9
  clerkCliDeps,
8
10
  configureClerkInstance,
@@ -32,7 +34,7 @@ import {
32
34
  subscriberIdParams,
33
35
  usageOverPeriodParams,
34
36
  verifyStorefront
35
- } from "./chunk-QZBALDKD.js";
37
+ } from "./chunk-Y4JEN7M4.js";
36
38
  import "./chunk-SHKKVIIA.js";
37
39
 
38
40
  // src/index.ts
@@ -803,18 +805,10 @@ function registerAllTools(server2, ctx) {
803
805
  TOOL_SCOPES["list_subscribers"],
804
806
  ctx,
805
807
  async (args, token2) => {
806
- const params = {};
807
- if (args.imsi) params.imsi = args.imsi;
808
- if (args.iccid) params.iccid = args.iccid;
809
- if (args.activationCode) params.activationCode = args.activationCode;
810
- if (args.accountId !== void 0) params.accountId = args.accountId;
811
- if (args.msisdn) params.msisdn = args.msisdn;
812
- if (args.status) params.status = args.status;
813
- if (args.offset !== void 0) params.offset = args.offset;
808
+ const params = buildListSubscriberParams(args);
814
809
  const client = new OcsClient(ctx.env.CARRIER_OCS_BASE_URL, token2);
815
810
  const raw = await client.call("listSubscriber", params);
816
- const limit = args.limit;
817
- const payload = Array.isArray(raw) && typeof limit === "number" && limit >= 0 ? raw.slice(0, limit) : raw;
811
+ const payload = applySubscriberFilters(raw, args);
818
812
  return {
819
813
  content: [{ type: "text", text: JSON.stringify(payload, null, 2) }]
820
814
  };