mcp-scraper 0.67.1 → 0.68.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/CHANGELOG.md +25 -1
- package/README.md +2 -2
- package/dist/{analytics-repository-RUXBFSFX.js → analytics-repository-DJCV6HCX.js} +38 -3
- package/dist/bin/api-server.cjs +12027 -7007
- package/dist/bin/api-server.js +3 -3
- package/dist/bin/mcp-scraper-cli.cjs +1 -1
- package/dist/bin/mcp-scraper-cli.js +1 -1
- package/dist/bin/mcp-scraper-install.cjs +3 -3
- package/dist/bin/mcp-scraper-install.js +2 -2
- package/dist/bin/mcp-stdio-server.cjs +285 -13
- package/dist/bin/mcp-stdio-server.js +4 -4
- package/dist/{chunk-CNLLTD5B.js → chunk-SZEDXVJH.js} +2169 -83
- package/dist/{chunk-VES63X4Q.js → chunk-TV76V5OO.js} +1 -1
- package/dist/{chunk-STQQOEHC.js → chunk-V6H7NGSV.js} +284 -12
- package/dist/{chunk-AYJHI2FK.js → chunk-WNL42AMC.js} +2 -2
- package/dist/{chunk-HUNXSVKU.js → chunk-XKWTKQ7Y.js} +2 -2
- package/dist/{chunk-LCGTNWOT.js → chunk-YUGC5K35.js} +1 -1
- package/dist/{extract-bundle-QQIYJSBW.js → extract-bundle-TBETDXWP.js} +2 -2
- package/dist/{server-ROIJWWJG.js → server-PWHUIHZO.js} +9617 -7001
- package/dist/{site-extract-repository-7EP6UX6I.js → site-extract-repository-I5PHDLPQ.js} +2 -2
- package/dist/{worker-JGWV2LID.js → worker-HUEIDH6F.js} +1 -1
- package/package.json +2 -1
package/dist/bin/api-server.js
CHANGED
|
@@ -17,15 +17,15 @@ loadDotEnv();
|
|
|
17
17
|
async function main() {
|
|
18
18
|
const [{ serve }, { app }, { startWorker }, { migrate }] = await Promise.all([
|
|
19
19
|
import("@hono/node-server"),
|
|
20
|
-
import("../server-
|
|
21
|
-
import("../worker-
|
|
20
|
+
import("../server-PWHUIHZO.js"),
|
|
21
|
+
import("../worker-HUEIDH6F.js"),
|
|
22
22
|
import("../db-ZGZAKYBW.js")
|
|
23
23
|
]);
|
|
24
24
|
const PORT = parseInt(process.env.PORT ?? "3001");
|
|
25
25
|
try {
|
|
26
26
|
await migrate();
|
|
27
27
|
if (process.env.ANALYTICS_DATABASE_URL) {
|
|
28
|
-
const { migrateAnalytics } = await import("../analytics-repository-
|
|
28
|
+
const { migrateAnalytics } = await import("../analytics-repository-DJCV6HCX.js");
|
|
29
29
|
await migrateAnalytics();
|
|
30
30
|
}
|
|
31
31
|
startWorker();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
// release-message.json
|
|
5
5
|
var release_message_default = {
|
|
6
|
-
message: "
|
|
6
|
+
message: "X-Ray now unifies browser, phone, CRM, and checkout conversions and delivers eligible events through verified advertising destinations with durable receipts."
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
// src/install-terminal.ts
|
|
@@ -58,7 +58,7 @@ function renderInstallTerminal(options) {
|
|
|
58
58
|
"1/1 install surfaces ready",
|
|
59
59
|
colorize(`Newest in v${options.version}: ${release_message_default.message}`, "lime", color),
|
|
60
60
|
"",
|
|
61
|
-
`${colorize("Tools", "cyan", color)} ${colorize("(
|
|
61
|
+
`${colorize("Tools", "cyan", color)} ${colorize("(275 MCP tools)", "muted", color)}`,
|
|
62
62
|
toolRow("search", ["harvest_paa", "search_serp", "maps_search", "maps_place_intel"], color),
|
|
63
63
|
toolRow("extract", ["extract_url", "map_site_urls", "extract_site", "audit_site", "directory_workflow"], color),
|
|
64
64
|
toolRow("build", ["create_editorial_reading_room", "rank_tracker_workflow", "portable HTML"], color),
|
|
@@ -112,7 +112,7 @@ function renderInstallTerminal(options) {
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// src/version.ts
|
|
115
|
-
var PACKAGE_VERSION = "0.
|
|
115
|
+
var PACKAGE_VERSION = "0.68.0";
|
|
116
116
|
|
|
117
117
|
// bin/mcp-scraper-install.ts
|
|
118
118
|
var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
renderInstallTerminal
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XKWTKQ7Y.js";
|
|
5
5
|
import {
|
|
6
6
|
PACKAGE_VERSION
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-TV76V5OO.js";
|
|
8
8
|
|
|
9
9
|
// bin/mcp-scraper-install.ts
|
|
10
10
|
var noColor = process.argv.includes("--no-color") || process.env.NO_COLOR !== void 0 || process.env.FORCE_COLOR === "0" || !process.stdout.isTTY;
|
|
@@ -1046,6 +1046,21 @@ var HttpMcpToolExecutor = class {
|
|
|
1046
1046
|
analyticsListActivationDestinations(input) {
|
|
1047
1047
|
return this.getJson(`/analytics/sites/${encodeURIComponent(input.siteId)}/activation-destinations`);
|
|
1048
1048
|
}
|
|
1049
|
+
analyticsListConnections(input) {
|
|
1050
|
+
return this.getJson(`/analytics/sites/${encodeURIComponent(input.siteId)}/connections`);
|
|
1051
|
+
}
|
|
1052
|
+
analyticsListConversionRules(input) {
|
|
1053
|
+
return this.getJson(`/analytics/sites/${encodeURIComponent(input.siteId)}/conversion-rules`);
|
|
1054
|
+
}
|
|
1055
|
+
analyticsListEventDefinitions(input) {
|
|
1056
|
+
return this.getJson(`/analytics/sites/${encodeURIComponent(input.siteId)}/event-definitions`);
|
|
1057
|
+
}
|
|
1058
|
+
analyticsGetCoverage(input) {
|
|
1059
|
+
return this.getJson(`/analytics/sites/${encodeURIComponent(input.siteId)}/coverage`);
|
|
1060
|
+
}
|
|
1061
|
+
analyticsGetPersonJourney(input) {
|
|
1062
|
+
return this.getJson(`/analytics/sites/${encodeURIComponent(input.siteId)}/people/${encodeURIComponent(input.personId)}/journey`);
|
|
1063
|
+
}
|
|
1049
1064
|
analyticsCreateCampaignLink(input) {
|
|
1050
1065
|
const { siteId, ...body } = input;
|
|
1051
1066
|
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/campaign-links`, body, this.timeoutMs, "POST");
|
|
@@ -1058,6 +1073,47 @@ var HttpMcpToolExecutor = class {
|
|
|
1058
1073
|
const { siteId, ...body } = input;
|
|
1059
1074
|
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/activation-destinations`, body, this.timeoutMs, "POST");
|
|
1060
1075
|
}
|
|
1076
|
+
analyticsCreateConnection(input) {
|
|
1077
|
+
const { siteId, ...body } = input;
|
|
1078
|
+
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/connections`, body, this.timeoutMs, "POST");
|
|
1079
|
+
}
|
|
1080
|
+
analyticsCreateConversionRule(input) {
|
|
1081
|
+
const { siteId, ...body } = input;
|
|
1082
|
+
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/conversion-rules`, body, this.timeoutMs, "POST");
|
|
1083
|
+
}
|
|
1084
|
+
analyticsCreateEventDefinition(input) {
|
|
1085
|
+
const { siteId, ...body } = input;
|
|
1086
|
+
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/event-definitions`, body, this.timeoutMs, "POST");
|
|
1087
|
+
}
|
|
1088
|
+
analyticsUpdateEventDefinition(input) {
|
|
1089
|
+
const { siteId, definitionId, ...body } = input;
|
|
1090
|
+
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/event-definitions/${encodeURIComponent(definitionId)}`, body, this.timeoutMs, "PATCH");
|
|
1091
|
+
}
|
|
1092
|
+
analyticsArchiveEventDefinition(input) {
|
|
1093
|
+
return this.call(`/analytics/sites/${encodeURIComponent(input.siteId)}/event-definitions/${encodeURIComponent(input.definitionId)}`, {}, this.timeoutMs, "DELETE");
|
|
1094
|
+
}
|
|
1095
|
+
analyticsTestEventDefinition(input) {
|
|
1096
|
+
const { siteId, definitionId, ...body } = input;
|
|
1097
|
+
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/event-definitions/${encodeURIComponent(definitionId)}/test`, body, this.timeoutMs, "POST");
|
|
1098
|
+
}
|
|
1099
|
+
analyticsTestActivationDestination(input) {
|
|
1100
|
+
return this.call(`/analytics/sites/${encodeURIComponent(input.siteId)}/activation-destinations/${encodeURIComponent(input.destinationId)}/test`, {}, this.timeoutMs, "POST");
|
|
1101
|
+
}
|
|
1102
|
+
analyticsListActivationReceipts(input) {
|
|
1103
|
+
const query = new URLSearchParams({ limit: String(input.limit) });
|
|
1104
|
+
if (input.cursor) query.set("cursor", input.cursor);
|
|
1105
|
+
return this.getJson(`/analytics/sites/${encodeURIComponent(input.siteId)}/activation-destinations/${encodeURIComponent(input.destinationId)}/receipts?${query}`);
|
|
1106
|
+
}
|
|
1107
|
+
analyticsRetryActivationDelivery(input) {
|
|
1108
|
+
return this.call(`/analytics/sites/${encodeURIComponent(input.siteId)}/activation-jobs/${encodeURIComponent(input.jobId)}/retry`, {}, this.timeoutMs, "POST");
|
|
1109
|
+
}
|
|
1110
|
+
analyticsReconcileConnection(input) {
|
|
1111
|
+
return this.call(`/analytics/sites/${encodeURIComponent(input.siteId)}/connections/${encodeURIComponent(input.connectionId)}/reconcile`, {}, this.timeoutMs, "POST");
|
|
1112
|
+
}
|
|
1113
|
+
analyticsRecordExternalEvent(input) {
|
|
1114
|
+
const { siteId, ...body } = input;
|
|
1115
|
+
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/external-events`, body, this.timeoutMs, "POST");
|
|
1116
|
+
}
|
|
1061
1117
|
analyticsImportCrmCsv(input) {
|
|
1062
1118
|
const { siteId, ...body } = input;
|
|
1063
1119
|
return this.call(`/analytics/sites/${encodeURIComponent(siteId)}/crm-imports`, body, this.timeoutMs, "POST");
|
|
@@ -1322,7 +1378,7 @@ render();
|
|
|
1322
1378
|
}
|
|
1323
1379
|
|
|
1324
1380
|
// src/version.ts
|
|
1325
|
-
var PACKAGE_VERSION = "0.
|
|
1381
|
+
var PACKAGE_VERSION = "0.68.0";
|
|
1326
1382
|
|
|
1327
1383
|
// src/mcp/input-field-descriptions.ts
|
|
1328
1384
|
var import_zod = require("zod");
|
|
@@ -1336,6 +1392,7 @@ var FIELD_DESCRIPTIONS = {
|
|
|
1336
1392
|
artifactSelection: "Explicit HTML artifact choice; omit to preserve the current selection.",
|
|
1337
1393
|
assetId: "Opaque image asset identifier returned by an image asset tool.",
|
|
1338
1394
|
attributionModel: "Attribution model applied to the report; defaults to first touch.",
|
|
1395
|
+
answered: "Optional call-answer state required for this conversion rule to match.",
|
|
1339
1396
|
authoringInstructions: "Presentation guidance for authors using this saved template; executable prompts or code are rejected.",
|
|
1340
1397
|
baseRevision: "Last revision read by the caller; supply it to reject an update if the record changed meanwhile.",
|
|
1341
1398
|
brand: "Validated visual-brand settings applied to the generated form.",
|
|
@@ -1350,6 +1407,7 @@ var FIELD_DESCRIPTIONS = {
|
|
|
1350
1407
|
consentText: "Optional consent disclosure displayed with the form submission control.",
|
|
1351
1408
|
content: "Complete content to route, validate, or store; do not substitute a partial excerpt when full content is required.",
|
|
1352
1409
|
conversionKind: "Optional normalized conversion event kind filter.",
|
|
1410
|
+
condition: "Declarative event conditions that must match before X-Ray creates a conversion.",
|
|
1353
1411
|
countryCode: "Two-letter country code used to filter analytics rows.",
|
|
1354
1412
|
createdAfter: "Inclusive ISO 8601 lower bound for asset creation time.",
|
|
1355
1413
|
createdBefore: "Exclusive ISO 8601 upper bound for asset creation time.",
|
|
@@ -1362,8 +1420,37 @@ var FIELD_DESCRIPTIONS = {
|
|
|
1362
1420
|
deviceClass: "Optional normalized device-class filter.",
|
|
1363
1421
|
dimension: "Dimension used to group returned analytics rows.",
|
|
1364
1422
|
eventName: "Optional normalized analytics event-name filter.",
|
|
1423
|
+
eventId: "Caller-owned canonical event identifier used for end-to-end deduplication.",
|
|
1424
|
+
eventKind: "Canonical event family used for journey storage and conversion-rule evaluation.",
|
|
1425
|
+
occurredAt: "ISO 8601 timestamp when the source event actually occurred.",
|
|
1426
|
+
sourceEventId: "Stable identifier assigned by the source system for idempotent ingestion.",
|
|
1427
|
+
sourceAccountRef: "Stable non-secret account identifier at the phone, CRM, or event source.",
|
|
1428
|
+
serviceConnectionRef: "Optional MCP Scraper connected-service identifier used for governed provider actions.",
|
|
1429
|
+
webhookSecret: "Provider webhook validation secret; it is encrypted at rest and never returned.",
|
|
1430
|
+
provider: "Supported phone, CRM, or advertising provider for this governed connection.",
|
|
1431
|
+
personId: "Opaque X-Ray person identifier returned by an attributed-people or journey result.",
|
|
1432
|
+
visitorId: "Consented first-party visitor identifier used for deterministic journey linking.",
|
|
1433
|
+
sessionId: "First-party session identifier used for deterministic journey linking.",
|
|
1434
|
+
personRef: "Opaque source-system person reference; do not place raw contact data here.",
|
|
1435
|
+
callId: "Stable call identifier assigned by the phone provider.",
|
|
1436
|
+
dealId: "Stable CRM deal or opportunity identifier.",
|
|
1437
|
+
orderId: "Stable order identifier used for conversion deduplication and reconciliation.",
|
|
1438
|
+
stageId: "Exact CRM stage identifier required for the conversion rule to match.",
|
|
1439
|
+
minimumCallDurationSeconds: "Minimum connected call duration required for the conversion rule to match.",
|
|
1440
|
+
excludedTags: "Event tags that prevent this conversion rule from matching, such as spam.",
|
|
1441
|
+
requiredTags: "Event tags that must all be present before this conversion rule matches.",
|
|
1442
|
+
defaultValueMinor: "Optional default conversion value in the currency minor unit.",
|
|
1443
|
+
defaultCurrency: "Three-letter default currency code used when a matched event has no value currency.",
|
|
1444
|
+
enabled: "Whether the new rule should begin evaluating events immediately.",
|
|
1445
|
+
schemaVersion: "Canonical X-Ray event schema version; use version 1.",
|
|
1446
|
+
canonicalUrl: "Canonical public page URL associated with the event.",
|
|
1447
|
+
sourceName: "Normalized acquisition-source name associated with the event.",
|
|
1448
|
+
valueMinor: "Monetary event value in the smallest unit of the supplied currency.",
|
|
1449
|
+
currency: "Three-letter ISO currency code for the event value.",
|
|
1450
|
+
clickIds: "Native advertising click identifiers preserved for deterministic offline conversion matching.",
|
|
1451
|
+
properties: "Bounded non-secret event properties used for reporting and declarative rule evaluation.",
|
|
1365
1452
|
expiresInDays: "Requested view-link lifetime in days; the server enforces its maximum.",
|
|
1366
|
-
externalDatasetId: "
|
|
1453
|
+
externalDatasetId: "Provider destination identifier already owned by the connected account.",
|
|
1367
1454
|
fields: "Ordered form-field definitions to render and validate for submissions.",
|
|
1368
1455
|
filename: "Original CSV filename retained for the import receipt; this is not a local path.",
|
|
1369
1456
|
folder: "Optional governed folder override inside the selected vault.",
|
|
@@ -1371,6 +1458,17 @@ var FIELD_DESCRIPTIONS = {
|
|
|
1371
1458
|
format: "Artifact serialization format to generate.",
|
|
1372
1459
|
from: "Inclusive ISO 8601 lower time bound.",
|
|
1373
1460
|
fromVault: "Vault containing the starting memory note; omit only when the note reference already resolves unambiguously.",
|
|
1461
|
+
gclid: "Google Click ID captured from the attributed landing URL.",
|
|
1462
|
+
gbraid: "Google app-to-web click identifier captured from the attributed landing URL.",
|
|
1463
|
+
wbraid: "Google web-to-app click identifier captured from the attributed landing URL.",
|
|
1464
|
+
fbclid: "Meta click identifier captured from the attributed landing URL.",
|
|
1465
|
+
fbp: "Meta first-party browser identifier captured with consent.",
|
|
1466
|
+
fbc: "Meta click cookie value captured or derived from fbclid with consent.",
|
|
1467
|
+
ttclid: "TikTok click identifier captured from the attributed landing URL.",
|
|
1468
|
+
rdt_cid: "Reddit click identifier captured from the attributed landing URL.",
|
|
1469
|
+
msclkid: "Microsoft Advertising click identifier captured from the attributed landing URL.",
|
|
1470
|
+
li_fat_id: "LinkedIn first-party attribution identifier captured from the landing URL.",
|
|
1471
|
+
snapclid: "Snapchat click identifier captured from the attributed landing URL.",
|
|
1374
1472
|
idempotencyKey: "Caller-owned opaque key for this intended operation; reuse only when retrying the same operation.",
|
|
1375
1473
|
includePreview: "When true, mint a short-lived authorized preview URL with the metadata result.",
|
|
1376
1474
|
limit: "Maximum rows or records to return on this page; use the returned cursor for more.",
|
|
@@ -1410,6 +1508,10 @@ var FIELD_DESCRIPTIONS = {
|
|
|
1410
1508
|
sourceKind: "Provenance category used to filter or label governed image assets.",
|
|
1411
1509
|
sourceRef: "Original source URL or opaque artifact reference preserved as image provenance.",
|
|
1412
1510
|
sourceSystem: "CRM system represented by the uploaded CSV.",
|
|
1511
|
+
triggerKind: "Browser trigger family: a page path, delegated element click, or delegated form submission.",
|
|
1512
|
+
pathMatch: "Whether the page trigger matches the exact path or every path beneath the supplied prefix.",
|
|
1513
|
+
selector: "Safe CSS selector used only to recognize a clicked element or submitted form; no DOM content is captured.",
|
|
1514
|
+
oncePerSession: "When true, emit this named browser event at most once in the current browser session.",
|
|
1413
1515
|
state: "Two-letter US state for the Local Sourcebook listing market.",
|
|
1414
1516
|
status: "Lifecycle status used to filter or update the selected records.",
|
|
1415
1517
|
submitLabel: "Optional text displayed on the form submission button.",
|
|
@@ -13493,8 +13595,145 @@ var AnalyticsCreateActivationInputSchema = {
|
|
|
13493
13595
|
siteId: import_zod10.z.string().uuid(),
|
|
13494
13596
|
platform: import_zod10.z.enum(["meta", "google", "tiktok", "reddit"]),
|
|
13495
13597
|
name: import_zod10.z.string().min(1).max(120),
|
|
13496
|
-
connectionRef: import_zod10.z.string().
|
|
13497
|
-
externalDatasetId: import_zod10.z.string().
|
|
13598
|
+
connectionRef: import_zod10.z.string().trim().min(1).max(240),
|
|
13599
|
+
externalDatasetId: import_zod10.z.string().trim().min(1).max(240)
|
|
13600
|
+
};
|
|
13601
|
+
var AnalyticsCreateConnectionInputSchema = {
|
|
13602
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13603
|
+
provider: import_zod10.z.enum(["callrail", "calltrackingmetrics", "twilio", "hubspot", "highlevel", "generic_crm"]),
|
|
13604
|
+
name: import_zod10.z.string().min(1).max(120),
|
|
13605
|
+
sourceAccountRef: import_zod10.z.string().min(1).max(240),
|
|
13606
|
+
serviceConnectionRef: import_zod10.z.string().max(240).optional(),
|
|
13607
|
+
webhookSecret: import_zod10.z.string().min(8).max(1e3).optional(),
|
|
13608
|
+
config: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.unknown()).optional()
|
|
13609
|
+
};
|
|
13610
|
+
var AnalyticsCreateRuleInputSchema = {
|
|
13611
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13612
|
+
name: import_zod10.z.string().min(1).max(120),
|
|
13613
|
+
conversionKind: import_zod10.z.string().regex(/^[a-z][a-z0-9_]{1,79}$/),
|
|
13614
|
+
condition: import_zod10.z.object({
|
|
13615
|
+
eventName: import_zod10.z.string().regex(/^[a-z][a-z0-9_]{1,79}$/).optional(),
|
|
13616
|
+
eventKind: import_zod10.z.enum(["browser", "form", "call", "crm", "transaction", "custom_server", "conversion", "delivery"]).optional(),
|
|
13617
|
+
source: import_zod10.z.string().min(1).max(80).optional(),
|
|
13618
|
+
stageId: import_zod10.z.string().max(240).optional(),
|
|
13619
|
+
status: import_zod10.z.enum(["open", "won", "lost", "spam", "unknown"]).optional(),
|
|
13620
|
+
answered: import_zod10.z.boolean().optional(),
|
|
13621
|
+
minimumCallDurationSeconds: import_zod10.z.number().int().min(0).max(86400).optional(),
|
|
13622
|
+
excludedTags: import_zod10.z.array(import_zod10.z.string().max(80)).max(30).default([]),
|
|
13623
|
+
requiredTags: import_zod10.z.array(import_zod10.z.string().max(80)).max(30).default([])
|
|
13624
|
+
}),
|
|
13625
|
+
defaultValueMinor: import_zod10.z.number().int().min(0).max(Number.MAX_SAFE_INTEGER).optional(),
|
|
13626
|
+
defaultCurrency: import_zod10.z.string().length(3).default("USD"),
|
|
13627
|
+
enabled: import_zod10.z.boolean().default(true)
|
|
13628
|
+
};
|
|
13629
|
+
var AnalyticsEventDefinitionFields = {
|
|
13630
|
+
name: import_zod10.z.string().min(1).max(120).describe("Human-readable definition name unique within the Site."),
|
|
13631
|
+
eventName: import_zod10.z.string().regex(/^[a-z][a-z0-9_]{1,79}$/).describe("Canonical event name emitted when this definition matches."),
|
|
13632
|
+
triggerKind: import_zod10.z.enum(["page", "click", "form", "semantic"]).describe("Declarative browser trigger. Semantic uses a data-xray-event tag."),
|
|
13633
|
+
path: import_zod10.z.string().startsWith("/").max(2e3).optional().describe("URL path required for page triggers."),
|
|
13634
|
+
pathMatch: import_zod10.z.enum(["exact", "prefix"]).default("exact").describe("Whether the page path must equal or begin with path."),
|
|
13635
|
+
selector: import_zod10.z.string().min(1).max(500).optional().describe("CSS selector evaluated only by the first-party Pixel for click or form triggers."),
|
|
13636
|
+
hostnames: import_zod10.z.array(import_zod10.z.string().min(1).max(253)).max(25).default([]).describe("Optional approved bare hostnames. Empty applies across the Site Pixel hosts."),
|
|
13637
|
+
metadata: import_zod10.z.object({
|
|
13638
|
+
value: import_zod10.z.number().finite().min(0).max(1e12).optional().describe("Optional non-negative conversion value in major currency units."),
|
|
13639
|
+
currency: import_zod10.z.string().regex(/^[A-Za-z]{3}$/).optional().describe("ISO 4217 currency code for value."),
|
|
13640
|
+
orderId: import_zod10.z.string().min(1).max(200).optional().describe("Optional stable order identifier."),
|
|
13641
|
+
contentId: import_zod10.z.string().min(1).max(200).optional().describe("Optional product or content identifier."),
|
|
13642
|
+
contentType: import_zod10.z.string().min(1).max(80).optional().describe("Optional bounded content category.")
|
|
13643
|
+
}).strict().optional().describe("Safe fixed event metadata; never form field values or arbitrary code."),
|
|
13644
|
+
oncePerSession: import_zod10.z.boolean().default(false).describe("Emit at most once per browser session when true."),
|
|
13645
|
+
enabled: import_zod10.z.boolean().default(true).describe("Whether the Pixel may emit this definition.")
|
|
13646
|
+
};
|
|
13647
|
+
var AnalyticsCreateEventDefinitionInputSchema = {
|
|
13648
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13649
|
+
...AnalyticsEventDefinitionFields
|
|
13650
|
+
};
|
|
13651
|
+
var AnalyticsUpdateEventDefinitionInputSchema = {
|
|
13652
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13653
|
+
definitionId: import_zod10.z.string().uuid().describe("Event definition id returned by analytics_list_event_definitions."),
|
|
13654
|
+
name: AnalyticsEventDefinitionFields.name.optional(),
|
|
13655
|
+
eventName: AnalyticsEventDefinitionFields.eventName.optional(),
|
|
13656
|
+
triggerKind: AnalyticsEventDefinitionFields.triggerKind.optional(),
|
|
13657
|
+
path: import_zod10.z.string().startsWith("/").max(2e3).nullable().optional().describe("Replacement page path; null clears it."),
|
|
13658
|
+
pathMatch: import_zod10.z.enum(["exact", "prefix"]).optional().describe("Replacement page path match mode."),
|
|
13659
|
+
selector: import_zod10.z.string().min(1).max(500).nullable().optional().describe("Replacement browser-only selector; null clears it."),
|
|
13660
|
+
hostnames: import_zod10.z.array(import_zod10.z.string().min(1).max(253)).max(25).optional().describe("Replacement approved bare-hostname scope."),
|
|
13661
|
+
metadata: AnalyticsEventDefinitionFields.metadata.unwrap().nullable().optional().describe("Replacement safe metadata; null clears it."),
|
|
13662
|
+
oncePerSession: import_zod10.z.boolean().optional().describe("Replacement once-per-browser-session behavior."),
|
|
13663
|
+
enabled: import_zod10.z.boolean().optional().describe("Replacement enabled state.")
|
|
13664
|
+
};
|
|
13665
|
+
var AnalyticsArchiveEventDefinitionInputSchema = {
|
|
13666
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13667
|
+
definitionId: import_zod10.z.string().uuid().describe("Event definition id returned by analytics_list_event_definitions.")
|
|
13668
|
+
};
|
|
13669
|
+
var AnalyticsTestEventDefinitionInputSchema = {
|
|
13670
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13671
|
+
definitionId: import_zod10.z.string().uuid().describe("Event definition id returned by analytics_list_event_definitions."),
|
|
13672
|
+
hostname: import_zod10.z.string().min(1).max(253).describe("Bare hostname observed by the browser."),
|
|
13673
|
+
path: import_zod10.z.string().startsWith("/").max(2e3).describe("URL path observed by the browser."),
|
|
13674
|
+
triggerKind: import_zod10.z.enum(["page", "click", "form", "semantic"]).describe("Trigger interaction being previewed."),
|
|
13675
|
+
tagEventName: import_zod10.z.string().regex(/^[a-z][a-z0-9_]{1,79}$/).optional().describe("Validated data-xray-event name observed by the browser."),
|
|
13676
|
+
selectorMatched: import_zod10.z.boolean().optional().describe("The browser-reported match result. The server never receives HTML or evaluates a selector.")
|
|
13677
|
+
};
|
|
13678
|
+
var AnalyticsTestActivationDestinationInputSchema = {
|
|
13679
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13680
|
+
destinationId: import_zod10.z.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations.")
|
|
13681
|
+
};
|
|
13682
|
+
var AnalyticsListActivationReceiptsInputSchema = {
|
|
13683
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13684
|
+
destinationId: import_zod10.z.string().uuid().describe("Activation destination id returned by analytics_list_activation_destinations."),
|
|
13685
|
+
limit: import_zod10.z.number().int().min(1).max(250).default(50).describe("Maximum receipt rows to return."),
|
|
13686
|
+
cursor: import_zod10.z.string().max(1e3).optional().describe("Opaque pagination cursor from the prior receipt page.")
|
|
13687
|
+
};
|
|
13688
|
+
var AnalyticsRetryActivationDeliveryInputSchema = {
|
|
13689
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13690
|
+
jobId: import_zod10.z.string().uuid().describe("Failed activation job id returned by analytics_list_activation_receipts.")
|
|
13691
|
+
};
|
|
13692
|
+
var AnalyticsReconcileConnectionInputSchema = {
|
|
13693
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13694
|
+
connectionId: import_zod10.z.string().uuid().describe("Phone or CRM connection id returned by analytics_list_connections.")
|
|
13695
|
+
};
|
|
13696
|
+
var AnalyticsRecordExternalEventInputSchema = {
|
|
13697
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13698
|
+
schemaVersion: import_zod10.z.literal(1).default(1),
|
|
13699
|
+
eventId: import_zod10.z.string().min(8).max(200),
|
|
13700
|
+
source: import_zod10.z.string().min(1).max(80),
|
|
13701
|
+
sourceAccountRef: import_zod10.z.string().min(1).max(240),
|
|
13702
|
+
sourceEventId: import_zod10.z.string().min(1).max(300),
|
|
13703
|
+
eventKind: import_zod10.z.enum(["browser", "form", "call", "crm", "transaction", "custom_server", "conversion", "delivery"]),
|
|
13704
|
+
eventName: import_zod10.z.string().regex(/^[a-z][a-z0-9_]{1,79}$/),
|
|
13705
|
+
occurredAt: import_zod10.z.string().datetime(),
|
|
13706
|
+
visitorId: import_zod10.z.string().max(160).optional(),
|
|
13707
|
+
sessionId: import_zod10.z.string().max(160).optional(),
|
|
13708
|
+
callId: import_zod10.z.string().max(240).optional(),
|
|
13709
|
+
dealId: import_zod10.z.string().max(240).optional(),
|
|
13710
|
+
orderId: import_zod10.z.string().max(240).optional(),
|
|
13711
|
+
personRef: import_zod10.z.string().max(240).optional(),
|
|
13712
|
+
path: import_zod10.z.string().max(2e3).optional(),
|
|
13713
|
+
canonicalUrl: import_zod10.z.string().url().max(3e3).optional(),
|
|
13714
|
+
sourceName: import_zod10.z.string().max(180).optional(),
|
|
13715
|
+
medium: import_zod10.z.string().max(180).optional(),
|
|
13716
|
+
campaign: import_zod10.z.string().max(240).optional(),
|
|
13717
|
+
valueMinor: import_zod10.z.number().int().min(0).max(2147483647).optional(),
|
|
13718
|
+
currency: import_zod10.z.string().length(3).optional(),
|
|
13719
|
+
clickIds: import_zod10.z.object({
|
|
13720
|
+
gclid: import_zod10.z.string().max(500).optional(),
|
|
13721
|
+
gbraid: import_zod10.z.string().max(500).optional(),
|
|
13722
|
+
wbraid: import_zod10.z.string().max(500).optional(),
|
|
13723
|
+
fbclid: import_zod10.z.string().max(500).optional(),
|
|
13724
|
+
fbp: import_zod10.z.string().max(500).optional(),
|
|
13725
|
+
fbc: import_zod10.z.string().max(500).optional(),
|
|
13726
|
+
ttclid: import_zod10.z.string().max(500).optional(),
|
|
13727
|
+
rdt_cid: import_zod10.z.string().max(500).optional(),
|
|
13728
|
+
msclkid: import_zod10.z.string().max(500).optional(),
|
|
13729
|
+
li_fat_id: import_zod10.z.string().max(500).optional(),
|
|
13730
|
+
snapclid: import_zod10.z.string().max(500).optional()
|
|
13731
|
+
}).optional(),
|
|
13732
|
+
properties: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.unknown()).optional()
|
|
13733
|
+
};
|
|
13734
|
+
var AnalyticsJourneyInputSchema = {
|
|
13735
|
+
siteId: import_zod10.z.string().uuid(),
|
|
13736
|
+
personId: import_zod10.z.string().uuid()
|
|
13498
13737
|
};
|
|
13499
13738
|
var AnalyticsCrmImportInputSchema = {
|
|
13500
13739
|
siteId: import_zod10.z.string().uuid(),
|
|
@@ -13632,7 +13871,12 @@ function registerAnalyticsMcpTools(server, executor) {
|
|
|
13632
13871
|
["analytics_list_campaign_links", "List Campaign Links", "List paginated tracked links and canonical UTM and ad hierarchy fields.", AnalyticsSiteResourceInputSchema, "analyticsListCampaignLinks"],
|
|
13633
13872
|
["analytics_list_forms", "List Analytics Forms", "List paginated Pixel-linked forms, embed snippets, fields, versions, and submission counts.", AnalyticsSiteResourceInputSchema, "analyticsListForms"],
|
|
13634
13873
|
["analytics_list_crm_imports", "List CRM Imports", "List paginated encrypted CSV import receipts without exposing contact PII in analytics.", AnalyticsSiteResourceInputSchema, "analyticsListCrmImports"],
|
|
13635
|
-
["analytics_list_activation_destinations", "List Ad Activation Destinations", "List Meta, Google, TikTok, and Reddit destinations with pending, delivered, and failed conversion counts.", AnalyticsSiteResourceInputSchema, "analyticsListActivationDestinations"]
|
|
13874
|
+
["analytics_list_activation_destinations", "List Ad Activation Destinations", "List Meta, Google, TikTok, and Reddit destinations with pending, delivered, and failed conversion counts.", AnalyticsSiteResourceInputSchema, "analyticsListActivationDestinations"],
|
|
13875
|
+
["analytics_list_connections", "List X-Ray Connections", "List phone, CRM, and webhook connections with honest readiness, receipt, and error state.", AnalyticsSiteResourceInputSchema, "analyticsListConnections"],
|
|
13876
|
+
["analytics_list_conversion_rules", "List Conversion Rules", "List deterministic versioned rules that turn canonical phone, CRM, transaction, and server events into conversions.", AnalyticsSiteResourceInputSchema, "analyticsListConversionRules"],
|
|
13877
|
+
["analytics_list_event_definitions", "List Browser Event Definitions", "List declarative page, click, and form-submit tags applied by the first-party X-Ray Pixel.", AnalyticsSiteResourceInputSchema, "analyticsListEventDefinitions"],
|
|
13878
|
+
["analytics_get_coverage", "Get Attribution Coverage", "Measure click-ID coverage and call/CRM journey join rates. Null rates mean there is not yet a denominator.", AnalyticsSiteResourceInputSchema, "analyticsGetCoverage"],
|
|
13879
|
+
["analytics_get_person_journey", "Get Person Journey", "Read one identified person timeline across sessions, immutable touches, calls, CRM stages, conversions, and ad-delivery receipts.", AnalyticsJourneyInputSchema, "analyticsGetPersonJourney"]
|
|
13636
13880
|
];
|
|
13637
13881
|
for (const [name, title, description, inputSchema, handler] of reads) {
|
|
13638
13882
|
server.registerTool(name, {
|
|
@@ -13644,12 +13888,16 @@ function registerAnalyticsMcpTools(server, executor) {
|
|
|
13644
13888
|
}, async (input) => executor[handler](input));
|
|
13645
13889
|
}
|
|
13646
13890
|
const writes = [
|
|
13647
|
-
["analytics_create_campaign_link", "Create Campaign Link", "Create one tracked campaign URL with canonical UTMs and optional ad-group, ad, and creative identifiers.", AnalyticsCreateCampaignLinkInputSchema, "analyticsCreateCampaignLink"],
|
|
13648
|
-
["analytics_create_form", "Create Pixel-linked Form", "Create and optionally publish a branded form that inherits the parent Pixel identity and session.", AnalyticsCreateFormInputSchema, "analyticsCreateForm"],
|
|
13649
|
-
["analytics_create_activation_destination", "Create Ad Activation Destination", "Create a Meta, Google, TikTok, or Reddit conversion destination using an existing provider connection reference.", AnalyticsCreateActivationInputSchema, "analyticsCreateActivation"],
|
|
13650
|
-
["
|
|
13891
|
+
["analytics_create_campaign_link", "Create Campaign Link", "Create one tracked campaign URL with canonical UTMs and optional ad-group, ad, and creative identifiers.", AnalyticsCreateCampaignLinkInputSchema, "analyticsCreateCampaignLink", false],
|
|
13892
|
+
["analytics_create_form", "Create Pixel-linked Form", "Create and optionally publish a branded form that inherits the parent Pixel identity and session.", AnalyticsCreateFormInputSchema, "analyticsCreateForm", false],
|
|
13893
|
+
["analytics_create_activation_destination", "Create Ad Activation Destination", "Create a Meta, Google, TikTok, or Reddit conversion destination using an existing provider connection reference.", AnalyticsCreateActivationInputSchema, "analyticsCreateActivation", false],
|
|
13894
|
+
["analytics_create_connection", "Create X-Ray Connection", "Create a CallRail, CallTrackingMetrics, Twilio, HubSpot, HighLevel, or generic CRM connection. Creation is configured-unverified until a signed receipt succeeds.", AnalyticsCreateConnectionInputSchema, "analyticsCreateConnection", false],
|
|
13895
|
+
["analytics_create_conversion_rule", "Create Conversion Rule", "Create a versioned declarative conversion rule. This is a safe event-routing layer, not arbitrary JavaScript like Google Tag Manager.", AnalyticsCreateRuleInputSchema, "analyticsCreateConversionRule", false],
|
|
13896
|
+
["analytics_create_event_definition", "Create Browser Event Definition", "Create a declarative page, click, or third-party form-submit event tag without injecting arbitrary JavaScript or capturing form fields.", AnalyticsCreateEventDefinitionInputSchema, "analyticsCreateEventDefinition", false],
|
|
13897
|
+
["analytics_record_external_event", "Record Server Event", "Idempotently record a canonical server-side call, CRM, transaction, or custom event and evaluate conversion rules.", AnalyticsRecordExternalEventInputSchema, "analyticsRecordExternalEvent", true],
|
|
13898
|
+
["analytics_import_crm_csv", "Import CRM CSV", "Map and stage a bounded CRM CSV import. Contact fields are encrypted and analytics retains only opaque person references and identity signals.", AnalyticsCrmImportInputSchema, "analyticsImportCrmCsv", false]
|
|
13651
13899
|
];
|
|
13652
|
-
for (const [name, title, description, inputSchema, handler] of writes) {
|
|
13900
|
+
for (const [name, title, description, inputSchema, handler, idempotent] of writes) {
|
|
13653
13901
|
server.registerTool(name, {
|
|
13654
13902
|
title,
|
|
13655
13903
|
description,
|
|
@@ -13659,11 +13907,35 @@ function registerAnalyticsMcpTools(server, executor) {
|
|
|
13659
13907
|
title,
|
|
13660
13908
|
readOnlyHint: false,
|
|
13661
13909
|
destructiveHint: false,
|
|
13662
|
-
idempotentHint:
|
|
13910
|
+
idempotentHint: idempotent,
|
|
13663
13911
|
openWorldHint: false
|
|
13664
13912
|
}
|
|
13665
13913
|
}, async (input) => executor[handler](input));
|
|
13666
13914
|
}
|
|
13915
|
+
const operations = [
|
|
13916
|
+
["analytics_update_event_definition", "Update Browser Event Definition", "Update a versioned declarative browser event definition. Null path, selector, or metadata clears that optional field.", AnalyticsUpdateEventDefinitionInputSchema, "analyticsUpdateEventDefinition", false, false, false, false],
|
|
13917
|
+
["analytics_archive_event_definition", "Archive Browser Event Definition", "Idempotently archive a browser event definition so the Pixel no longer receives it.", AnalyticsArchiveEventDefinitionInputSchema, "analyticsArchiveEventDefinition", false, true, true, false],
|
|
13918
|
+
["analytics_test_event_definition", "Test Browser Event Definition", "Preview a definition against validated hostname, path, trigger, tag, and browser-reported selector-match facts. This never accepts HTML or executes selectors server-side.", AnalyticsTestEventDefinitionInputSchema, "analyticsTestEventDefinition", true, true, false, false],
|
|
13919
|
+
["analytics_test_activation_destination", "Test Ad Activation Destination", "Send the provider-specific verification test for a configured activation destination and return its safe receipt.", AnalyticsTestActivationDestinationInputSchema, "analyticsTestActivationDestination", false, false, false, true],
|
|
13920
|
+
["analytics_list_activation_receipts", "List Ad Activation Receipts", "List bounded provider delivery receipts for one activation destination.", AnalyticsListActivationReceiptsInputSchema, "analyticsListActivationReceipts", true, true, false, false],
|
|
13921
|
+
["analytics_retry_activation_delivery", "Retry Ad Activation Delivery", "Requeue one failed or dead-lettered activation job. This may cause an external provider delivery.", AnalyticsRetryActivationDeliveryInputSchema, "analyticsRetryActivationDelivery", false, false, false, true],
|
|
13922
|
+
["analytics_reconcile_connection", "Reconcile X-Ray Connection", "Reconcile one phone or CRM connection through its configured provider API and return readiness and checkpoint evidence.", AnalyticsReconcileConnectionInputSchema, "analyticsReconcileConnection", false, true, false, true]
|
|
13923
|
+
];
|
|
13924
|
+
for (const [name, title, description, inputSchema, handler, readOnly, idempotent, destructive, openWorld] of operations) {
|
|
13925
|
+
server.registerTool(name, {
|
|
13926
|
+
title,
|
|
13927
|
+
description,
|
|
13928
|
+
inputSchema,
|
|
13929
|
+
outputSchema: recordOutputSchema(name, AnalyticsGenericOutputSchema),
|
|
13930
|
+
annotations: {
|
|
13931
|
+
title,
|
|
13932
|
+
readOnlyHint: readOnly,
|
|
13933
|
+
destructiveHint: destructive,
|
|
13934
|
+
idempotentHint: idempotent,
|
|
13935
|
+
openWorldHint: openWorld
|
|
13936
|
+
}
|
|
13937
|
+
}, async (input) => executor[handler](input));
|
|
13938
|
+
}
|
|
13667
13939
|
server.registerTool("analytics_get_health", {
|
|
13668
13940
|
title: "Analytics Pixel Health",
|
|
13669
13941
|
description: "Read ingestion health for one analytics Business, including Pixel activity, last event and conversion timestamps, rollup state, and rejection signals.",
|
|
@@ -18808,7 +19080,7 @@ var HostedMemoryMcpToolExecutor = class {
|
|
|
18808
19080
|
|
|
18809
19081
|
// release-message.json
|
|
18810
19082
|
var release_message_default = {
|
|
18811
|
-
message: "
|
|
19083
|
+
message: "X-Ray now unifies browser, phone, CRM, and checkout conversions and delivers eligible events through verified advertising destinations with durable receipts."
|
|
18812
19084
|
};
|
|
18813
19085
|
|
|
18814
19086
|
// src/install-terminal.ts
|
|
@@ -18863,7 +19135,7 @@ function renderInstallTerminal(options) {
|
|
|
18863
19135
|
"1/1 install surfaces ready",
|
|
18864
19136
|
colorize(`Newest in v${options.version}: ${release_message_default.message}`, "lime", color),
|
|
18865
19137
|
"",
|
|
18866
|
-
`${colorize("Tools", "cyan", color)} ${colorize("(
|
|
19138
|
+
`${colorize("Tools", "cyan", color)} ${colorize("(275 MCP tools)", "muted", color)}`,
|
|
18867
19139
|
toolRow("search", ["harvest_paa", "search_serp", "maps_search", "maps_place_intel"], color),
|
|
18868
19140
|
toolRow("extract", ["extract_url", "map_site_urls", "extract_site", "audit_site", "directory_workflow"], color),
|
|
18869
19141
|
toolRow("build", ["create_editorial_reading_room", "rank_tracker_workflow", "portable HTML"], color),
|
|
@@ -13,20 +13,20 @@ import {
|
|
|
13
13
|
registerScheduledResultsMcpTools,
|
|
14
14
|
registerSerpIntelligenceCaptureTools,
|
|
15
15
|
resolveDeploymentProfile
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-V6H7NGSV.js";
|
|
17
17
|
import "../chunk-PGJQDMC2.js";
|
|
18
18
|
import "../chunk-2L4C4DAZ.js";
|
|
19
19
|
import "../chunk-ES25GP6C.js";
|
|
20
20
|
import {
|
|
21
21
|
renderInstallTerminal
|
|
22
|
-
} from "../chunk-
|
|
22
|
+
} from "../chunk-XKWTKQ7Y.js";
|
|
23
23
|
import "../chunk-VXLU74YZ.js";
|
|
24
24
|
import "../chunk-GGZEC22A.js";
|
|
25
25
|
import {
|
|
26
26
|
PACKAGE_VERSION
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-TV76V5OO.js";
|
|
28
28
|
import "../chunk-DNM65UCK.js";
|
|
29
|
-
import "../chunk-
|
|
29
|
+
import "../chunk-WNL42AMC.js";
|
|
30
30
|
import "../chunk-65FTMB7G.js";
|
|
31
31
|
|
|
32
32
|
// bin/mcp-stdio-server.ts
|