@carrierllc/mcp 0.2.7 → 0.2.8

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
@@ -438,9 +438,10 @@ function registerAllTools(server2, ctx) {
438
438
  "esim_status_per_account",
439
439
  {
440
440
  title: "eSIM Status Per Account",
441
- description: "Use this to get eSIM status counts broken down by account: active, suspended, inventory (not yet activated), and other states. Good for fleet health dashboards and capacity planning. Params: `accountId` (integer, optional \u2014 omit for all accounts under the reseller). Returns: array of per-account objects with `accountId`, `active`, `suspended`, `inventory`, `other`. Do NOT use this to check a single subscriber's status \u2014 use `get_subscriber` for that. Do NOT use this for billing or balance checks \u2014 use `list_reseller_accounts` for balances.",
441
+ description: "Use this to get eSIM status counts broken down by account: active, suspended, inventory (not yet activated), and other states. Good for fleet health dashboards and capacity planning. OCS requires either `accountId` OR `resellerId`. If both omitted, the token owner's reseller is resolved automatically. Params: `accountId` (integer, optional \u2014 for a single account), `resellerId` (integer, optional \u2014 for all accounts under a specific reseller). Returns: array of per-account objects with `accountId`, `active`, `suspended`, `inventory`, `other`. Do NOT use this to check a single subscriber's status \u2014 use `get_subscriber` for that. Do NOT use this for billing or balance checks \u2014 use `list_reseller_accounts` for balances.",
442
442
  inputSchema: {
443
- accountId: z.number().optional().describe("Filter to a specific account")
443
+ accountId: z.number().optional().describe("Filter to a specific account"),
444
+ resellerId: z.number().optional().describe("Reseller ID (omit to use the token owner's reseller)")
444
445
  },
445
446
  annotations: { readOnlyHint: true }
446
447
  },
@@ -449,9 +450,13 @@ function registerAllTools(server2, ctx) {
449
450
  "esimStatusPerAccount",
450
451
  TOOL_SCOPES["esim_status_per_account"],
451
452
  ctx,
452
- async ({ accountId }, token2) => {
453
+ async ({ accountId, resellerId }, token2) => {
453
454
  const params = {};
454
- if (accountId !== void 0) params.accountId = accountId;
455
+ if (accountId !== void 0) {
456
+ params.accountId = accountId;
457
+ } else {
458
+ params.resellerId = resellerId ?? await getDefaultResellerId(ctx.env, token2);
459
+ }
455
460
  return ocsCall(ctx.env, token2, "esimStatusPerAccount", params);
456
461
  }
457
462
  )