@datadive-tools/mcp 0.13.0 → 0.14.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/README.md CHANGED
@@ -103,7 +103,7 @@ niches, plus pagination metadata. If you don't, see Troubleshooting below.
103
103
  | `get_niche_competitors` | Competitor ASINs, titles, BSR, category and niche statistics (sales, revenue, ratings, opportunity score). |
104
104
  | `get_ranking_juice` | DataDive proprietary ranking-juice metric per competitor (current vs optimized listing). |
105
105
  | `list_rank_radars` | Paginated list of rank radars. Filter by `nicheId`, `searchText` or `status` (`ACTIVE` by default, plus `PAUSED`, `ARCHIVED`, `ALL`). |
106
- | `get_rank_radar_data` | Historical keyword rankings for a rank radar within a `startDate`/`endDate` range. |
106
+ | `get_rank_radar_data` | Historical keyword rankings for a rank radar within a `startDate`/`endDate` range (max 90 days). Paged by keyword: walk `currentPage` while `hasNext` is true, `pageSize` up to 100. |
107
107
  | `create_niche_dive` | **Spends dive tokens.** Starts new niche research from a seed ASIN. Async — returns a `diveId` to poll with `get_dive_status`. Requires `confirm: true`. |
108
108
  | `redive_niche` | **Spends dive tokens.** Refreshes an existing niche with current data — either the same competitors or a newly discovered set. Async — returns a `diveId` to poll with `get_dive_status`. Requires `confirm: true`. |
109
109
  | `get_dive_status` | Poll a dive started by `create_niche_dive` or `redive_niche`: `in_progress`, `success` (carries the `nicheId`), or `error`. |
package/dist/index.js CHANGED
@@ -144,7 +144,7 @@ function extractMessage(body) {
144
144
  }
145
145
 
146
146
  // package.json
147
- var version = "0.13.0";
147
+ var version = "0.14.0";
148
148
 
149
149
  // src/http/client.ts
150
150
  var PKG_VERSION = version;
@@ -462,22 +462,33 @@ var listRankRadarsTool = {
462
462
  // src/tools/get-rank-radar-data.ts
463
463
  import { z as z7 } from "zod";
464
464
  var ISO_DATE = /^\d{4}-\d{2}-\d{2}$/;
465
+ var RANK_RADAR_KEYWORDS_MAX_PAGE_SIZE = 100;
466
+ var RANK_RADAR_MAX_DATE_RANGE_DAYS = 90;
465
467
  var inputSchema7 = {
466
468
  rankRadarId: z7.string().uuid().describe("The Rank Radar UUID (from `list_rank_radars`)."),
467
469
  startDate: z7.string().regex(ISO_DATE, "startDate must be in yyyy-mm-dd format").describe("Start date for the ranking data range, yyyy-mm-dd (e.g. 2024-03-26)."),
468
- endDate: z7.string().regex(ISO_DATE, "endDate must be in yyyy-mm-dd format").describe("End date for the ranking data range, yyyy-mm-dd (e.g. 2024-04-26). Must be on or after startDate.")
470
+ endDate: z7.string().regex(ISO_DATE, "endDate must be in yyyy-mm-dd format").describe(
471
+ `End date for the ranking data range, yyyy-mm-dd (e.g. 2024-04-26). Must be on or after startDate, and at most ${RANK_RADAR_MAX_DATE_RANGE_DAYS} days after it.`
472
+ ),
473
+ currentPage: z7.number().int().min(1).optional().describe("Page of keywords, 1-indexed. Defaults to 1."),
474
+ pageSize: z7.number().int().min(1).max(RANK_RADAR_KEYWORDS_MAX_PAGE_SIZE).optional().describe(`Keywords per page (max ${RANK_RADAR_KEYWORDS_MAX_PAGE_SIZE}). Defaults to 20.`)
469
475
  };
470
476
  var getRankRadarDataTool = {
471
477
  name: "get_rank_radar_data",
472
478
  title: "Get Keyword Rankings for a Rank Radar",
473
- description: "Use this to analyze keyword ranking trends over time. Requires startDate and endDate (yyyy-mm-dd). Retrieves historical keyword ranking data for the specified Rank Radar within the date range. Returns an array of tracked keywords; each has id, keyword, searchVolume, ranks (per-day { date, organicRank, impressionRank }), and any highlight annotations. Use after `list_rank_radars` to discover a `rankRadarId`.",
479
+ description: `Use this to analyze keyword ranking trends over time. Requires startDate and endDate (yyyy-mm-dd), at most ${RANK_RADAR_MAX_DATE_RANGE_DAYS} days apart. Retrieves historical keyword ranking data for the specified Rank Radar within the date range. Results are paged by keyword: \`data\` holds one page of tracked keywords, and the response carries currentPage, pageSize, total, lastPage, hasNext and hasPrev. \`total\` is the Rank Radar's keyword count; to read every keyword, call again with \`currentPage\` + 1 while \`hasNext\` is true, using \`pageSize\` ${RANK_RADAR_KEYWORDS_MAX_PAGE_SIZE} for large Rank Radars. Each keyword has id, keyword, searchVolume, relevancy, ranks (per-day { date, organicRank, sponsoredRank, impressionRank }), and any highlight annotations. Paused keywords are not included. Use after \`list_rank_radars\` to discover a \`rankRadarId\`.`,
474
480
  inputSchema: inputSchema7,
475
481
  annotations: { readOnlyHint: true },
476
482
  handler: async (args, ctx) => {
477
483
  return await httpGet(
478
484
  { config: ctx.config, toolName: "get_rank_radar_data" },
479
485
  `/v1/niches/rank-radars/${encodeURIComponent(args.rankRadarId)}`,
480
- { startDate: args.startDate, endDate: args.endDate }
486
+ {
487
+ startDate: args.startDate,
488
+ endDate: args.endDate,
489
+ currentPage: args.currentPage,
490
+ pageSize: args.pageSize
491
+ }
481
492
  );
482
493
  }
483
494
  };