@datadive-tools/mcp 0.8.0 → 0.9.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/lib.js CHANGED
@@ -100,7 +100,7 @@ function extractMessage(body) {
100
100
  }
101
101
 
102
102
  // package.json
103
- var version = "0.8.0";
103
+ var version = "0.9.0";
104
104
 
105
105
  // src/http/client.ts
106
106
  var PKG_VERSION = version;
@@ -484,16 +484,73 @@ var createNicheDiveTool = {
484
484
  }
485
485
  };
486
486
 
487
- // src/tools/get-dive-status.ts
487
+ // src/tools/redive-niche.ts
488
488
  import { z as z10 } from "zod";
489
489
  var inputSchema10 = {
490
- diveId: z10.string().min(1).describe("The dive identifier returned by `create_niche_dive`.")
490
+ nicheId: z10.string().min(1).describe("The niche to re-dive. Get one from `list_niches`."),
491
+ mode: z10.enum(["same_competitors", "discover"]).describe(
492
+ "How to pick the competitors for the refreshed dive. `same_competitors` re-runs the niche's current competitor set and takes no other argument \u2014 use it to refresh stale data. `discover` searches for a fresh competitor set, which is what you want when the niche has changed."
493
+ ),
494
+ numberOfCompetitors: z10.number().int().min(2).optional().describe(
495
+ "Total ASINs the refreshed dive should contain, including `lockedAsins`. Required in `discover` mode and rejected in `same_competitors` mode. Dive tokens are spent per ASIN."
496
+ ),
497
+ heroAsin: z10.string().min(1).optional().describe(
498
+ "`discover` mode only. Seed product the competitor discovery starts from. Defaults to the niche's highest-selling competitor, preferring one the user's own connected seller account owns."
499
+ ),
500
+ lockedAsins: z10.array(z10.string().min(1)).optional().describe(
501
+ "`discover` mode only. ASINs that must stay in the competitor set regardless of what discovery finds. Cannot exceed `numberOfCompetitors`, and cannot overlap `excludedAsins`."
502
+ ),
503
+ excludedAsins: z10.array(z10.string().min(1)).optional().describe("`discover` mode only. ASINs discovery must never select."),
504
+ confirm: z10.boolean().optional().describe(
505
+ "Must be true to proceed \u2014 a re-dive spends dive tokens. Confirm the cost with the user first."
506
+ )
507
+ };
508
+ var rediveNicheTool = {
509
+ name: "redive_niche",
510
+ title: "Re-dive an Existing Niche",
511
+ description: "Use this to refresh an existing niche's research with current Amazon data, instead of creating a new niche with `create_niche_dive`. \u26A0\uFE0F Spends dive tokens (one batch per ASIN dived) and cannot be undone \u2014 set `confirm: true` only after the user approves the cost. Two modes: `same_competitors` re-dives the niche's current competitor set (no other argument needed) and `discover` finds a fresh set, sized by `numberOfCompetitors` and steerable with `heroAsin` / `lockedAsins` / `excludedAsins`. Runs asynchronously: returns a `diveId` and an `estimatedCompletionDate` \u2014 poll `get_dive_status` with that `diveId` until it reports `success`. The niche keeps its `nicheId`, so existing rank radars and reports follow the refreshed data.",
512
+ inputSchema: inputSchema10,
513
+ // Same reasoning as create_niche_dive: a re-dive is additive rather than destructive, but the
514
+ // irreversible token spend is what clients need to prompt on. The confirm gate enforces it regardless.
515
+ annotations: { readOnlyHint: false, destructiveHint: true },
516
+ handler: async (args, ctx) => {
517
+ if (args.mode === "discover" && args.numberOfCompetitors === void 0) {
518
+ throw new ApiError(
519
+ "bad_request",
520
+ 400,
521
+ 'numberOfCompetitors is required in `discover` mode \u2014 it is how many ASINs the refreshed dive will contain, and therefore what it costs. Ask the user how many competitors they want (minimum 2), or use mode "same_competitors" to re-dive the niche\'s current set.'
522
+ );
523
+ }
524
+ const pending = requireConfirmation(
525
+ args.confirm,
526
+ ctx,
527
+ args.mode === "discover" ? `Re-diving this niche consumes dive tokens \u2014 one batch per ASIN analyzed (${args.numberOfCompetitors} requested).` : "Re-diving this niche consumes dive tokens \u2014 one batch per competitor currently in the niche. Use `get_niche_competitors` first if the user needs the exact count."
528
+ );
529
+ if (pending) return pending;
530
+ return await httpPost(
531
+ { config: ctx.config, toolName: "redive_niche" },
532
+ `/v1/niches/${encodeURIComponent(args.nicheId)}/redive`,
533
+ {
534
+ mode: args.mode,
535
+ numberOfCompetitors: args.numberOfCompetitors,
536
+ heroAsin: args.heroAsin,
537
+ lockedAsins: args.lockedAsins,
538
+ excludedAsins: args.excludedAsins
539
+ }
540
+ );
541
+ }
542
+ };
543
+
544
+ // src/tools/get-dive-status.ts
545
+ import { z as z11 } from "zod";
546
+ var inputSchema11 = {
547
+ diveId: z11.string().min(1).describe("The dive identifier returned by `create_niche_dive` or `redive_niche`.")
491
548
  };
