mcp-scraper 0.51.2 → 0.52.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.
Files changed (45) hide show
  1. package/README.md +3 -3
  2. package/dist/bin/api-server.cjs +2819 -869
  3. package/dist/bin/api-server.cjs.map +1 -1
  4. package/dist/bin/api-server.js +2 -2
  5. package/dist/bin/mcp-scraper-cli.cjs +5 -1
  6. package/dist/bin/mcp-scraper-cli.cjs.map +1 -1
  7. package/dist/bin/mcp-scraper-cli.js +3 -3
  8. package/dist/bin/mcp-scraper-install.cjs +1 -1
  9. package/dist/bin/mcp-scraper-install.cjs.map +1 -1
  10. package/dist/bin/mcp-scraper-install.js +1 -1
  11. package/dist/bin/mcp-stdio-server.cjs +355 -28
  12. package/dist/bin/mcp-stdio-server.cjs.map +1 -1
  13. package/dist/bin/mcp-stdio-server.js +2 -2
  14. package/dist/bin/paa-harvest.cjs +4 -0
  15. package/dist/bin/paa-harvest.cjs.map +1 -1
  16. package/dist/bin/paa-harvest.js +2 -2
  17. package/dist/{chunk-ZSJHRZY5.js → chunk-J7TH5KU7.js} +2 -2
  18. package/dist/{chunk-FCZ3QCZP.js → chunk-OT2AF7SH.js} +356 -29
  19. package/dist/chunk-OT2AF7SH.js.map +1 -0
  20. package/dist/chunk-SG2PEHR3.js +562 -0
  21. package/dist/chunk-SG2PEHR3.js.map +1 -0
  22. package/dist/{chunk-GOZIG6HD.js → chunk-TVZD37SE.js} +2 -2
  23. package/dist/{chunk-3ZUBQQPQ.js → chunk-V7CEOUBF.js} +5 -1
  24. package/dist/chunk-V7CEOUBF.js.map +1 -0
  25. package/dist/chunk-VIAXQTZK.js +7 -0
  26. package/dist/chunk-VIAXQTZK.js.map +1 -0
  27. package/dist/{extract-bundle-RCTNANCH.js → extract-bundle-GUEUCTAE.js} +2 -2
  28. package/dist/index.cjs +4 -0
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.js +2 -2
  31. package/dist/{server-KAEHVDY7.js → server-7EXEDKAU.js} +1857 -401
  32. package/dist/server-7EXEDKAU.js.map +1 -0
  33. package/dist/{worker-KQN673JF.js → worker-JL4TG6IF.js} +3 -3
  34. package/package.json +1 -1
  35. package/dist/chunk-27FMOD6S.js +0 -430
  36. package/dist/chunk-27FMOD6S.js.map +0 -1
  37. package/dist/chunk-3ZUBQQPQ.js.map +0 -1
  38. package/dist/chunk-FCZ3QCZP.js.map +0 -1
  39. package/dist/chunk-JNRSR5ZJ.js +0 -7
  40. package/dist/chunk-JNRSR5ZJ.js.map +0 -1
  41. package/dist/server-KAEHVDY7.js.map +0 -1
  42. /package/dist/{chunk-ZSJHRZY5.js.map → chunk-J7TH5KU7.js.map} +0 -0
  43. /package/dist/{chunk-GOZIG6HD.js.map → chunk-TVZD37SE.js.map} +0 -0
  44. /package/dist/{extract-bundle-RCTNANCH.js.map → extract-bundle-GUEUCTAE.js.map} +0 -0
  45. /package/dist/{worker-KQN673JF.js.map → worker-JL4TG6IF.js.map} +0 -0
@@ -979,7 +979,7 @@ render();
979
979
  }
980
980
 
981
981
  // src/version.ts
982
- var PACKAGE_VERSION = "0.51.2";
982
+ var PACKAGE_VERSION = "0.52.0";
983
983
 
984
984
  // src/mcp/browser-agent-tool-schemas.ts
985
985
  var import_zod = require("zod");
@@ -4491,6 +4491,7 @@ ${[h1Lines, h2Lines].filter(Boolean).join("\n")}` : "";
4491
4491
  kpo.address ? `- **Address:** ${kpo.address}` : "",
4492
4492
  kpo.phone ? `- **Phone:** ${kpo.phone}` : "",
4493
4493
  kpo.email ? `- **Email:** ${kpo.email}` : "",
4494
+ kpo.logo ? `- **Structured-data logo:** ${kpo.logo}` : "",
4494
4495
  kpo.faqCount ? `- **FAQ items:** ${kpo.faqCount}` : "",
4495
4496
  kpo.sameAs?.length ? `- **sameAs:** ${kpo.sameAs.slice(0, 5).join(", ")}` : "",
4496
4497
  kpo.missingFields?.length ? `
@@ -4525,15 +4526,23 @@ ${mem.error ?? "unknown error"} \u2014 the page content is still in the truncate
4525
4526
  ## Branding`,
4526
4527
  branding.colorScheme ? `- **Color scheme:** ${branding.colorScheme}` : "",
4527
4528
  `- **Colors:**${Object.entries(branding.colors ?? {}).filter(([, v]) => v).map(([k, v]) => ` ${k}=${v}`).join(",") || " (none extracted)"}`,
4529
+ branding.colorEvidence ? `- **Color evidence:**${Object.entries(branding.colorEvidence).filter(([, v]) => v).map(([key, value]) => value ? ` ${key}=${value.source}/${value.confidence}${value.detail ? ` (${value.detail})` : ""}` : "").join(";") || " (none)"}` : "",
4528
4530
  `- **Fonts:**${Object.entries(branding.fonts ?? {}).filter(([, v]) => v).map(([k, v]) => ` ${k}=${v}`).join(",") || " (none extracted)"}`,
4529
- branding.assets?.logo ? `- **Logo:** ${branding.assets.logo}` : "",
4531
+ branding.assets?.logo ? `- **Logo:** ${branding.assets.logo}${branding.assets.logoConfidence ? ` (${branding.assets.logoConfidence} confidence)` : ""}` : "- **Logo:** no candidate cleared the evidence threshold",
4532
+ branding.assets?.logoSelectionReason ? `- **Logo evidence:** ${branding.assets.logoSelectionReason}` : "",
4533
+ branding.assets?.logoVariants?.length ? `- **Logo variants:** ${branding.assets.logoVariants.join(", ")}` : "",
4534
+ branding.assets?.proofImages?.length ? `- **Proof images:** ${branding.assets.proofImages.map((image) => `${image.proofType} (${image.confidence}) \u2014 ${image.url}${image.context ? ` [${image.context}]` : ""}`).join("; ")}` : "",
4530
4535
  branding.assets?.favicon ? `- **Favicon:** ${branding.assets.favicon}` : ""
4531
4536
  ].filter(Boolean).join("\n") : "";
4532
4537
  const mediaSection = media ? [
4533
4538
  `
4534
4539
  ## Media Assets`,
4535
- `- **Found:** ${media.totalFound} total, ${media.filteredCount} filtered (ads/noise), ${media.assets.length} downloaded`,
4536
- media.outputDir ? `- **Saved to:** ${media.outputDir}` : ""
4540
+ `- **Discovery:** ${media.totalFound} candidates (${media.staticFound} static, ${media.renderedFound} rendered); ${media.assets.length} retained after filtering and responsive-variant collapse`,
4541
+ `- **Downloads:** ${media.assets.filter((asset) => asset.downloadStatus === "downloaded").length} succeeded, ${media.assets.filter((asset) => asset.downloadStatus === "failed").length} failed`,
4542
+ `- **Completeness:** ${media.completeness} \u2014 ${media.exhausted ? "rendered page exhausted after stable scrolling" : `stopped with ${media.stopReason}; more media may exist`}`,
4543
+ media.outputDir ? `- **Saved to:** ${media.outputDir}` : "",
4544
+ media.artifact ? `- **ZIP artifact:** \`${String(media.artifact.artifactId ?? "")}\` (use \`archive_read\` for \`summary.json\` or \`media.jsonl\`)` : "",
4545
+ ...media.warnings.map((warning) => `- ${warning}`)
4537
4546
  ].filter(Boolean).join("\n") : "";
4538
4547
  const archiveSection = archive ? `
4539
4548
  ## Wayback Capture
@@ -4560,6 +4569,25 @@ ${archiveSection}${headingSection}${kpoSection}${brandingSection}${featuredImage
4560
4569
  ${archiveSection}${headingSection}${kpoSection}${brandingSection}${featuredImageSection}${bodySectionFull}${memSection}${screenshotSection}${mediaSection}${tips}`;
4561
4570
  const localBlock = oneBlockWithLocalPath(full, diskReport);
4562
4571
  const textResult = localBlock.result;