492
549
  var getDiveStatusTool = {
493
550
  name: "get_dive_status",
494
551
  title: "Get Niche Dive Status",
495
- description: "Use this to poll a niche dive started with `create_niche_dive` until it finishes. Returns one of three shapes keyed by `status`: `in_progress` (with `estimatedCompletionDate`), `success` (with the new `nicheId` plus `tokensUsed`/`tokensLeft`), or `error` (with an `error` message). On `success`, use the `nicheId` with `list_niches`, `get_niche_keywords`, `get_niche_competitors`, etc. Re-poll periodically \u2014 dives can take minutes; the `estimatedCompletionDate` hints at when to check.",
496
- inputSchema: inputSchema10,
552
+ description: "Use this to poll a niche dive started with `create_niche_dive` or `redive_niche` until it finishes. Returns one of three shapes keyed by `status`: `in_progress` (with `estimatedCompletionDate`), `success` (with the `nicheId` plus `tokensUsed`/`tokensLeft`), or `error` (with an `error` message). On `success`, use the `nicheId` with `list_niches`, `get_niche_keywords`, `get_niche_competitors`, etc. (for a re-dive it is the same niche you passed in, now carrying refreshed data). Re-poll periodically \u2014 dives can take minutes; the `estimatedCompletionDate` hints at when to check.",
553
+ inputSchema: inputSchema11,
497
554
  annotations: { readOnlyHint: true },
498
555
  handler: async (args, ctx) => {
499
556
  return await httpGet(
@@ -504,16 +561,16 @@ var getDiveStatusTool = {
504
561
  };
505
562
 
506
563
  // src/tools/list-seller-profiles.ts
507
- import { z as z11 } from "zod";
508
- var inputSchema11 = {
509
- currentPage: z11.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
510
- pageSize: z11.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
564
+ import { z as z12 } from "zod";
565
+ var inputSchema12 = {
566
+ currentPage: z12.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
567
+ pageSize: z12.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
511
568
  };
512
569
  var listSellerProfilesTool = {
513
570
  name: "list_seller_profiles",
514
571
  title: "List Connected Amazon Seller Profiles",
515
572
  description: 'Use this when the user asks which Amazon seller accounts are connected, or as the discovery step to find the `sellerId` and `marketplace` required by `get_asin_inventory_distribution`, `get_seller_catalog`, `get_seller_listing_changes`, and the alert tools. Returns a paginated list of the organization\'s connected seller profiles \u2014 each item has sellerId, sellerName, marketplace (e.g. "com", "co.uk"), hasAdApi (whether Advertising API credentials are connected), and createdAt \u2014 plus pagination metadata (currentPage, pageSize, total, lastPage, hasNext, hasPrev).',
516
- inputSchema: inputSchema11,
573
+ inputSchema: inputSchema12,
517
574
  annotations: { readOnlyHint: true },
518
575
  handler: async (args, ctx) => {
519
576
  return await httpGet(
@@ -528,15 +585,15 @@ var listSellerProfilesTool = {
528
585
  };
529
586
 
530
587
  // src/tools/get-seller-catalog.ts
531
- import { z as z13 } from "zod";
588
+ import { z as z14 } from "zod";
532
589
 
533
590
  // src/tools/seller-scoped.ts
534
- import { z as z12 } from "zod";
591
+ import { z as z13 } from "zod";
535
592
  var sellerScopedInputSchema = {
536
- sellerId: z12.string().min(1).describe(
593
+ sellerId: z13.string().min(1).describe(
537
594
  "Amazon seller account ID. Get it from `list_seller_profiles`, or find it on the Connections page at https://2.datadive.tools."
538
595
  ),
539
- marketplace: z12.enum(SUPPORTED_MARKETPLACES).describe('Amazon marketplace code, e.g. "com" for amazon.com or "co.uk" for amazon.co.uk.')
596
+ marketplace: z13.enum(SUPPORTED_MARKETPLACES).describe('Amazon marketplace code, e.g. "com" for amazon.com or "co.uk" for amazon.co.uk.')
540
597
  };
541
598
  function sellerMarketplacePath(sellerId, marketplace, suffix) {
542
599
  return `/v1/seller_profiles/${encodeURIComponent(sellerId)}/marketplaces/${encodeURIComponent(
@@ -545,19 +602,19 @@ function sellerMarketplacePath(sellerId, marketplace, suffix) {
545
602
  }
546
603
 
547
604
  // src/tools/get-seller-catalog.ts
548
- var inputSchema12 = {
605
+ var inputSchema13 = {
549
606
  ...sellerScopedInputSchema,
550
- search: z13.string().min(1).optional().describe("Case-insensitive partial match on product title or brand."),
551
- brand: z13.string().min(1).optional().describe("Case-insensitive partial match on brand name."),
552
- status: z13.enum(CATALOG_STATUSES).optional().describe('Listing status filter. "Active" (default) or "all".'),
553
- currentPage: z13.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
554
- pageSize: z13.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
607
+ search: z14.string().min(1).optional().describe("Case-insensitive partial match on product title or brand."),
608
+ brand: z14.string().min(1).optional().describe("Case-insensitive partial match on brand name."),
609
+ status: z14.enum(CATALOG_STATUSES).optional().describe('Listing status filter. "Active" (default) or "all".'),
610
+ currentPage: z14.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
611
+ pageSize: z14.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
555
612
  };
556
613
  var getSellerCatalogTool = {
557
614
  name: "get_seller_catalog",
558
615
  title: "List Catalog ASINs for a Seller",
559
616
  description: "Use this when the user wants to browse or search a seller's own Amazon catalog \u2014 the products they sell on a given marketplace. Requires a `sellerId` + `marketplace` (use `list_seller_profiles` to discover them). Filter by `search` (title/brand), `brand`, and `status` (Active by default, or all). Returns a paginated list where each item has asin, title, parentAsin, brand, status, imageUrl, and hasVariations, plus pagination metadata (currentPage, pageSize, total, lastPage, hasNext, hasPrev).",
560
- inputSchema: inputSchema12,
617
+ inputSchema: inputSchema13,
561
618
  annotations: { readOnlyHint: true },
562
619
  handler: async (args, ctx) => {
563
620
  return await httpGet(
@@ -575,28 +632,28 @@ var getSellerCatalogTool = {
575
632
  };
576
633
 
577
634
  // src/tools/get-seller-listing-changes.ts
578
- import { z as z14 } from "zod";
579
- var inputSchema13 = {
635
+ import { z as z15 } from "zod";
636
+ var inputSchema14 = {
580
637
  ...sellerScopedInputSchema,
581
- types: z14.array(z14.enum(LISTING_CHANGE_TYPES)).min(1).optional().describe('Filter to specific change types. Omit for all. Any of "Price", "Content", "Image".'),
582
- asin: z14.string().min(1).optional().describe("Filter to an exact ASIN or parent ASIN."),
583
- brand: z14.string().min(1).optional().describe("Case-insensitive partial match on brand name."),
584
- search: z14.string().min(1).optional().describe("Case-insensitive partial match on product title or brand."),
585
- startDate: z14.string().regex(ISO_8601, "startDate must be an ISO-8601 date or timestamp (e.g. 2026-05-01 or 2026-05-01T00:00:00Z)").optional().describe("ISO-8601 date/timestamp; return only changes detected on or after this time."),
586
- endDate: z14.string().regex(ISO_8601, "endDate must be an ISO-8601 date or timestamp (e.g. 2026-05-31 or 2026-05-31T23:59:59Z)").optional().describe("ISO-8601 date/timestamp; return only changes detected on or before this time."),
587
- sortBy: z14.enum(LISTING_CHANGE_SORT_BY).optional().describe('Sort field. "date" (default) or "type".'),
588
- sortOrder: z14.enum(SORT_ORDER).optional().describe('Sort direction. "DESC" (default) or "ASC".'),
589
- includeCorrelations: z14.boolean().optional().describe(
638
+ types: z15.array(z15.enum(LISTING_CHANGE_TYPES)).min(1).optional().describe('Filter to specific change types. Omit for all. Any of "Price", "Content", "Image".'),
639
+ asin: z15.string().min(1).optional().describe("Filter to an exact ASIN or parent ASIN."),
640
+ brand: z15.string().min(1).optional().describe("Case-insensitive partial match on brand name."),
641
+ search: z15.string().min(1).optional().describe("Case-insensitive partial match on product title or brand."),
642
+ startDate: z15.string().regex(ISO_8601, "startDate must be an ISO-8601 date or timestamp (e.g. 2026-05-01 or 2026-05-01T00:00:00Z)").optional().describe("ISO-8601 date/timestamp; return only changes detected on or after this time."),
643
+ endDate: z15.string().regex(ISO_8601, "endDate must be an ISO-8601 date or timestamp (e.g. 2026-05-31 or 2026-05-31T23:59:59Z)").optional().describe("ISO-8601 date/timestamp; return only changes detected on or before this time."),
644
+ sortBy: z15.enum(LISTING_CHANGE_SORT_BY).optional().describe('Sort field. "date" (default) or "type".'),
645
+ sortOrder: z15.enum(SORT_ORDER).optional().describe('Sort direction. "DESC" (default) or "ASC".'),
646
+ includeCorrelations: z15.boolean().optional().describe(
590
647
  "When true, include the ranking/conversion `correlation` object per change (CVR and search-term movement before vs after). Defaults to false."
591
648
  ),
592
- currentPage: z14.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
593
- pageSize: z14.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
649
+ currentPage: z15.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
650
+ pageSize: z15.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
594
651
  };
595
652
  var getSellerListingChangesTool = {
596
653
  name: "get_seller_listing_changes",
597
654
  title: "List Listing Changes for a Seller",
598
655
  description: "Use this when the user asks what changed on their Amazon listings \u2014 price, content (title/bullets/description), or image edits \u2014 for a seller account. Requires a `sellerId` + `marketplace` (use `list_seller_profiles` to discover them). Filter by `types`, `asin`/parent ASIN, `brand`, `search`, and a `startDate`/`endDate` range; sort with `sortBy`/`sortOrder`. Set `includeCorrelations: true` to attach the ranking/conversion impact per change. Returns a paginated list where each item has asin, title, imageUrl, date, type, contentType, description, previousValue, newValue, and (optionally) correlation, plus pagination metadata (currentPage, pageSize, total, lastPage, hasNext, hasPrev).",
599
- inputSchema: inputSchema13,
656
+ inputSchema: inputSchema14,
600
657
  annotations: { readOnlyHint: true },
601
658
  handler: async (args, ctx) => {
602
659
  return await httpGet(
@@ -621,13 +678,13 @@ var getSellerListingChangesTool = {
621
678
  };
622
679
 
623
680
  // src/tools/get-asin-inventory-distribution.ts
624
- import { z as z15 } from "zod";
625
- var inputSchema14 = {
626
- sellerId: z15.string().min(1).describe(
681
+ import { z as z16 } from "zod";
682
+ var inputSchema15 = {
683
+ sellerId: z16.string().min(1).describe(
627
684
  "Amazon seller account ID as connected to DataDive. Get it from `list_seller_profiles`, or find it on the Connections page at https://2.datadive.tools."
628
685
  ),
629
- marketplace: z15.enum(SUPPORTED_MARKETPLACES).describe('Amazon marketplace code, e.g. "com" for amazon.com or "co.uk" for amazon.co.uk.'),
630
- asin: z15.string().regex(/^[A-Z0-9]{10}$/, "ASIN must be 10 uppercase alphanumeric characters (e.g. B08XYZ1234).").describe(
686
+ marketplace: z16.enum(SUPPORTED_MARKETPLACES).describe('Amazon marketplace code, e.g. "com" for amazon.com or "co.uk" for amazon.co.uk.'),
687
+ asin: z16.string().regex(/^[A-Z0-9]{10}$/, "ASIN must be 10 uppercase alphanumeric characters (e.g. B08XYZ1234).").describe(
631
688
  "Amazon Standard Identification Number (10 uppercase alphanumeric characters, e.g. B08XYZ1234)."
632
689
  )
633
690
  };
@@ -635,7 +692,7 @@ var getAsinInventoryDistributionTool = {
635
692
  name: "get_asin_inventory_distribution",
636
693
  title: "Get Per-Fulfillment-Center Inventory Distribution for an ASIN",
637
694
  description: "Use this when the user asks about inventory levels, stock by fulfillment center, or where their units are sitting across Amazon's fulfillment network for a specific ASIN. Requires the Amazon sellerId (from `list_seller_profiles` or the user's DataDive Connections page at https://2.datadive.tools), the marketplace code, and the ASIN. Returns totalSellableUnits and a per-FC `distribution` array (fc, state, availableStock, availableStockPercentage). `lastUpdatedAt` may be null when no successful inventory ingestion has occurred in the last 30 days.",
638
- inputSchema: inputSchema14,
695
+ inputSchema: inputSchema15,
639
696
  annotations: { readOnlyHint: true },
640
697
  handler: async (args, ctx) => {
641
698
  return await httpGet(
@@ -648,18 +705,18 @@ var getAsinInventoryDistributionTool = {
648
705
  };
649
706
 
650
707
  // src/tools/alert-query.ts
651
- import { z as z16 } from "zod";
708
+ import { z as z17 } from "zod";
652
709
  var alertsQueryInputSchema = {
653
- sellerId: z16.string().min(1).max(50).optional().describe('Filter to a single connected Amazon seller account ID, e.g. "A1B2C3D4E5".'),
654
- marketplace: z16.enum(SUPPORTED_MARKETPLACES).optional().describe('Filter to a single Amazon marketplace code, e.g. "com" for amazon.com or "co.uk" for amazon.co.uk.'),
655
- status: z16.enum(ALERT_STATUSES).optional().describe(
710
+ sellerId: z17.string().min(1).max(50).optional().describe('Filter to a single connected Amazon seller account ID, e.g. "A1B2C3D4E5".'),
711
+ marketplace: z17.enum(SUPPORTED_MARKETPLACES).optional().describe('Filter to a single Amazon marketplace code, e.g. "com" for amazon.com or "co.uk" for amazon.co.uk.'),
712
+ status: z17.enum(ALERT_STATUSES).optional().describe(
656
713
  "Lifecycle filter. `active` (default) returns unresolved alerts, `resolved` returns resolved alerts, `all` returns both. Dismissed alerts are never returned."
657
714
  ),
658
- updatedSince: z16.string().regex(ISO_8601, "updatedSince must be an ISO-8601 date or timestamp (e.g. 2026-05-01 or 2026-05-01T00:00:00Z)").optional().describe(
715
+ updatedSince: z17.string().regex(ISO_8601, "updatedSince must be an ISO-8601 date or timestamp (e.g. 2026-05-01 or 2026-05-01T00:00:00Z)").optional().describe(
659
716
  "ISO-8601 timestamp; return only alerts surfaced at or after this time (filters on `lastAlertedAt`). Use it to incrementally sync since your last poll. Defaults to the last 30 days when omitted."
660
717
  ),
661
- currentPage: z16.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
662
- pageSize: z16.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
718
+ currentPage: z17.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
719
+ pageSize: z17.number().int().min(1).max(50).optional().describe("Items per page (max 50). Defaults to 20.")
663
720
  };
664
721
 
665
722
  // src/tools/list-indexing-issue-alerts.ts
@@ -709,12 +766,12 @@ var listBlindSpendAlertsTool = {
709
766
  };
710
767
 
711
768
  // src/tools/get-quota.ts
712
- var inputSchema15 = {};
769
+ var inputSchema16 = {};
713
770
  var getQuotaTool = {
714
771
  name: "get_quota",
715
772
  title: "Get Quota Usage",
716
773
  description: "Use this when the user asks how much quota or how many tokens they have left, or before creating a Niche Dive or Rank Radar to check remaining headroom. Returns current quota usage and capacity for each billable feature \u2014 DIVED_ASINS (Dive tokens), RANK_RADAR_KEYWORDS (tracked keywords), PRODUCT_BRIEF_ASINS, and AI_COPYWRITER_PROMPTS \u2014 each with `used` and `capacity` (null when unlimited / not applicable), plus `nextRefreshDate` (ISO-8601 timestamp of the next quota reset, or null). Takes no arguments.",
717
- inputSchema: inputSchema15,
774
+ inputSchema: inputSchema16,
718
775
  annotations: { readOnlyHint: true },
719
776
  handler: async (_args, ctx) => {
720
777
  return await httpGet({ config: ctx.config, toolName: "get_quota" }, "/v1/quota");
@@ -722,20 +779,20 @@ var getQuotaTool = {
722
779
  };
723
780
 
724
781
  // src/tools/list-usage.ts
725
- import { z as z17 } from "zod";
726
- var inputSchema16 = {
727
- type: z17.enum(BILLABLE_FEATURE_TYPES).optional().describe("Filter to a single billable feature type. Omit to return all types."),
728
- search: z17.string().min(1).optional().describe("Case-insensitive partial match on the user's name or email."),
729
- startDate: z17.string().regex(ISO_8601, "startDate must be an ISO-8601 date or timestamp (e.g. 2026-05-01 or 2026-05-01T00:00:00Z)").optional().describe("ISO-8601 date/timestamp; return only usage logs recorded on or after this time."),
730
- endDate: z17.string().regex(ISO_8601, "endDate must be an ISO-8601 date or timestamp (e.g. 2026-05-31 or 2026-05-31T23:59:59Z)").optional().describe("ISO-8601 date/timestamp; return only usage logs recorded on or before this time."),
731
- currentPage: z17.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
732
- pageSize: z17.number().int().min(1).max(200).optional().describe("Items per page (max 200). Defaults to 50.")
782
+ import { z as z18 } from "zod";
783
+ var inputSchema17 = {
784
+ type: z18.enum(BILLABLE_FEATURE_TYPES).optional().describe("Filter to a single billable feature type. Omit to return all types."),
785
+ search: z18.string().min(1).optional().describe("Case-insensitive partial match on the user's name or email."),
786
+ startDate: z18.string().regex(ISO_8601, "startDate must be an ISO-8601 date or timestamp (e.g. 2026-05-01 or 2026-05-01T00:00:00Z)").optional().describe("ISO-8601 date/timestamp; return only usage logs recorded on or after this time."),
787
+ endDate: z18.string().regex(ISO_8601, "endDate must be an ISO-8601 date or timestamp (e.g. 2026-05-31 or 2026-05-31T23:59:59Z)").optional().describe("ISO-8601 date/timestamp; return only usage logs recorded on or before this time."),
788
+ currentPage: z18.number().int().min(1).optional().describe("Page number, 1-indexed. Defaults to 1."),
789
+ pageSize: z18.number().int().min(1).max(200).optional().describe("Items per page (max 200). Defaults to 50.")
733
790
  };
734
791
  var listUsageTool = {
735
792
  name: "list_usage",
736
793
  title: "List Billable Usage Logs",
737
794
  description: "Use this when the user asks who consumed tokens, how their quota was spent, or wants an audit of billable activity over a date range. Retrieves a paginated list of billable feature usage logs for the organization \u2014 each entry is a token-consumption event (a dive, rank-radar creation, AI copywriter prompt, etc.). Filter by `type` (billable feature), `search` (user name/email), and `startDate`/`endDate`. Each item includes name, email, qty (tokens consumed), type, action (specific operation), nicheId/nicheName, rankRadarId, and date, plus pagination metadata (currentPage, pageSize, total, lastPage, hasNext, hasPrev).",
738
- inputSchema: inputSchema16,
795
+ inputSchema: inputSchema17,
739
796
  annotations: { readOnlyHint: true },
740
797
  handler: async (args, ctx) => {
741
798
  return await httpGet(
@@ -764,6 +821,7 @@ var allTools = [
764
821
  getRankRadarDataTool,
765
822
  createRankRadarTool,
766
823
  createNicheDiveTool,
824
+ rediveNicheTool,
767
825
  getDiveStatusTool,
768
826
  listSellerProfilesTool,
769
827
  getSellerCatalogTool,