4572
+ const structuredMediaAssets = media?.assets.map((asset) => {
4573
+ const { inlinePreview: _preview, ...clean } = asset;
4574
+ return { ...clean, contentIndex: null };
4575
+ }) ?? null;
4576
+ const structuredMedia = media ? {
4577
+ pageUrl: url,
4578
+ staticFound: media.staticFound,
4579
+ renderedFound: media.renderedFound,
4580
+ totalFound: media.totalFound,
4581
+ filteredCount: media.filteredCount,
4582
+ retainedCount: media.assets.length,
4583
+ completeness: media.completeness,
4584
+ exhausted: media.exhausted,
4585
+ stopReason: media.stopReason,
4586
+ scrollRounds: media.scrollRounds,
4587
+ warnings: media.warnings,
4588
+ assets: structuredMediaAssets,
4589
+ artifact: media.artifact
4590
+ } : null;
4563
4591
  const structuredContent = {
4564
4592
  url,
4565
4593
  title: d.title ?? null,
@@ -4567,6 +4595,7 @@ ${archiveSection}${headingSection}${kpoSection}${brandingSection}${featuredImage
4567
4595
  schemaBlockCount: schemaCount,
4568
4596
  entityName: kpo?.entityName ?? null,
4569
4597
  entityTypes: kpo?.type ?? [],
4598
+ structuredDataLogo: kpo?.logo ?? null,
4570
4599
  napScore: kpo?.napScore ?? null,
4571
4600
  missingSchemaFields: kpo?.missingFields ?? [],
4572
4601
  screenshotSaved: screenshotPath ?? null,
@@ -4574,12 +4603,44 @@ ${archiveSection}${headingSection}${kpoSection}${brandingSection}${featuredImage
4574
4603
  archive: archive ?? null,
4575
4604
  featuredImage: featuredImage ?? null,
4576
4605
  branding: branding ?? null,
4577
- mediaAssets: media?.assets ?? null,
4606
+ mediaAssets: structuredMediaAssets,
4607
+ media: structuredMedia,
4578
4608
  memory: mem ?? void 0,
4579
4609
  memoryImages: d.memoryImages ?? void 0,
4580
4610
  delivery: d.delivery ?? void 0,
4581
4611
  localPath: localBlock.localPath ?? void 0
4582
4612
  };
4613
+ const attachMedia = (base, baseStructured) => {
4614
+ const content = [...base.content];
4615
+ if (screenshotMeta?.base64) content.push({ type: "image", data: screenshotMeta.base64, mimeType: "image/png" });
4616
+ const assets = structuredMediaAssets?.map((asset) => ({ ...asset })) ?? null;
4617
+ for (let index = 0; index < (media?.assets.length ?? 0); index += 1) {
4618
+ const preview = media?.assets[index]?.inlinePreview;
4619
+ if (!preview?.data || !preview.mimeType) continue;
4620
+ if (assets?.[index]) assets[index].contentIndex = content.length;
4621
+ content.push({ type: "image", data: preview.data, mimeType: preview.mimeType });
4622
+ }
4623
+ const artifact = media?.artifact;
4624
+ if (artifact && typeof artifact.downloadUrl === "string") {
4625
+ content.push({
4626
+ type: "resource_link",
4627
+ name: String(artifact.filename ?? "website-media.zip"),
4628
+ title: `Download media from ${title}`,
4629
+ uri: artifact.downloadUrl,
4630
+ mimeType: "application/zip",
4631
+ size: typeof artifact.bytes === "number" ? artifact.bytes : void 0
4632
+ });
4633
+ }
4634
+ return {
4635
+ ...base,
4636
+ content,
4637
+ structuredContent: {
4638
+ ...baseStructured,
4639
+ mediaAssets: assets,
4640
+ media: structuredMedia ? { ...structuredMedia, assets } : null
4641
+ }
4642
+ };
4643
+ };
4583
4644
  if (input.delivery !== "inline" && input.delivery !== "memory") {
4584
4645
  const offloaded = await maybeOffload(
4585
4646
  "extract_url",
@@ -4599,22 +4660,12 @@ The full extraction is available as an owned artifact.`,
4599
4660
  retained: true,
4600
4661
  nextAction: "Use report_artifact_read with artifact.artifactId."
4601
4662
  };
4602
- return {
4603
- ...offloaded,
4604
- structuredContent: { ...structuredRecord(offloaded.structuredContent), delivery }
4605
- };
4663
+ return attachMedia({
4664
+ ...offloaded
4665
+ }, { ...structuredRecord(offloaded.structuredContent), delivery });
4606
4666
  }
4607
4667
  }
4608
- if (screenshotMeta?.base64) {
4609
- return {
4610
- content: [
4611
- ...textResult.content,
4612
- { type: "image", data: screenshotMeta.base64, mimeType: "image/png" }
4613
- ],
4614
- structuredContent
4615
- };
4616
- }
4617
- return { ...textResult, structuredContent };
4668
+ return attachMedia(textResult, structuredContent);
4618
4669
  }
4619
4670
  var DIFF_PAGE_PREVIEW_HUNKS = 20;
4620
4671
  function formatDiffPage(raw, input) {
@@ -6391,6 +6442,7 @@ function formatMapsPlaceIntel(raw, input) {
6391
6442
  const lat = d.lat;
6392
6443
  const lng = d.lng;
6393
6444
  const durationMs = d.durationMs;
6445
+ const placeUrl = d.placeUrl;
6394
6446
  const histogram = d.reviewHistogram ?? [];
6395
6447
  const topics = d.reviewTopics ?? [];
6396
6448
  const about = d.aboutAttributes ?? [];
@@ -6399,6 +6451,10 @@ function formatMapsPlaceIntel(raw, input) {
6399
6451
  const services = d.services ?? [];
6400
6452
  const areasServed = d.areasServed ?? [];
6401
6453
  const servicesStatus = d.servicesStatus ?? "not_requested";
6454
+ const media = structuredRecord(d.media);
6455
+ const mediaImages = Array.isArray(media.images) ? media.images.map(structuredRecord) : [];
6456
+ const mediaArtifact = media.artifact && typeof media.artifact === "object" && !Array.isArray(media.artifact) ? media.artifact : null;
6457
+ const mediaWarnings = Array.isArray(media.warnings) ? media.warnings.map(String) : [];
6402
6458
  const hoursTable = d.hoursTable ?? [];
6403
6459
  const ratingLine = [rating, reviewCount ? `(${reviewCount} reviews)` : null].filter(Boolean).join(" ");
6404
6460
  const basicLines = [
@@ -6466,6 +6522,35 @@ ${areasServed.map((a) => `- ${a}`).join("\n")}` : null
6466
6522
  return parts.length ? `
6467
6523
  ## Services & Areas Served
6468
6524
  ${parts.join("\n\n")}` : "";
6525
+ })();
6526
+ const mediaSection = (() => {
6527
+ const status = String(media.status ?? "not_requested");
6528
+ if (status === "not_requested") return "";
6529
+ if (status === "unavailable") return "\n## Images\n> The Google Maps photo gallery could not be retrieved in this run.";
6530
+ const counts = [
6531
+ `${Number(media.imagesCollected ?? mediaImages.length)} collected`,
6532
+ `${Number(media.imagesDownloaded ?? 0)} downloaded`,
6533
+ `${Number(media.ownerImagesCollected ?? 0)} owner`,
6534
+ `${Number(media.otherImagesCollected ?? 0)} other`,
6535
+ `${Number(media.unknownOriginImagesCollected ?? 0)} unknown origin`
6536
+ ].join(" \xB7 ");
6537
+ const completion = media.exhausted === true ? "Gallery exhausted after three stable quiescence checks." : `Collection stopped with \`${String(media.stopReason ?? "unknown")}\`; more photos may exist.`;
6538
+ const artifactLines = mediaArtifact ? [
6539
+ `- **ZIP artifact:** \`${String(mediaArtifact.artifactId ?? "")}\``,
6540
+ typeof mediaArtifact.downloadUrl === "string" ? `- **Download:** ${mediaArtifact.downloadUrl}` : null,
6541
+ typeof mediaArtifact.localPath === "string" ? `- **Local file:** \`${mediaArtifact.localPath}\`` : null,
6542
+ "- **AI readback:** call `archive_read` with the artifactId, then read `summary.json` or `images.jsonl`."
6543
+ ].filter(Boolean).join("\n") : "";
6544
+ const provenance = Number(media.otherImagesCollected ?? 0) > 0 || Number(media.unknownOriginImagesCollected ?? 0) > 0 ? "\n> `other` means absent from a fully exhausted **By owner** gallery. It may include customer, review, Street View, Google, or unattributed media; MCP Scraper does not relabel it as review imagery without evidence." : "";
6545
+ return `
6546
+ ## Images
6547
+ **${counts}**
6548
+
6549
+ ${completion}${provenance}${artifactLines ? `
6550
+
6551
+ ${artifactLines}` : ""}${mediaWarnings.length ? `
6552
+
6553
+ ${mediaWarnings.map((warning) => `- ${warning}`).join("\n")}` : ""}`;
6469
6554
  })();
6470
6555
  const full = [
6471
6556
  `# ${name}`,
@@ -6483,14 +6568,49 @@ ${basicLines}` : null,
6483
6568
  ${entitySection}` : null,
6484
6569
  reviewsSection,
6485
6570
  servicesSection,
6571
+ mediaSection,
6486
6572
  durationMs != null ? `
6487
6573
  ---
6488
6574
  *Extracted in ${(durationMs / 1e3).toFixed(1)}s*` : null
6489
6575
  ].filter(Boolean).join("\n");
6576
+ const content = [{ type: "text", text: full }];
6577
+ const structuredImages = mediaImages.map((image) => {
6578
+ const preview = structuredRecord(image.inlinePreview);
6579
+ let contentIndex = null;
6580
+ if (typeof preview.data === "string" && typeof preview.mimeType === "string") {
6581
+ contentIndex = content.length;
6582
+ content.push({ type: "image", data: preview.data, mimeType: preview.mimeType });
6583
+ }
6584
+ return {
6585
+ index: Number(image.index ?? 0),
6586
+ galleryPosition: typeof image.galleryPosition === "number" ? image.galleryPosition : null,
6587
+ sourceUrl: String(image.sourceUrl ?? ""),
6588
+ mediaKey: String(image.mediaKey ?? ""),
6589
+ origin: image.origin === "owner" || image.origin === "other" ? image.origin : "unknown",
6590
+ originConfidence: String(image.originConfidence ?? ""),
6591
+ filename: typeof image.filename === "string" ? image.filename : null,
6592
+ mimeType: typeof image.mimeType === "string" ? image.mimeType : null,
6593
+ bytes: typeof image.bytes === "number" ? image.bytes : null,
6594
+ downloadStatus: typeof image.downloadStatus === "string" ? image.downloadStatus : "not_attempted",
6595
+ downloadError: typeof image.downloadError === "string" ? image.downloadError : null,
6596
+ contentIndex
6597
+ };
6598
+ });
6599
+ if (mediaArtifact && typeof mediaArtifact.downloadUrl === "string") {
6600
+ content.push({
6601
+ type: "resource_link",
6602
+ name: String(mediaArtifact.filename ?? "Google Maps images.zip"),
6603
+ title: `Download ${name} Google Maps images`,
6604
+ uri: mediaArtifact.downloadUrl,
6605
+ mimeType: "application/zip",
6606
+ size: typeof mediaArtifact.bytes === "number" ? mediaArtifact.bytes : void 0
6607
+ });
6608
+ }
6490
6609
  return {
6491
- ...oneBlock(full),
6610
+ content,
6492
6611
  structuredContent: {
6493
6612
  name,
6613
+ placeUrl: placeUrl ?? null,
6494
6614
  rating: rating ?? null,
6495
6615
  reviewCount: reviewCount ?? null,
6496
6616
  category: category ?? null,
@@ -6498,6 +6618,8 @@ ${entitySection}` : null,
6498
6618
  phone: phone ?? null,
6499
6619
  website: website ?? null,
6500
6620
  hoursSummary: hoursSummary ?? null,
6621
+ hoursTable,
6622
+ plusCode: plusCode ?? null,
6501
6623
  bookingUrl: bookingUrl ?? null,
6502
6624
  kgmid: kgmid ?? null,
6503
6625
  cidDecimal: cidDecimal ?? null,
@@ -6506,10 +6628,49 @@ ${entitySection}` : null,
6506
6628
  lng: lng ?? null,
6507
6629
  reviewsStatus,
6508
6630
  reviewsCollected: reviews.length,
6631
+ reviews: reviews.map((review) => ({
6632
+ reviewId: review.reviewId ?? null,
6633
+ author: review.author ?? null,
6634
+ stars: review.stars ?? null,
6635
+ date: review.date ?? null,
6636
+ text: review.text ?? null,
6637
+ ownerResponse: review.ownerResponse ?? null
6638
+ })),
6639
+ reviewHistogram: histogram.map((row) => ({ stars: Number(row.stars), count: String(row.count ?? "") })),
6509
6640
  reviewTopics: topics.map((t) => ({ label: String(t.label ?? ""), count: String(t.count ?? "") })),
6510
6641
  services,
6511
6642
  areasServed,
6512
- servicesStatus
6643
+ servicesStatus,
6644
+ aboutAttributes: about.map((row) => ({ section: String(row.section ?? ""), attribute: String(row.attribute ?? "") })),
6645
+ media: {
6646
+ status: String(media.status ?? "not_requested"),
6647
+ scope: media.scope === "owner" ? "owner" : "all",
6648
+ requestedMaxImages: Number(media.requestedMaxImages ?? 100),
6649
+ imagesCollected: Number(media.imagesCollected ?? structuredImages.length),
6650
+ imagesDownloaded: Number(media.imagesDownloaded ?? 0),
6651
+ ownerImagesCollected: Number(media.ownerImagesCollected ?? 0),
6652
+ otherImagesCollected: Number(media.otherImagesCollected ?? 0),
6653
+ unknownOriginImagesCollected: Number(media.unknownOriginImagesCollected ?? 0),
6654
+ ownerGalleryAvailable: media.ownerGalleryAvailable === true,
6655
+ ownerGalleryExhausted: media.ownerGalleryExhausted === true,
6656
+ ownerPhotosDiscovered: Number(media.ownerPhotosDiscovered ?? 0),
6657
+ allPhotosDiscovered: Number(media.allPhotosDiscovered ?? 0),
6658
+ exhausted: media.exhausted === true,
6659
+ stopReason: String(media.stopReason ?? "not_requested"),
6660
+ images: structuredImages,
6661
+ artifact: mediaArtifact ? {
6662
+ artifactId: String(mediaArtifact.artifactId ?? ""),
6663
+ filename: String(mediaArtifact.filename ?? ""),
6664
+ contentType: String(mediaArtifact.contentType ?? "application/zip"),
6665
+ bytes: Number(mediaArtifact.bytes ?? 0),
6666
+ sha256: String(mediaArtifact.sha256 ?? ""),
6667
+ expiresAt: String(mediaArtifact.expiresAt ?? ""),
6668
+ downloadUrl: typeof mediaArtifact.downloadUrl === "string" ? mediaArtifact.downloadUrl : null,
6669
+ downloadUrlExpiresAt: typeof mediaArtifact.downloadUrlExpiresAt === "string" ? mediaArtifact.downloadUrlExpiresAt : null,
6670
+ localPath: typeof mediaArtifact.localPath === "string" ? mediaArtifact.localPath : null
6671
+ } : null,
6672
+ warnings: mediaWarnings
6673
+ }
6513
6674
  }
6514
6675
  };
6515
6676
  }
@@ -6970,7 +7131,7 @@ seam is noted so you can chain them.
6970
7131
  \`extract_url\` or \`reddit_thread\`.
6971
7132
 
6972
7133
  ## Pages & sites
6973
- - One page -> **extract_url** (takes a url).
7134
+ - One page -> **extract_url** (takes a url). Set \`preserveMedia:true\` only when the user wants the actual page media; it returns static-plus-rendered provenance, bounded image blocks, and an owner-scoped ZIP readable with \`archive_read\`.
6974
7135
  - Whole site, crawl + SEO report -> **extract_site** (takes a url).
6975
7136
  - Wayback replay URLs work with the same tools: \`extract_url\` removes playback chrome and can return
6976
7137
  a featured image; \`extract_site\` batches nearby archived HTML captures for the replayed site.
@@ -7057,8 +7218,9 @@ seam is noted so you can chain them.
7057
7218
  placeUrl, cid; set \`includeServices: true\` to enrich each result where available).
7058
7219
  - One business deep-dive -> **maps_place_intel** (takes businessName + location, NOT an id; returns
7059
7220
  reviews, full hours, About attributes, entity IDs/CID, and with \`includeServices: true\`, the full
7060
- configured services and areas-served lists. Call it directly with a name from a \`maps_search\` result
7061
- or from the user).
7221
+ configured services and areas-served lists. Set \`includeImages:true\` only when photos are requested;
7222
+ use \`imageScope:"owner"\` for listing-owner photos or \`"all"\` for the full evidence-labeled gallery.
7223
+ Call it directly with a name from a \`maps_search\` result or from the user).
7062
7224
 
7063
7225
  ## YouTube
7064
7226
  - Find or list videos -> **youtube_harvest** (returns \`videos[].videoId\`).
@@ -8193,8 +8355,10 @@ var ExtractUrlBaseInputSchema = {
8193
8355
  includeFeaturedImage: import_zod6.z.boolean().default(false).describe("Return the best featured image from Open Graph, Twitter, JSON-LD, or page content. For Wayback replay URLs, also returns the timestamp-matched archived image URL when available."),
8194
8356
  downloadMedia: import_zod6.z.boolean().optional().describe("Deprecated alias for preserveMedia. Omit when using preserveMedia; when omitted, media preservation defaults to false."),
8195
8357
  mediaTypes: import_zod6.z.array(import_zod6.z.enum(["image", "video", "audio"])).default(["image", "video", "audio"]).describe("Which media types to download. Default all three."),
8358
+ maxMediaAssets: import_zod6.z.number().int().min(1).max(250).default(100).describe("Maximum media records to retain and attempt to download after filtering and responsive-variant collapse."),
8359
+ maxInlineImages: import_zod6.z.number().int().min(0).max(5).default(3).describe("Maximum downloaded images to attach as AI-readable image content blocks. All successfully downloaded media remains available in the ZIP."),
8196
8360
  delivery: import_zod6.z.enum(["auto", "inline", "artifact", "memory"]).default("auto").describe("Where to deliver the result. auto keeps small results inline and offloads large ones; artifact always returns an owned artifact; memory stores the full page in hosted Memory; inline returns a bounded response."),
8197
- preserveMedia: import_zod6.z.boolean().default(false).describe("Preserve discovered media in the result workflow. This is the preferred replacement for downloadMedia."),
8361
+ preserveMedia: import_zod6.z.boolean().default(false).describe("Collect media from static source plus a rendered, lazy-loaded page; collapse responsive variants; return provenance and completeness; attach bounded image previews; and create an owner-scoped ZIP readable with archive_read."),
8198
8362
  depositToVault: import_zod6.z.boolean().default(false).describe("Save the full page content into the user's MCP Memory vault server-side, embedded for semantic recall \u2014 the full body is NOT returned to chat."),
8199
8363
  vaultName: import_zod6.z.string().trim().min(1).max(120).optional().describe("Optional vault to deposit into. Defaults to the user's personal vault.")
8200
8364
  };
@@ -8352,7 +8516,11 @@ var MapsPlaceIntelInputSchema = {
8352
8516
  hl: import_zod6.z.string().length(2).default("en").describe("Language inferred from user request."),
8353
8517
  includeReviews: import_zod6.z.boolean().default(false).describe("Fetch individual review cards \u2014 for reviews, customer pain, complaints, or praise themes."),
8354
8518
  maxReviews: import_zod6.z.number().int().min(1).max(500).default(50).describe("Max review cards when includeReviews is true. Default 50, maximum 500."),
8355
- includeServices: import_zod6.z.boolean().default(false).describe("Fetch the business's configured services list and areas-served list, when the profile has them. Adds one extra page visit; not present for every business.")
8519
+ includeServices: import_zod6.z.boolean().default(false).describe("Fetch the business's configured services list and areas-served list, when the profile has them. Adds one extra page visit; not present for every business."),
8520
+ includeImages: import_zod6.z.boolean().default(false).describe("Collect Google Maps listing photos, download them, and return an AI-readable manifest plus an owner-scoped ZIP artifact. The gallery is scrolled until quiescent or maxImages is reached."),
8521
+ imageScope: import_zod6.z.enum(["owner", "all"]).default("all").describe("owner collects only the Google Maps By owner gallery. all collects the full gallery and labels exact owner matches versus other/unknown media."),
8522
+ maxImages: import_zod6.z.number().int().min(1).max(250).default(100).describe("Maximum photos to collect when includeImages is true. Default 100, maximum 250."),
8523
+ maxInlineImages: import_zod6.z.number().int().min(0).max(5).default(3).describe("Maximum downloaded photos attached as MCP image blocks for direct AI vision. The ZIP and structured manifest still contain the wider result.")
8356
8524
  };
8357
8525
  var TrustpilotReviewsInputSchema = {
8358
8526
  domain: import_zod6.z.string().min(1).describe(`The business's domain as it appears in its Trustpilot URL, e.g. "www.bhphotovideo.com" (include the www. if the site uses it \u2014 pass the domain as-is, do not guess).`),
@@ -9109,6 +9277,37 @@ var SearchSerpOutputSchema = {
9109
9277
  aiOverview: AiOverviewOutput,
9110
9278
  entityIds: EntityIdsOutput
9111
9279
  };
9280
+ var PageMediaAssetOutput = import_zod6.z.object({
9281
+ url: import_zod6.z.string(),
9282
+ type: import_zod6.z.enum(["image", "video", "audio"]),
9283
+ mimeType: NullableString2,
9284
+ filename: import_zod6.z.string(),
9285
+ savedPath: NullableString2,
9286
+ sizeBytes: import_zod6.z.number().int().min(0).nullable(),
9287
+ discoveryMethods: import_zod6.z.array(import_zod6.z.string()),
9288
+ altTexts: import_zod6.z.array(import_zod6.z.string()),
9289
+ contexts: import_zod6.z.array(import_zod6.z.string()),
9290
+ width: import_zod6.z.number().int().min(0).nullable(),
9291
+ height: import_zod6.z.number().int().min(0).nullable(),
9292
+ variants: import_zod6.z.array(import_zod6.z.string()),
9293
+ finalUrl: NullableString2.optional(),
9294
+ duplicateOf: NullableString2.optional(),
9295
+ sha256: NullableString2.optional(),
9296
+ downloadStatus: import_zod6.z.enum(["downloaded", "failed", "not_attempted"]).optional(),
9297
+ downloadError: NullableString2.optional(),
9298
+ contentIndex: import_zod6.z.number().int().min(0).nullable()
9299
+ });
9300
+ var PageMediaArtifactOutput = import_zod6.z.object({
9301
+ artifactId: import_zod6.z.string(),
9302
+ filename: import_zod6.z.string(),
9303
+ contentType: import_zod6.z.string(),
9304
+ bytes: import_zod6.z.number().int().min(0),
9305
+ sha256: import_zod6.z.string(),
9306
+ expiresAt: import_zod6.z.string(),
9307
+ downloadUrl: NullableString2,
9308
+ downloadUrlExpiresAt: NullableString2,
9309
+ localPath: NullableString2
9310
+ });
9112
9311
  var ExtractUrlOutputSchema = {
9113
9312
  url: import_zod6.z.string(),
9114
9313
  title: NullableString2,
@@ -9119,6 +9318,7 @@ var ExtractUrlOutputSchema = {
9119
9318
  schemaBlockCount: import_zod6.z.number().int().min(0),
9120
9319
  entityName: NullableString2,
9121
9320
  entityTypes: import_zod6.z.array(import_zod6.z.string()),
9321
+ structuredDataLogo: NullableString2.describe("Logo declared by the selected Organization or LocalBusiness JSON-LD entity, separate from the rendered branding candidate ranking."),
9122
9322
  napScore: import_zod6.z.number().nullable(),
9123
9323
  missingSchemaFields: import_zod6.z.array(import_zod6.z.string()),
9124
9324
  screenshotSaved: NullableString2,
@@ -9143,6 +9343,78 @@ var ExtractUrlOutputSchema = {
9143
9343
  archivedUrl: NullableString2,
9144
9344
  source: import_zod6.z.enum(["og:image", "twitter:image", "json-ld", "content-image"])
9145
9345
  }).nullable(),
9346
+ branding: import_zod6.z.object({
9347
+ colorScheme: import_zod6.z.enum(["light", "dark"]).nullable(),
9348
+ colors: import_zod6.z.object({
9349
+ primary: NullableString2,
9350
+ accent: NullableString2,
9351
+ background: NullableString2,
9352
+ text: NullableString2,
9353
+ heading: NullableString2
9354
+ }),
9355
+ colorEvidence: import_zod6.z.object({
9356
+ primary: import_zod6.z.object({
9357
+ value: import_zod6.z.string(),
9358
+ source: import_zod6.z.enum(["css_variable", "theme_color", "visible_cta", "navigation_background", "header_svg", "visible_background", "body_background", "body_text", "heading_text"]),
9359
+ confidence: import_zod6.z.enum(["high", "medium", "low"]),
9360
+ detail: NullableString2
9361
+ }).nullable(),
9362
+ accent: import_zod6.z.object({
9363
+ value: import_zod6.z.string(),
9364
+ source: import_zod6.z.enum(["css_variable", "theme_color", "visible_cta", "navigation_background", "header_svg", "visible_background", "body_background", "body_text", "heading_text"]),
9365
+ confidence: import_zod6.z.enum(["high", "medium", "low"]),
9366
+ detail: NullableString2
9367
+ }).nullable(),
9368
+ background: import_zod6.z.object({ value: import_zod6.z.string(), source: import_zod6.z.literal("body_background"), confidence: import_zod6.z.enum(["high", "medium", "low"]), detail: NullableString2 }).nullable(),
9369
+ text: import_zod6.z.object({ value: import_zod6.z.string(), source: import_zod6.z.literal("body_text"), confidence: import_zod6.z.enum(["high", "medium", "low"]), detail: NullableString2 }).nullable(),
9370
+ heading: import_zod6.z.object({ value: import_zod6.z.string(), source: import_zod6.z.literal("heading_text"), confidence: import_zod6.z.enum(["high", "medium", "low"]), detail: NullableString2 }).nullable()
9371
+ }).describe("Rendered provenance for each selected color so callers can distinguish explicit brand tokens and semantic elements from lower-confidence fallbacks."),
9372
+ fonts: import_zod6.z.object({ heading: NullableString2, body: NullableString2 }),
9373
+ assets: import_zod6.z.object({
9374
+ logo: NullableString2,
9375
+ favicon: NullableString2,
9376
+ logoConfidence: import_zod6.z.enum(["high", "medium", "low"]).nullable(),
9377
+ logoSelectionReason: NullableString2,
9378
+ logoVariants: import_zod6.z.array(import_zod6.z.string()).describe("Responsive or original-size files from the same brand-logo family as logo; never partner, certification, award, press, or customer marks."),
9379
+ logoCandidates: import_zod6.z.array(import_zod6.z.object({
9380
+ url: import_zod6.z.string(),
9381
+ score: import_zod6.z.number(),
9382
+ confidence: import_zod6.z.enum(["high", "medium", "low"]),
9383
+ region: import_zod6.z.enum(["json_ld", "header", "nav", "footer", "body", "favicon"]),
9384
+ evidence: import_zod6.z.array(import_zod6.z.string()),
9385
+ alt: NullableString2,
9386
+ width: import_zod6.z.number().nullable(),
9387
+ height: import_zod6.z.number().nullable()
9388
+ })),
9389
+ proofImages: import_zod6.z.array(import_zod6.z.object({
9390
+ url: import_zod6.z.string(),
9391
+ proofType: import_zod6.z.enum(["certification", "accreditation", "award", "membership", "partner_or_customer", "press_mention", "trust_mark"]),
9392
+ score: import_zod6.z.number(),
9393
+ confidence: import_zod6.z.enum(["high", "medium", "low"]),
9394
+ evidence: import_zod6.z.array(import_zod6.z.string()),
9395
+ alt: NullableString2,
9396
+ context: NullableString2,
9397
+ width: import_zod6.z.number().nullable(),
9398
+ height: import_zod6.z.number().nullable()
9399
+ })).describe("Prominent body images supported by trust context, kept separate from the site logo. Classification is evidence-ranked rather than a claim that the depicted organization endorses the site.")
9400
+ })
9401
+ }).nullable().describe("Rendered brand and proof evidence. logo is the site identity, logoVariants are the same mark family, and proofImages are separately typed body trust signals. Inspect confidence and evidence rather than treating uncertain relationships as facts."),
9402
+ mediaAssets: import_zod6.z.array(PageMediaAssetOutput).nullable().describe("Backward-compatible flattened page-media inventory. Use media for completeness, warnings, and artifact delivery."),
9403
+ media: import_zod6.z.object({
9404
+ pageUrl: import_zod6.z.string(),
9405
+ staticFound: import_zod6.z.number().int().min(0),
9406
+ renderedFound: import_zod6.z.number().int().min(0),
9407
+ totalFound: import_zod6.z.number().int().min(0),
9408
+ filteredCount: import_zod6.z.number().int().min(0),
9409
+ retainedCount: import_zod6.z.number().int().min(0),
9410
+ completeness: import_zod6.z.enum(["complete", "partial"]),
9411
+ exhausted: import_zod6.z.boolean(),
9412
+ stopReason: import_zod6.z.enum(["page_exhausted", "asset_limit", "scroll_round_limit", "render_unavailable"]),
9413
+ scrollRounds: import_zod6.z.number().int().min(0),
9414
+ warnings: import_zod6.z.array(import_zod6.z.string()),
9415
+ assets: import_zod6.z.array(PageMediaAssetOutput),
9416
+ artifact: PageMediaArtifactOutput.nullable()
9417
+ }).nullable().describe("Static-plus-rendered website media manifest with provenance, bounded image content-block indices, completion state, and owner-scoped ZIP delivery."),
9146
9418
  memory: import_zod6.z.object({
9147
9419
  deposited: import_zod6.z.boolean(),
9148
9420
  vault: import_zod6.z.string().optional(),
@@ -9333,6 +9605,7 @@ var ArchiveReadOutputSchema = {
9333
9605
  };
9334
9606
  var MapsPlaceIntelOutputSchema = {
9335
9607
  name: import_zod6.z.string(),
9608
+ placeUrl: import_zod6.z.string().nullable(),
9336
9609
  rating: NullableString2,
9337
9610
  reviewCount: NullableString2,
9338
9611
  category: NullableString2,
@@ -9340,6 +9613,8 @@ var MapsPlaceIntelOutputSchema = {
9340
9613
  phone: NullableString2,
9341
9614
  website: NullableString2,
9342
9615
  hoursSummary: NullableString2,
9616
+ hoursTable: import_zod6.z.array(import_zod6.z.object({ day: import_zod6.z.string(), hours: import_zod6.z.string() })),
9617
+ plusCode: NullableString2,
9343
9618
  bookingUrl: NullableString2,
9344
9619
  kgmid: NullableString2,
9345
9620
  cidDecimal: NullableString2,
@@ -9348,13 +9623,65 @@ var MapsPlaceIntelOutputSchema = {
9348
9623
  lng: import_zod6.z.number().nullable(),
9349
9624
  reviewsStatus: import_zod6.z.string(),
9350
9625
  reviewsCollected: import_zod6.z.number().int().min(0),
9626
+ reviews: import_zod6.z.array(import_zod6.z.object({
9627
+ reviewId: NullableString2,
9628
+ author: NullableString2,
9629
+ stars: NullableString2,
9630
+ date: NullableString2,
9631
+ text: NullableString2,
9632
+ ownerResponse: NullableString2
9633
+ })),
9634
+ reviewHistogram: import_zod6.z.array(import_zod6.z.object({ stars: import_zod6.z.number().int().min(1).max(5), count: import_zod6.z.string() })),
9351
9635
  reviewTopics: import_zod6.z.array(import_zod6.z.object({
9352
9636
  label: import_zod6.z.string(),
9353
9637
  count: import_zod6.z.string()
9354
9638
  })),
9355
9639
  services: import_zod6.z.array(import_zod6.z.string()),
9356
9640
  areasServed: import_zod6.z.array(import_zod6.z.string()),
9357
- servicesStatus: import_zod6.z.string()
9641
+ servicesStatus: import_zod6.z.string(),
9642
+ aboutAttributes: import_zod6.z.array(import_zod6.z.object({ section: import_zod6.z.string(), attribute: import_zod6.z.string() })),
9643
+ media: import_zod6.z.object({
9644
+ status: import_zod6.z.string(),
9645
+ scope: import_zod6.z.enum(["owner", "all"]),
9646
+ requestedMaxImages: import_zod6.z.number().int().min(1),
9647
+ imagesCollected: import_zod6.z.number().int().min(0),
9648
+ imagesDownloaded: import_zod6.z.number().int().min(0),
9649
+ ownerImagesCollected: import_zod6.z.number().int().min(0),
9650
+ otherImagesCollected: import_zod6.z.number().int().min(0),
9651
+ unknownOriginImagesCollected: import_zod6.z.number().int().min(0),
9652
+ ownerGalleryAvailable: import_zod6.z.boolean(),
9653
+ ownerGalleryExhausted: import_zod6.z.boolean(),
9654
+ ownerPhotosDiscovered: import_zod6.z.number().int().min(0),
9655
+ allPhotosDiscovered: import_zod6.z.number().int().min(0),
9656
+ exhausted: import_zod6.z.boolean(),
9657
+ stopReason: import_zod6.z.string(),
9658
+ images: import_zod6.z.array(import_zod6.z.object({
9659
+ index: import_zod6.z.number().int().min(1),
9660
+ galleryPosition: import_zod6.z.number().int().min(1).nullable(),
9661
+ sourceUrl: import_zod6.z.string(),
9662
+ mediaKey: import_zod6.z.string(),
9663
+ origin: import_zod6.z.enum(["owner", "other", "unknown"]),
9664
+ originConfidence: import_zod6.z.string(),
9665
+ filename: NullableString2,
9666
+ mimeType: NullableString2,
9667
+ bytes: import_zod6.z.number().int().min(0).nullable(),
9668
+ downloadStatus: import_zod6.z.string(),
9669
+ downloadError: NullableString2,
9670
+ contentIndex: import_zod6.z.number().int().min(1).nullable()
9671
+ })),
9672
+ artifact: import_zod6.z.object({
9673
+ artifactId: import_zod6.z.string(),
9674
+ filename: import_zod6.z.string(),
9675
+ contentType: import_zod6.z.string(),
9676
+ bytes: import_zod6.z.number().int().min(0),
9677
+ sha256: import_zod6.z.string(),
9678
+ expiresAt: import_zod6.z.string(),
9679
+ downloadUrl: NullableString2,
9680
+ downloadUrlExpiresAt: NullableString2,
9681
+ localPath: NullableString2
9682
+ }).nullable(),
9683
+ warnings: import_zod6.z.array(import_zod6.z.string())
9684
+ })
9358
9685
  };
9359
9686
  var TrustpilotReviewsOutputSchema = {
9360
9687
  domain: import_zod6.z.string(),
@@ -11697,7 +12024,7 @@ function registerPaaExtractorMcpTools(server, executor, options = {}) {
11697
12024
  }, async (input) => formatInstagramMediaDownload(await executor.instagramMediaDownload(input), input));
11698
12025
  server.registerTool("maps_place_intel", {
11699
12026
  title: "Google Maps Business Profile Details",
11700
- description: "Deep-dive one known/named Google Business Profile: rating, reviews, category, address, phone, full hours, About attributes, entity IDs/CID, and \u2014 with includeServices: true \u2014 the full configured services and areas-served lists. Not for category searches or multi-business prospect lists; use maps_search for those. Split business name from location.",
12027
+ description: 'Deep-dive one known/named Google Business Profile: rating, reviews, category, address, phone, website, full hours, About attributes, entity IDs/CID, configured services/areas, and optional photos. Set includeImages:true for a provenance-aware manifest, bounded AI image blocks, and an owner-scoped ZIP; choose imageScope:"owner" for listing-owner photos only. Not for category searches or multi-business prospect lists; use maps_search for those. Split business name from location.',
11701
12028
  inputSchema: MapsPlaceIntelInputSchema,
11702
12029
  outputSchema: recordOutputSchema("maps_place_intel", MapsPlaceIntelOutputSchema),
11703
12030
  annotations: liveWebToolAnnotations("Google Maps Business Profile Details")