@cookiemunch/mcp 0.2.0 → 0.4.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/bin.cjs +410 -200
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-PLBLLTYO.js → chunk-SKCEQX3L.js} +411 -201
- package/dist/chunk-SKCEQX3L.js.map +1 -0
- package/dist/index.cjs +410 -200
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-PLBLLTYO.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import { createCookieMunch } from "@cookiemunch/sdk";
|
|
4
4
|
|
|
5
5
|
// src/tools.ts
|
|
6
|
-
import { z as
|
|
6
|
+
import { z as z5 } from "zod";
|
|
7
7
|
|
|
8
8
|
// src/tools-config.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -90,7 +90,7 @@ function registerConfigTools(tool, client) {
|
|
|
90
90
|
const setLanguagesSchema = z.object({
|
|
91
91
|
cbid: z.string().describe("Site identifier (cbid)."),
|
|
92
92
|
defaultCulture: z.string().optional().describe('Default locale/culture code, e.g. "en", "fr". Stored in i18n.defaultCulture.'),
|
|
93
|
-
autoDetect: z.boolean().optional().describe(
|
|
93
|
+
autoDetect: z.union([z.boolean(), z.literal("page")]).optional().describe(`true: follow the visitor's browser language; false: defaultCulture for everyone; "page": follow the page's <html lang>, then the browser. Stored in i18n.autoDetect.`),
|
|
94
94
|
translations: z.record(z.record(z.unknown())).optional().describe("Per-locale banner copy overrides. Merged onto banner.i18n (locale keys preserved)."),
|
|
95
95
|
overrides: z.record(z.object({ banner: z.record(z.string()).optional(), categories: z.record(z.object({ label: z.string().optional(), description: z.string().optional() })).optional() })).optional().describe("The site's own copy per language, keyed by tag (de, pt-BR): { banner: { title, body, \u2026 }, categories: { <id>: { label, description } } }. Each language given replaces its entry in i18n.overrides; other languages are kept. Strings the site wrote are shown as written in any language without an override \u2014 stock translations never replace them.")
|
|
96
96
|
});
|
|
@@ -191,7 +191,7 @@ function registerConfigTools(tool, client) {
|
|
|
191
191
|
preset: z.enum(["bar", "box", "full"]).optional().describe("Named shape that sets type/secondLayer (and layout for box): bar = slim one-row bar + categories in a modal; box = centred card + modal; full = every category in the first layer."),
|
|
192
192
|
secondLayer: z.enum(["expand", "popup", "modal"]).optional().describe("Where the categories open from an inline banner."),
|
|
193
193
|
density: z.enum(["comfortable", "compact"]).optional().describe("compact = one-row bar from 760px wide."),
|
|
194
|
-
theme: z.record(z.unknown()).optional().describe("Partial ThemeTokens \u2014 deep-merged onto the existing banner theme."),
|
|
194
|
+
theme: z.record(z.unknown()).optional().describe("Partial ThemeTokens \u2014 deep-merged onto the existing banner theme. Includes `scrollbar`: { style: themed|thin|native|hidden, thumb?, thumbHover?, track?, width? 4\u201316, radius? 0\u2013999 }."),
|
|
195
195
|
content: z.record(z.unknown()).optional().describe("Partial BannerContent \u2014 banner copy overrides (title, body, button labels, policyUrl, etc.).")
|
|
196
196
|
});
|
|
197
197
|
tool(
|
|
@@ -538,12 +538,16 @@ function registerPlatformTools(tool, client) {
|
|
|
538
538
|
"connect_dsar_executor",
|
|
539
539
|
"Connect a system that runs part of a rights request \u2014 an identity platform, a CRM, anything with a rights API. Cookie Munch is not specific to any platform: the `profile` describes that system's API (paths, the words it uses for export/erase, its status vocabulary, how it signs webhooks), so connecting a new one needs no code. The secret key is stored encrypted and never returned; the response carries the webhook URL to configure in that system. Sub-tasks open automatically once a request reaches fulfilment (after identity verification), and completions are picked up by webhook or by polling.",
|
|
540
540
|
{
|
|
541
|
-
|
|
542
|
-
|
|
541
|
+
preset: z2.string().optional().describe("Build profile (and, unless the preset takes baseUrl as a param, baseUrl) from a versioned preset instead of sending profile. list_dsar_executor_presets names them, what each needs, and which wait on another platform."),
|
|
542
|
+
presetVersion: z2.number().int().optional().describe("With preset: the version to build. Default the latest."),
|
|
543
|
+
orgId: z2.string().optional().describe("A preset param, when the preset's params list it."),
|
|
544
|
+
atlasIdAppId: z2.string().optional().describe("A preset param, when the preset's params list it: the identity platform's app id, so an erasure also revokes the app's grant."),
|
|
545
|
+
system: z2.string().optional().describe("The name this connection answers to in a plan, e.g. identity or crm. Required unless the preset has a default."),
|
|
546
|
+
baseUrl: z2.string().optional().describe("The system's public https origin. Required unless the preset sets it."),
|
|
543
547
|
secretKey: z2.string().describe("Its API key, with whatever scope that system needs to export and erase a user."),
|
|
544
548
|
webhookSecret: z2.string().optional().describe("Signing secret of its webhook endpoint. Optional: polling closes tasks without it."),
|
|
545
549
|
auto: z2.boolean().optional().describe("Open a sub-task automatically when a request reaches fulfilment. Default true."),
|
|
546
|
-
profile: z2.record(z2.unknown()).describe("How to drive that system: { open, poll, statuses } required, plus optional subjectLookup, auth, idempotencyHeader and webhook.
|
|
550
|
+
profile: z2.record(z2.unknown()).optional().describe("How to drive that system: { open, poll, statuses } required, plus optional subjectLookup, auth, idempotencyHeader, grantRevoke and webhook. Omit it when using preset."),
|
|
547
551
|
dryRun: z2.boolean().optional().describe("Validate everything and answer the connection that would be created, storing nothing.")
|
|
548
552
|
},
|
|
549
553
|
(a) => {
|
|
@@ -551,6 +555,28 @@ function registerPlatformTools(tool, client) {
|
|
|
551
555
|
return dryRun === true ? client.fulfillment.dryRunConnectExecutor(input) : client.fulfillment.connectExecutor(input);
|
|
552
556
|
}
|
|
553
557
|
);
|
|
558
|
+
tool(
|
|
559
|
+
"list_dsar_executor_presets",
|
|
560
|
+
"The versioned executor presets: each one's name, params, latest version, and whether it is usable now or waits on another platform's API (waitingOn names the platform and its spec items). Also this org's canary address for connection tests. Read-only.",
|
|
561
|
+
{},
|
|
562
|
+
() => client.fulfillment.executorPresets()
|
|
563
|
+
);
|
|
564
|
+
tool(
|
|
565
|
+
"upgrade_dsar_executor_preset",
|
|
566
|
+
"Rebuild a connection's profile and address from its preset's latest version (or presetVersion), keeping its id, credentials, system and scope \u2014 or adopt a preset on a hand-written connection by naming it. Answers with a diff. Use dryRun first: the answer shows exactly what would change and nothing is stored.",
|
|
567
|
+
{
|
|
568
|
+
id: z2.string().describe("The connection id."),
|
|
569
|
+
preset: z2.string().optional().describe("Only to adopt a preset on a connection that has none."),
|
|
570
|
+
presetVersion: z2.number().int().optional(),
|
|
571
|
+
orgId: z2.string().optional(),
|
|
572
|
+
atlasIdAppId: z2.string().optional(),
|
|
573
|
+
dryRun: z2.boolean().optional().describe("Answer the diff and change nothing.")
|
|
574
|
+
},
|
|
575
|
+
(a) => {
|
|
576
|
+
const { id, dryRun, ...input } = a;
|
|
577
|
+
return dryRun === true ? client.fulfillment.dryRunUpgradeExecutorPreset(id, input) : client.fulfillment.upgradeExecutorPreset(id, input);
|
|
578
|
+
}
|
|
579
|
+
);
|
|
554
580
|
tool(
|
|
555
581
|
"test_dsar_executor_webhook",
|
|
556
582
|
"Would this webhook delivery from a connected system verify? Runs the receiver's exact check (headers, timestamp tolerance, prefix, HMAC) on headers and a raw body you supply, acts on nothing, and returns { verified, stage, reason } naming the stage that failed. `body` must be the raw request body string, byte for byte. Read-only.",
|
|
@@ -584,15 +610,17 @@ function registerPlatformTools(tool, client) {
|
|
|
584
610
|
);
|
|
585
611
|
tool(
|
|
586
612
|
"test_dsar_executor",
|
|
587
|
-
"Try a connected system against one email WITHOUT filing a rights request. Runs its subject lookup and returns the raw upstream answers (credentials removed) and a one-line verdict. The open step is rendered but not sent, unless open is true on an export, which opens and polls a real export once. An erasure is never sent by a test.",
|
|
613
|
+
"Try a connected system against one email (or the org canary, canary: true) WITHOUT filing a rights request. Runs its subject lookup and returns the raw upstream answers (credentials removed) and a one-line verdict; code base_url_redirects means its baseUrl redirects and the verdict names where. The open step is rendered but not sent, unless open is true on an export, which opens and polls a real export once. An erasure is never sent by a test.",
|
|
588
614
|
{
|
|
589
615
|
id: z2.string().describe("The connection id."),
|
|
590
|
-
email: z2.string().describe("The address to look up."),
|
|
616
|
+
email: z2.string().optional().describe("The address to look up. Omit it with canary."),
|
|
617
|
+
canary: z2.boolean().optional().describe("Use this org's canary address \u2014 no real person involved. A canary locate also updates the connection's health."),
|
|
591
618
|
operation: z2.enum(["locate", "export", "erase"]).optional().describe("Default locate."),
|
|
592
619
|
open: z2.boolean().optional().describe("For export only: open a real export and poll it once.")
|
|
593
620
|
},
|
|
594
621
|
(a) => client.fulfillment.testExecutor(a.id, {
|
|
595
|
-
email: a.email,
|
|
622
|
+
...typeof a.email === "string" ? { email: a.email } : {},
|
|
623
|
+
...a.canary === true ? { canary: true } : {},
|
|
596
624
|
...a.operation ? { operation: a.operation } : {},
|
|
597
625
|
...typeof a.open === "boolean" ? { open: a.open } : {}
|
|
598
626
|
})
|
|
@@ -678,31 +706,107 @@ function registerPlatformTools(tool, client) {
|
|
|
678
706
|
);
|
|
679
707
|
}
|
|
680
708
|
|
|
681
|
-
// src/tools-
|
|
709
|
+
// src/tools-integrations.ts
|
|
682
710
|
import { z as z3 } from "zod";
|
|
711
|
+
function registerIntegrationTools(tool, client) {
|
|
712
|
+
const updateSiteSchema = z3.object({
|
|
713
|
+
cbid: z3.string().describe("Site identifier (cbid)."),
|
|
714
|
+
domain: z3.string().optional().describe("New domain, a bare hostname. A move clears verification: verify the new domain afterwards."),
|
|
715
|
+
name: z3.string().nullable().optional().describe("Display name data subjects see on the rights page and in notices; null clears it."),
|
|
716
|
+
aliases: z3.array(z3.string()).optional().describe("Other hosts serving the site (replaces the list; [] clears it). Accepted consent origins, never verified claims."),
|
|
717
|
+
dryRun: z3.boolean().optional().describe("Answer with the diff and its effects, storing nothing.")
|
|
718
|
+
});
|
|
719
|
+
tool(
|
|
720
|
+
"update_site",
|
|
721
|
+
"Rename or move a site: its domain, display name and aliases. The cbid and the consent ledger stay. Moving the domain clears verification; the scanner and preview links follow the new domain. Use dryRun first to see the diff and every effect.",
|
|
722
|
+
updateSiteSchema.shape,
|
|
723
|
+
(a) => {
|
|
724
|
+
const { cbid, dryRun, ...patch } = updateSiteSchema.parse(a);
|
|
725
|
+
return client.sites.update(cbid, patch, { dryRun });
|
|
726
|
+
}
|
|
727
|
+
);
|
|
728
|
+
tool(
|
|
729
|
+
"integration_health",
|
|
730
|
+
"Check every link a site\u2019s privacy wiring depends on: the domain, the snippet and CSP on the live page, connected systems (base URL redirects, a test lookup), webhooks, partner links, Atlas cookie_consent, cookies needing review, the rights page, the mail provider and the request SLA. Each row has ok (null = could not check) and a fix hint. Read-only.",
|
|
731
|
+
{ cbid: z3.string().optional().describe("Site identifier; optional when the org has one site.") },
|
|
732
|
+
(a) => client.integrationHealth(a.cbid)
|
|
733
|
+
);
|
|
734
|
+
const provisionSchema = z3.object({
|
|
735
|
+
product: z3.string().describe("A slug naming the product."),
|
|
736
|
+
domain: z3.string().describe("The product\u2019s domain (bare hostname)."),
|
|
737
|
+
name: z3.string().optional(),
|
|
738
|
+
aliases: z3.array(z3.string()).optional(),
|
|
739
|
+
cbid: z3.string().optional().describe("Update this site instead of matching by domain."),
|
|
740
|
+
atlas: z3.object({ secretKey: z3.string(), cookieConsent: z3.boolean().optional(), dsrWebhook: z3.boolean().optional(), frontendApiHost: z3.string().optional().describe("Your Atlas frontend API host (auth.example.com): declares the Atlas sign-in cookies on the site.") }).optional().describe("Atlas secret key (sk_\u2026) \u2014 used for this call only, never stored or returned."),
|
|
741
|
+
forumulate: z3.object({ token: z3.string(), orgId: z3.string(), consent: z3.boolean().optional(), executorKey: z3.boolean().optional(), label: z3.string().optional() }).optional().describe("Forumulate org token \u2014 used for this call only, never stored or returned."),
|
|
742
|
+
rightsApi: z3.object({ baseUrl: z3.string(), secretKey: z3.string(), profilePreset: z3.string().optional() }).optional(),
|
|
743
|
+
dryRun: z3.boolean().optional().describe("Report what each step would do; write nothing on any platform. Run this first.")
|
|
744
|
+
});
|
|
745
|
+
tool(
|
|
746
|
+
"provision_product",
|
|
747
|
+
"Wire a product\u2019s privacy in one call: create or update the site, connected systems, the Atlas request-completion webhook and hosted-page consent banner, and Forumulate consent and executor key. Writes across three platforms; run with dryRun first. Idempotent: a re-run answers every step unchanged. No secret appears in the result.",
|
|
748
|
+
provisionSchema.shape,
|
|
749
|
+
(a) => {
|
|
750
|
+
const { dryRun, ...input } = provisionSchema.parse(a);
|
|
751
|
+
return client.provision(input, { dryRun });
|
|
752
|
+
}
|
|
753
|
+
);
|
|
754
|
+
tool(
|
|
755
|
+
"list_site_partners",
|
|
756
|
+
"Which partner platforms (Forumulate, Atlas) receive this site\u2019s consent events, each with its status, and which partners are on offer. Read-only.",
|
|
757
|
+
{ cbid: z3.string() },
|
|
758
|
+
(a) => client.sites.listPartners(a.cbid)
|
|
759
|
+
);
|
|
760
|
+
const linkSchema = z3.object({
|
|
761
|
+
cbid: z3.string(),
|
|
762
|
+
partner: z3.enum(["forumulate", "atlas"]),
|
|
763
|
+
externalId: z3.string().describe("The partner\u2019s id for the receiving account, e.g. a Forumulate organisation id."),
|
|
764
|
+
label: z3.string().optional().describe('Shown with the partner name, e.g. "docs".'),
|
|
765
|
+
events: z3.array(z3.enum(["consent.recorded", "consent.withdrawn"])).optional(),
|
|
766
|
+
dryRun: z3.boolean().optional()
|
|
767
|
+
});
|
|
768
|
+
tool(
|
|
769
|
+
"link_site_partner",
|
|
770
|
+
"Grant a partner platform this site\u2019s consent events (they start flowing out to it). No secret is created: deliveries are signed with Cookie Munch\u2019s own key. Idempotent.",
|
|
771
|
+
linkSchema.shape,
|
|
772
|
+
(a) => {
|
|
773
|
+
const { cbid, dryRun, ...input } = linkSchema.parse(a);
|
|
774
|
+
return client.sites.linkPartner(cbid, input, { dryRun });
|
|
775
|
+
}
|
|
776
|
+
);
|
|
777
|
+
tool(
|
|
778
|
+
"unlink_site_partner",
|
|
779
|
+
"Revoke a partner link: no further consent events go to that partner.",
|
|
780
|
+
{ cbid: z3.string(), linkId: z3.string() },
|
|
781
|
+
(a) => client.sites.unlinkPartner(a.cbid, a.linkId)
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
// src/tools-rights-page.ts
|
|
786
|
+
import { z as z4 } from "zod";
|
|
683
787
|
function registerRightsTools(tool, client) {
|
|
684
|
-
const cbid = { cbid:
|
|
788
|
+
const cbid = { cbid: z4.string().describe("Site identifier (cbid). Must belong to your org.") };
|
|
685
789
|
const base = {
|
|
686
|
-
baseUpdatedAt:
|
|
790
|
+
baseUpdatedAt: z4.union([z4.number().int(), z4.string(), z4.null()]).optional().describe("The draft\u2019s updatedAt from your last read (null if it had none). If someone saved since, the write is refused with 409 draft_conflict and the current draft; omit to overwrite regardless.")
|
|
687
791
|
};
|
|
688
792
|
const baseOpt = (a) => a.baseUpdatedAt !== void 0 ? { baseUpdatedAt: a.baseUpdatedAt } : {};
|
|
689
793
|
tool("get_rights_page", "Read the site\u2019s rights page DRAFT (the default page until first saved), with warnings that would block publishing.", cbid, (a) => client.rightsPage.get(a.cbid));
|
|
690
794
|
tool(
|
|
691
795
|
"update_rights_page",
|
|
692
796
|
"Replace the rights page draft with a full document (theme, sections, form, i18n, seo, customCss). Nothing goes live until publish_rights_page. Prefer patch_rights_page for small changes and preview_rights_page when unsure. Pass baseUpdatedAt (from get_rights_page) to avoid overwriting someone else\u2019s save: a mismatch is 409 draft_conflict with the current draft.",
|
|
693
|
-
{ ...cbid, page:
|
|
797
|
+
{ ...cbid, page: z4.record(z4.unknown()).describe("The whole RightsPage document (v: 1)."), ...base },
|
|
694
798
|
(a) => client.rightsPage.put(a.cbid, a.page, baseOpt(a))
|
|
695
799
|
);
|
|
696
800
|
tool(
|
|
697
801
|
"patch_rights_page",
|
|
698
802
|
"Change part of the rights page draft: objects merge, arrays (sections, request types, fields) replace whole, null removes a field. baseUpdatedAt works as on update_rights_page (409 draft_conflict).",
|
|
699
|
-
{ ...cbid, patch:
|
|
803
|
+
{ ...cbid, patch: z4.record(z4.unknown()), ...base },
|
|
700
804
|
(a) => client.rightsPage.patch(a.cbid, a.patch, baseOpt(a))
|
|
701
805
|
);
|
|
702
806
|
tool(
|
|
703
807
|
"preview_rights_page",
|
|
704
808
|
'Validate a rights-page write WITHOUT saving: returns the document as it would be stored and any publish warnings. mode "patch" (default) or "put".',
|
|
705
|
-
{ ...cbid, page:
|
|
809
|
+
{ ...cbid, page: z4.record(z4.unknown()), mode: z4.enum(["patch", "put"]).optional() },
|
|
706
810
|
(a) => client.rightsPage.dryRun(a.cbid, a.page, { mode: a.mode ?? "patch" })
|
|
707
811
|
);
|
|
708
812
|
tool("get_published_rights_page", "Read the LIVE rights page document (404 not_published while the site shows the default page).", cbid, (a) => client.rightsPage.getPublished(a.cbid));
|
|
@@ -716,14 +820,14 @@ function registerRightsTools(tool, client) {
|
|
|
716
820
|
tool(
|
|
717
821
|
"rollback_rights_page",
|
|
718
822
|
"Publish an earlier version of the rights page again (as a new version): it goes live at once and REPLACES the current draft, so unpublished edits are lost and cannot be recovered (versions hold only published documents). Pass baseUpdatedAt (from get_rights_page) to refuse with 409 draft_conflict if anyone saved the draft since you read it.",
|
|
719
|
-
{ ...cbid, version:
|
|
823
|
+
{ ...cbid, version: z4.number().int().min(1), ...base },
|
|
720
824
|
(a) => client.rightsPage.rollback(a.cbid, a.version, baseOpt(a))
|
|
721
825
|
);
|
|
722
826
|
}
|
|
723
827
|
function registerRightsPageTools(tool, client) {
|
|
724
|
-
const site =
|
|
828
|
+
const site = z4.object({ cbid: z4.string().describe("Site identifier (cbid). Must belong to your org.") });
|
|
725
829
|
const host = site.extend({
|
|
726
|
-
hostname:
|
|
830
|
+
hostname: z4.string().describe("The custom hostname, e.g. privacy.example.com (unicode or punycode).")
|
|
727
831
|
});
|
|
728
832
|
tool(
|
|
729
833
|
"list_rights_page_domains",
|
|
@@ -863,10 +967,10 @@ function registerTools(server, client) {
|
|
|
863
967
|
}
|
|
864
968
|
});
|
|
865
969
|
};
|
|
866
|
-
const cbid = { cbid:
|
|
970
|
+
const cbid = { cbid: z5.string().describe("Site identifier (cbid). Must belong to your org.") };
|
|
867
971
|
const range = {
|
|
868
|
-
from:
|
|
869
|
-
to:
|
|
972
|
+
from: z5.number().optional().describe("Epoch-ms lower bound."),
|
|
973
|
+
to: z5.number().optional().describe("Epoch-ms upper bound.")
|
|
870
974
|
};
|
|
871
975
|
tool(
|
|
872
976
|
"whoami",
|
|
@@ -884,19 +988,19 @@ function registerTools(server, client) {
|
|
|
884
988
|
tool(
|
|
885
989
|
"get_site",
|
|
886
990
|
"One site: its domain, cbid and verification status. Read-only.",
|
|
887
|
-
{ cbid:
|
|
991
|
+
{ cbid: z5.string() },
|
|
888
992
|
(a) => client.sites.get(a.cbid)
|
|
889
993
|
);
|
|
890
994
|
tool(
|
|
891
995
|
"get_site_banner",
|
|
892
996
|
"Which banner design a site uses, or bannerId null when none is assigned. Read-only.",
|
|
893
|
-
{ cbid:
|
|
997
|
+
{ cbid: z5.string() },
|
|
894
998
|
(a) => client.sites.banner(a.cbid)
|
|
895
999
|
);
|
|
896
1000
|
tool(
|
|
897
1001
|
"get_privacy_policy",
|
|
898
1002
|
"Generate the site's privacy and cookie policy as Markdown, naming the org's data controller. Needs a contact email: the one given, else the org controller's, else the owner's. Read-only \u2014 nothing is published.",
|
|
899
|
-
{ cbid:
|
|
1003
|
+
{ cbid: z5.string(), contactEmail: z5.string().optional(), effectiveDate: z5.string().optional().describe("YYYY-MM-DD; defaults to today."), jurisdictions: z5.array(z5.string()).optional() },
|
|
900
1004
|
(a) => client.sites.policy(a.cbid, {
|
|
901
1005
|
...a.contactEmail ? { contactEmail: a.contactEmail } : {},
|
|
902
1006
|
...a.effectiveDate ? { effectiveDate: a.effectiveDate } : {},
|
|
@@ -906,7 +1010,7 @@ function registerTools(server, client) {
|
|
|
906
1010
|
tool(
|
|
907
1011
|
"set_ad_personalization",
|
|
908
1012
|
"Add or remove the separate 'personalised ads' choice on the site's live banner. With it on, accepting marketing no longer implies personalised ads unless `default` is true.",
|
|
909
|
-
{ cbid:
|
|
1013
|
+
{ cbid: z5.string(), enabled: z5.boolean(), default: z5.boolean().optional(), label: z5.string().optional() },
|
|
910
1014
|
(a) => client.sites.setAdPersonalization(a.cbid, {
|
|
911
1015
|
enabled: a.enabled,
|
|
912
1016
|
...a.default !== void 0 ? { default: a.default } : {},
|
|
@@ -917,11 +1021,11 @@ function registerTools(server, client) {
|
|
|
917
1021
|
"analyze_session",
|
|
918
1022
|
"Analyse a captured browsing session against the consent it ran under: which trackers fired after the visitor opted out, and what personal data left the page. Read-only.",
|
|
919
1023
|
{
|
|
920
|
-
cbid:
|
|
921
|
-
har:
|
|
922
|
-
requests:
|
|
923
|
-
consent:
|
|
924
|
-
gpc:
|
|
1024
|
+
cbid: z5.string(),
|
|
1025
|
+
har: z5.unknown().optional().describe("A HAR export of the session."),
|
|
1026
|
+
requests: z5.array(z5.unknown()).optional().describe("Or the requests directly."),
|
|
1027
|
+
consent: z5.record(z5.string(), z5.boolean()).optional(),
|
|
1028
|
+
gpc: z5.boolean().optional()
|
|
925
1029
|
},
|
|
926
1030
|
(a) => client.sites.analyzeSession(a.cbid, {
|
|
927
1031
|
...a.har !== void 0 ? { har: a.har } : {},
|
|
@@ -933,14 +1037,14 @@ function registerTools(server, client) {
|
|
|
933
1037
|
tool(
|
|
934
1038
|
"create_site",
|
|
935
1039
|
"Create a new site. The cbid is auto-generated if you omit it.",
|
|
936
|
-
{ domain:
|
|
1040
|
+
{ domain: z5.string().describe("The site domain, e.g. example.com."), cbid: z5.string().optional().describe("Optional explicit cbid.") },
|
|
937
1041
|
(a) => client.sites.create({ domain: a.domain, ...typeof a.cbid === "string" ? { cbid: a.cbid } : {} })
|
|
938
1042
|
);
|
|
939
1043
|
tool(
|
|
940
1044
|
"create_sites_bulk",
|
|
941
1045
|
"Create up to 100 sites in one call. Partial success: each item reports ok or its own error, and a bad or duplicate item fails only itself.",
|
|
942
1046
|
{
|
|
943
|
-
sites:
|
|
1047
|
+
sites: z5.array(z5.object({ domain: z5.string(), cbid: z5.string().optional(), platform: z5.string().optional() })).min(1).max(100)
|
|
944
1048
|
},
|
|
945
1049
|
(a) => client.sites.createBulk(a.sites)
|
|
946
1050
|
);
|
|
@@ -950,15 +1054,15 @@ function registerTools(server, client) {
|
|
|
950
1054
|
"Replace (overwrite) the banner/consent configuration for a site via PUT. This is destructive, not a merge: any top-level SiteConfig field you omit from `config` reverts to its default rather than keeping its current value \u2014 unless keepUnspecified is true, in which case omitted top-level fields keep their stored value and only the fields you send are replaced (each whole). A top-level field sent as null reverts to its default. To change one setting, use patch_site_config instead \u2014 it merges server-side. Prefer the narrower set_* tools (set_blocking, set_banner_basics, etc.) when they cover your change.",
|
|
951
1055
|
{
|
|
952
1056
|
...cbid,
|
|
953
|
-
config:
|
|
954
|
-
keepUnspecified:
|
|
1057
|
+
config: z5.record(z5.unknown()).describe("The full SiteConfig to write, not a patch. Without keepUnspecified, omitted top-level fields are NOT preserved from the current config."),
|
|
1058
|
+
keepUnspecified: z5.boolean().optional().describe("PUT ?keep=unspecified: keep the stored value of every top-level field `config` omits, instead of reverting it to its default.")
|
|
955
1059
|
},
|
|
956
1060
|
(a) => a.keepUnspecified === true ? client.sites.putConfig(a.cbid, a.config, { keep: "unspecified" }) : client.sites.putConfig(a.cbid, a.config)
|
|
957
1061
|
);
|
|
958
1062
|
tool(
|
|
959
1063
|
"patch_site_config",
|
|
960
1064
|
`Change part of a site's banner/consent configuration. The patch is a JSON Merge Patch (RFC 7386) over the stored config server-side: any field you omit keeps its current value, and a field set to null is REMOVED (it falls back to its default) \u2014 e.g. { "banner": { "i18n": { "es": null } } } drops the Spanish override. This is the safe way to flip one setting, and it needs no read-modify-write. Use update_site_config only when you genuinely mean to replace the whole document.`,
|
|
961
|
-
{ ...cbid, config:
|
|
1065
|
+
{ ...cbid, config: z5.record(z5.unknown()).describe('The subset of SiteConfig to change, e.g. { "banner": { "showRightsLink": true } }. Everything else is preserved; null removes a field.') },
|
|
962
1066
|
(a) => client.sites.patchConfig(a.cbid, a.config)
|
|
963
1067
|
);
|
|
964
1068
|
tool(
|
|
@@ -966,9 +1070,9 @@ function registerTools(server, client) {
|
|
|
966
1070
|
'Preview a config change WITHOUT saving it: returns the config as it would be saved, a diff of every field that would change, and any warnings (plan-gated or unrecognised fields). mode "patch" (default) previews patch_site_config; mode "put" previews update_site_config, and its diff lists everything a replace would revert to its default (unless keepUnspecified is true). Use it before any write you are not sure of.',
|
|
967
1071
|
{
|
|
968
1072
|
...cbid,
|
|
969
|
-
config:
|
|
970
|
-
mode:
|
|
971
|
-
keepUnspecified:
|
|
1073
|
+
config: z5.record(z5.unknown()).describe('The patch (or, with mode "put", the full config) to preview.'),
|
|
1074
|
+
mode: z5.enum(["patch", "put"]).optional().describe("patch (default) merges; put replaces."),
|
|
1075
|
+
keepUnspecified: z5.boolean().optional().describe('With mode "put": preview update_site_config with keepUnspecified (omitted top-level fields keep their stored value).')
|
|
972
1076
|
},
|
|
973
1077
|
(a) => client.sites.dryRunConfig(a.cbid, a.config, {
|
|
974
1078
|
mode: a.mode ?? "patch",
|
|
@@ -980,8 +1084,8 @@ function registerTools(server, client) {
|
|
|
980
1084
|
'Check a banner config for consent-button parity WITHOUT saving it: is "Accept all" more prominent than "Reject all" anywhere \u2014 a brighter or more saturated colour, a bigger or bolder button, Reject styled as a link, hidden, below the fold, set apart, missing from the first layer, or worded to guilt-trip? Regulators (EDPB, CNIL) treat that as a dark pattern. Returns findings, a 0\u2013100 score and the reject style that would match Accept. It checks exactly what the write would store: merged over the stored config as patch_site_config would, or with replace: true replaced as update_site_config would. Run it before writing any banner design.',
|
|
981
1085
|
{
|
|
982
1086
|
...cbid,
|
|
983
|
-
config:
|
|
984
|
-
replace:
|
|
1087
|
+
config: z5.record(z5.unknown()).describe("The proposed SiteConfig (or a partial one, or a v2 flow design)."),
|
|
1088
|
+
replace: z5.boolean().optional().describe("Check what update_site_config (a full replace) would store, instead of what patch_site_config (a merge) would.")
|
|
985
1089
|
},
|
|
986
1090
|
async (a) => {
|
|
987
1091
|
const r = await client.sites.lintConfig(a.cbid, a.config, a.replace === true ? { replace: true } : {});
|
|
@@ -1005,7 +1109,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1005
1109
|
tool(
|
|
1006
1110
|
"get_consent_log",
|
|
1007
1111
|
"Get recent anonymised consent records for a site.",
|
|
1008
|
-
{ ...cbid, ...range, limit:
|
|
1112
|
+
{ ...cbid, ...range, limit: z5.number().optional().describe("Max records to return (default 200).") },
|
|
1009
1113
|
(a) => client.consent.log(a.cbid, {
|
|
1010
1114
|
from: a.from,
|
|
1011
1115
|
to: a.to,
|
|
@@ -1015,7 +1119,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1015
1119
|
tool(
|
|
1016
1120
|
"get_subject_consent",
|
|
1017
1121
|
"One person's consent records across every site in the org \u2014 web, mobile and desktop \u2014 by the subjectId your apps attach. Consent data: needs the consent:read scope. Read-only.",
|
|
1018
|
-
{ subjectId:
|
|
1122
|
+
{ subjectId: z5.string() },
|
|
1019
1123
|
(a) => client.subjects.consent(a.subjectId)
|
|
1020
1124
|
);
|
|
1021
1125
|
tool("list_dsar", "List all Data Subject Access Requests for your organization.", {}, () => client.dsar.list());
|
|
@@ -1023,51 +1127,53 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1023
1127
|
"update_dsar_executor",
|
|
1024
1128
|
"Change a connected system in place \u2014 its profile, address, credential or auto flag. Only what you pass changes; the stored credential is kept unless you give a new one. With dryRun, answers the connection as it would be and a diff, and changes nothing.",
|
|
1025
1129
|
{
|
|
1026
|
-
id:
|
|
1027
|
-
patch:
|
|
1028
|
-
dryRun:
|
|
1130
|
+
id: z5.string(),
|
|
1131
|
+
patch: z5.record(z5.unknown()),
|
|
1132
|
+
dryRun: z5.boolean().optional().describe("Validate and diff without saving.")
|
|
1029
1133
|
},
|
|
1030
1134
|
(a) => a.dryRun === true ? client.fulfillment.dryRunUpdateExecutor(a.id, a.patch) : client.fulfillment.updateExecutor(a.id, a.patch)
|
|
1031
1135
|
);
|
|
1032
1136
|
tool(
|
|
1033
1137
|
"get_dsar",
|
|
1034
1138
|
"One rights request by id, including its status and the deadline it must be answered by.",
|
|
1035
|
-
{ id:
|
|
1139
|
+
{ id: z5.string() },
|
|
1036
1140
|
(a) => client.dsar.get(a.id)
|
|
1037
1141
|
);
|
|
1038
1142
|
tool(
|
|
1039
1143
|
"erase_dsar_subject",
|
|
1040
1144
|
"For a deletion request that is past identity verification: erase the person\u2019s consent records on one site, identified by their consent stamp. Irreversible. The erasure is noted on the request. If the response carries a warning, nothing was cryptographically erased \u2014 tell the user.",
|
|
1041
|
-
{ id:
|
|
1145
|
+
{ id: z5.string(), cbid: z5.string(), stamp: z5.string() },
|
|
1042
1146
|
(a) => client.dsar.erase(a.id, a.cbid, a.stamp)
|
|
1043
1147
|
);
|
|
1044
1148
|
tool(
|
|
1045
1149
|
"export_dsar_subject",
|
|
1046
1150
|
"For an access or portability request that is past identity verification: the person\u2019s consent records on one site, identified by their consent stamp. The export is noted on the request.",
|
|
1047
|
-
{ id:
|
|
1151
|
+
{ id: z5.string(), cbid: z5.string(), stamp: z5.string() },
|
|
1048
1152
|
(a) => client.dsar.export(a.id, a.cbid, a.stamp)
|
|
1049
1153
|
);
|
|
1050
1154
|
tool(
|
|
1051
1155
|
"get_dsar_response_notice",
|
|
1052
1156
|
"The subject-facing response notice for a request, as plain text \u2014 what to send the person. Read-only; nothing is sent.",
|
|
1053
|
-
{ id:
|
|
1157
|
+
{ id: z5.string() },
|
|
1054
1158
|
(a) => client.dsar.response(a.id)
|
|
1055
1159
|
);
|
|
1056
1160
|
tool(
|
|
1057
1161
|
"create_dsar",
|
|
1058
1162
|
"Open a new Data Subject Access Request.",
|
|
1059
1163
|
{
|
|
1060
|
-
type:
|
|
1061
|
-
subjectEmail:
|
|
1062
|
-
regulation:
|
|
1063
|
-
note:
|
|
1064
|
-
|
|
1164
|
+
type: z5.enum(["access", "deletion", "rectification", "portability", "opt-out"]).describe("DSAR right being exercised."),
|
|
1165
|
+
subjectEmail: z5.string().describe("The data subject\u2019s email."),
|
|
1166
|
+
regulation: z5.enum(["gdpr", "ccpa"]).describe("Governing regulation."),
|
|
1167
|
+
note: z5.string().optional().describe("Optional INTERNAL note; never shown to the data subject."),
|
|
1168
|
+
messageToSubject: z5.string().max(2e3).optional().describe("The line the data subject reads in the response notice. Never an API key."),
|
|
1169
|
+
test: z5.boolean().optional().describe("Mark it as a test request: kept off the SLA board and deletable afterwards with delete_test_dsar.")
|
|
1065
1170
|
},
|
|
1066
1171
|
(a) => client.dsar.create({
|
|
1067
1172
|
type: a.type,
|
|
1068
1173
|
subjectEmail: a.subjectEmail,
|
|
1069
1174
|
regulation: a.regulation,
|
|
1070
1175
|
...typeof a.note === "string" ? { note: a.note } : {},
|
|
1176
|
+
...typeof a.messageToSubject === "string" ? { messageToSubject: a.messageToSubject } : {},
|
|
1071
1177
|
...a.test === true ? { test: true } : {}
|
|
1072
1178
|
})
|
|
1073
1179
|
);
|
|
@@ -1075,11 +1181,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1075
1181
|
"create_rights_link",
|
|
1076
1182
|
"Mint a signed, single-use link to a site\u2019s hosted rights page for a person you know is signed in to that site. On the page their email is filled in and locked and the email-code step is skipped; the filed request is recorded as verified by their account. Give the link only to that person. Expires in 15 minutes by default (max 1 hour). Needs dsar:write.",
|
|
1077
1183
|
{
|
|
1078
|
-
cbid:
|
|
1079
|
-
email:
|
|
1080
|
-
userId:
|
|
1081
|
-
rights:
|
|
1082
|
-
ttlSeconds:
|
|
1184
|
+
cbid: z5.string().describe("Site identifier (cbid). Must belong to your org."),
|
|
1185
|
+
email: z5.string().describe("The signed-in person\u2019s verified email address."),
|
|
1186
|
+
userId: z5.string().optional().describe("Your own account id for them; recorded on the request."),
|
|
1187
|
+
rights: z5.array(z5.enum(["access", "erasure", "rectification", "portability", "restriction", "objection", "opt_out_sale", "opt_out_targeted", "limit_sensitive"])).min(1).optional().describe("Limit the link to these rights. Default: every right the page offers."),
|
|
1188
|
+
ttlSeconds: z5.number().int().min(60).max(3600).optional().describe("How long the link works, in seconds (default 900).")
|
|
1083
1189
|
},
|
|
1084
1190
|
(a) => client.rightsLinks.create(a.cbid, {
|
|
1085
1191
|
subject: { email: a.email, ...typeof a.userId === "string" ? { userId: a.userId } : {} },
|
|
@@ -1090,7 +1196,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1090
1196
|
tool(
|
|
1091
1197
|
"delete_test_dsar",
|
|
1092
1198
|
"Delete a TEST rights request (one created with test: true), with its tasks and their upstream log. Real requests cannot be deleted and are refused. The deletion is recorded in the audit log.",
|
|
1093
|
-
{ id:
|
|
1199
|
+
{ id: z5.string().describe("The test request id.") },
|
|
1094
1200
|
async (a) => {
|
|
1095
1201
|
await client.dsar.delete(a.id);
|
|
1096
1202
|
return { deleted: a.id };
|
|
@@ -1099,17 +1205,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1099
1205
|
tool(
|
|
1100
1206
|
"mark_dsar_test",
|
|
1101
1207
|
"Mark a CLOSED rights request (completed or rejected) as a test request, after the fact \u2014 for trial requests filed before test: true existed. An open request is refused (request_not_closed), so a live obligation can never be relabelled. Recorded in the audit log; afterwards delete_test_dsar can remove it. Returns { request, changed }.",
|
|
1102
|
-
{ id:
|
|
1208
|
+
{ id: z5.string().describe("The closed request id.") },
|
|
1103
1209
|
(a) => client.dsar.markTest(a.id)
|
|
1104
1210
|
);
|
|
1105
1211
|
tool(
|
|
1106
1212
|
"advance_dsar",
|
|
1107
1213
|
"Advance a DSAR to a new status (received \u2192 verifying \u2192 in_progress \u2192 completed, or rejected).",
|
|
1108
1214
|
{
|
|
1109
|
-
id:
|
|
1110
|
-
toStatus:
|
|
1215
|
+
id: z5.string().describe("The DSAR id."),
|
|
1216
|
+
toStatus: z5.enum(["received", "verifying", "in_progress", "completed", "rejected"]).describe("Target status."),
|
|
1217
|
+
messageToSubject: z5.string().max(2e3).optional().describe("Replaces the line the data subject reads in the notice \u2014 for a rejection, why.")
|
|
1111
1218
|
},
|
|
1112
|
-
(a) => client.dsar.advance(a.id, a.toStatus)
|
|
1219
|
+
(a) => typeof a.messageToSubject === "string" ? client.dsar.advance(a.id, a.toStatus, { messageToSubject: a.messageToSubject }) : client.dsar.advance(a.id, a.toStatus)
|
|
1113
1220
|
);
|
|
1114
1221
|
tool(
|
|
1115
1222
|
"export_consent",
|
|
@@ -1120,7 +1227,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1120
1227
|
tool(
|
|
1121
1228
|
"get_receipt",
|
|
1122
1229
|
"Fetch the signed consent receipt for a single consent record (by stamp).",
|
|
1123
|
-
{ ...cbid, stamp:
|
|
1230
|
+
{ ...cbid, stamp: z5.string().describe("The consent record stamp/id.") },
|
|
1124
1231
|
(a) => client.consent.receipt(a.cbid, a.stamp)
|
|
1125
1232
|
);
|
|
1126
1233
|
tool("delete_site", "Delete a site (cbid) and its configuration from your org.", { ...cbid }, async (a) => {
|
|
@@ -1132,13 +1239,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1132
1239
|
"create_vendor",
|
|
1133
1240
|
"Register a vendor (processor) and compute its risk score.",
|
|
1134
1241
|
{
|
|
1135
|
-
name:
|
|
1136
|
-
category:
|
|
1137
|
-
dataShared:
|
|
1138
|
-
dpaSigned:
|
|
1139
|
-
subprocessors:
|
|
1140
|
-
certifications:
|
|
1141
|
-
region:
|
|
1242
|
+
name: z5.string().describe("Vendor name."),
|
|
1243
|
+
category: z5.string().describe("Vendor category, e.g. analytics."),
|
|
1244
|
+
dataShared: z5.array(z5.string()).describe("Categories of data shared with the vendor."),
|
|
1245
|
+
dpaSigned: z5.boolean().describe("Whether a Data Processing Agreement is signed."),
|
|
1246
|
+
subprocessors: z5.number().describe("Number of subprocessors."),
|
|
1247
|
+
certifications: z5.array(z5.string()).describe("Compliance certifications, e.g. ISO27001."),
|
|
1248
|
+
region: z5.string().describe("Primary processing region, e.g. EU.")
|
|
1142
1249
|
},
|
|
1143
1250
|
(a) => client.vendors.create({
|
|
1144
1251
|
name: a.name,
|
|
@@ -1156,13 +1263,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1156
1263
|
"create_ropa",
|
|
1157
1264
|
"Create a Record of Processing Activity (RoPA) entry.",
|
|
1158
1265
|
{
|
|
1159
|
-
name:
|
|
1160
|
-
purpose:
|
|
1161
|
-
legalBasis:
|
|
1162
|
-
dataCategories:
|
|
1163
|
-
recipients:
|
|
1164
|
-
retentionDays:
|
|
1165
|
-
crossBorderTransfer:
|
|
1266
|
+
name: z5.string().describe("Activity name."),
|
|
1267
|
+
purpose: z5.string().describe("Purpose of processing."),
|
|
1268
|
+
legalBasis: z5.enum(["consent", "contract", "legal-obligation", "vital-interests", "public-task", "legitimate-interests"]).describe("GDPR legal basis."),
|
|
1269
|
+
dataCategories: z5.array(z5.string()).describe("Categories of personal data."),
|
|
1270
|
+
recipients: z5.array(z5.string()).describe("Recipients of the data."),
|
|
1271
|
+
retentionDays: z5.number().describe("Retention period in days."),
|
|
1272
|
+
crossBorderTransfer: z5.boolean().describe("Whether data is transferred across borders.")
|
|
1166
1273
|
},
|
|
1167
1274
|
(a) => client.ropa.create({
|
|
1168
1275
|
name: a.name,
|
|
@@ -1182,15 +1289,23 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1182
1289
|
);
|
|
1183
1290
|
tool(
|
|
1184
1291
|
"scan_site",
|
|
1185
|
-
"Trigger a cookie
|
|
1186
|
-
{ ...cbid },
|
|
1187
|
-
(a) =>
|
|
1292
|
+
"Trigger a cookie crawl of a site (at most 90 s). Returns its scanId and state (queued). With wait: true, returns once it is done or failed \u2014 state, cookieCount, pagesVisited, durationMs, error. The stored list keeps cookies earlier crawls and real visits found; retire one the site no longer sets.",
|
|
1293
|
+
{ ...cbid, wait: z5.boolean().optional().describe("Wait for the scan to finish (up to 100 s) and return its outcome.") },
|
|
1294
|
+
async (a) => {
|
|
1295
|
+
let started;
|
|
1296
|
+
try {
|
|
1297
|
+
started = await client.sites.scan(a.cbid);
|
|
1298
|
+
} catch (err) {
|
|
1299
|
+
if (!a.wait || err.status !== 409) throw err;
|
|
1300
|
+
}
|
|
1301
|
+
return a.wait ? client.sites.waitForScan(a.cbid, { timeoutMs: 1e5 }) : started;
|
|
1302
|
+
}
|
|
1188
1303
|
);
|
|
1189
1304
|
tool(
|
|
1190
1305
|
"get_scan_status",
|
|
1191
|
-
"Get
|
|
1192
|
-
{ ...cbid },
|
|
1193
|
-
(a) => client.sites.scanStatus(a.cbid)
|
|
1306
|
+
"Get a site\u2019s last cookie scan: state (queued, scanning, done, failed), scanId, durationMs, cookieCount, pagesVisited and error when it failed.",
|
|
1307
|
+
{ ...cbid, wait: z5.number().min(0).max(60).optional().describe("Seconds (\u226460) to wait for a running scan to settle before answering.") },
|
|
1308
|
+
(a) => a.wait !== void 0 ? client.sites.scanStatus(a.cbid, { wait: a.wait }) : client.sites.scanStatus(a.cbid)
|
|
1194
1309
|
);
|
|
1195
1310
|
tool(
|
|
1196
1311
|
"get_ab_results",
|
|
@@ -1201,16 +1316,25 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1201
1316
|
tool("list_brand_kits", "List reusable brand kits (colors/logo/typography) for your org.", {}, () => client.brandKits.list());
|
|
1202
1317
|
tool("list_preferences", "List configurable consent preferences/purposes for your org.", {}, () => client.preferences.list());
|
|
1203
1318
|
tool("list_members", "List the members of your organization.", {}, () => client.members.list());
|
|
1204
|
-
tool("list_api_keys", "List the API keys for your organization (secrets are not returned).", {}, () => client.keys.list());
|
|
1319
|
+
tool("list_api_keys", "List the API keys for your organization (secrets are not returned), with each key\u2019s scopes, expiry and when it was last used.", {}, () => client.keys.list());
|
|
1320
|
+
tool(
|
|
1321
|
+
"api_key_report",
|
|
1322
|
+
"Key hygiene: keys not used for a while, keys with broad (full or wide write) access, and keys expiring soon, each with the reason. Read-only.",
|
|
1323
|
+
{
|
|
1324
|
+
unusedDays: z5.number().int().min(1).max(3650).optional().describe("Unused for at least this many days (default 90)."),
|
|
1325
|
+
expiringDays: z5.number().int().min(1).max(3650).optional().describe("Expiring within this many days (default 14).")
|
|
1326
|
+
},
|
|
1327
|
+
(a) => client.keys.report({ ...a.unusedDays !== void 0 ? { unusedDays: a.unusedDays } : {}, ...a.expiringDays !== void 0 ? { expiringDays: a.expiringDays } : {} })
|
|
1328
|
+
);
|
|
1205
1329
|
tool("get_usage", "Get the current usage/quota summary for your organization.", {}, () => client.usage());
|
|
1206
1330
|
tool("list_webhooks", "List webhook subscriptions for your organization.", {}, () => client.webhooks.list());
|
|
1207
1331
|
tool(
|
|
1208
1332
|
"create_webhook",
|
|
1209
1333
|
"Create a webhook subscription. The response includes the signing secret (shown once).",
|
|
1210
1334
|
{
|
|
1211
|
-
url:
|
|
1212
|
-
events:
|
|
1213
|
-
cbid:
|
|
1335
|
+
url: z5.string().describe("HTTPS endpoint to deliver events to."),
|
|
1336
|
+
events: z5.array(z5.string()).describe("Event names to subscribe to, e.g. consent.created."),
|
|
1337
|
+
cbid: z5.string().optional().describe("Optional site cbid to scope the subscription to.")
|
|
1214
1338
|
},
|
|
1215
1339
|
(a) => client.webhooks.create({
|
|
1216
1340
|
url: a.url,
|
|
@@ -1221,13 +1345,13 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1221
1345
|
tool(
|
|
1222
1346
|
"roll_webhook_secret",
|
|
1223
1347
|
"Rotate a webhook subscription\u2019s signing secret. The new secret is returned once; the receiving endpoint must be updated to verify with it.",
|
|
1224
|
-
{ id:
|
|
1348
|
+
{ id: z5.string() },
|
|
1225
1349
|
(a) => client.webhooks.rollSecret(a.id)
|
|
1226
1350
|
);
|
|
1227
1351
|
tool(
|
|
1228
1352
|
"test_webhook",
|
|
1229
1353
|
"Send a signed test event to a webhook subscription now, and report what the endpoint answered.",
|
|
1230
|
-
{ id:
|
|
1354
|
+
{ id: z5.string() },
|
|
1231
1355
|
(a) => client.webhooks.test(a.id)
|
|
1232
1356
|
);
|
|
1233
1357
|
tool(
|
|
@@ -1239,18 +1363,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1239
1363
|
tool(
|
|
1240
1364
|
"replay_webhook_dead_letter",
|
|
1241
1365
|
"Deliver a dead-lettered webhook event again, to the subscription as it is now.",
|
|
1242
|
-
{ id:
|
|
1366
|
+
{ id: z5.string() },
|
|
1243
1367
|
(a) => client.webhooks.replayDeadLetter(a.id)
|
|
1244
1368
|
);
|
|
1245
1369
|
tool(
|
|
1246
1370
|
"update_webhook",
|
|
1247
1371
|
"Change a webhook subscription, or pause it with active:false (delivery stops; the subscription is kept). Only the fields given change. cbid: null widens it to every property in the org.",
|
|
1248
1372
|
{
|
|
1249
|
-
id:
|
|
1250
|
-
url:
|
|
1251
|
-
events:
|
|
1252
|
-
cbid:
|
|
1253
|
-
active:
|
|
1373
|
+
id: z5.string(),
|
|
1374
|
+
url: z5.string().optional(),
|
|
1375
|
+
events: z5.array(z5.string()).optional(),
|
|
1376
|
+
cbid: z5.string().nullable().optional(),
|
|
1377
|
+
active: z5.boolean().optional()
|
|
1254
1378
|
},
|
|
1255
1379
|
(a) => client.webhooks.update(a.id, {
|
|
1256
1380
|
...a.url !== void 0 ? { url: a.url } : {},
|
|
@@ -1259,20 +1383,20 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1259
1383
|
...a.active !== void 0 ? { active: a.active } : {}
|
|
1260
1384
|
})
|
|
1261
1385
|
);
|
|
1262
|
-
tool("delete_webhook", "Delete a webhook subscription by id.", { id:
|
|
1386
|
+
tool("delete_webhook", "Delete a webhook subscription by id.", { id: z5.string().describe("The webhook subscription id.") }, async (a) => {
|
|
1263
1387
|
await client.webhooks.delete(a.id);
|
|
1264
1388
|
return { ok: true };
|
|
1265
1389
|
});
|
|
1266
1390
|
tool(
|
|
1267
1391
|
"verify_site",
|
|
1268
1392
|
"Verify that your organization controls a domain by one of three challenge methods (dns / meta / file). Required to unlock consent export and signed receipts.",
|
|
1269
|
-
{ ...cbid, method:
|
|
1393
|
+
{ ...cbid, method: z5.enum(["dns", "meta", "file"]).describe("Challenge method: dns (TXT record), meta (HTML tag), or file (/.well-known/cookiemunch-verify.txt).") },
|
|
1270
1394
|
(a) => client.sites.verify(a.cbid, a.method)
|
|
1271
1395
|
);
|
|
1272
1396
|
tool(
|
|
1273
1397
|
"get_verification_challenge",
|
|
1274
1398
|
"Exactly what to publish to prove control of a site\u2019s domain: the DNS TXT record, the meta tag, the file, or installing the embed. Read-only \u2014 publish one, then call verify_site.",
|
|
1275
|
-
{ cbid:
|
|
1399
|
+
{ cbid: z5.string() },
|
|
1276
1400
|
(a) => client.sites.verifyChallenge(a.cbid)
|
|
1277
1401
|
);
|
|
1278
1402
|
tool(
|
|
@@ -1284,15 +1408,15 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1284
1408
|
tool(
|
|
1285
1409
|
"get_flow",
|
|
1286
1410
|
"Get the v2 banner flow config for a site, including current views, categories, and any lint issues.",
|
|
1287
|
-
{ cbid:
|
|
1411
|
+
{ cbid: z5.string().describe("Site identifier (cbid).") },
|
|
1288
1412
|
(a) => client.sites.getFlow(a.cbid)
|
|
1289
1413
|
);
|
|
1290
1414
|
tool(
|
|
1291
1415
|
"edit_flow",
|
|
1292
1416
|
"Apply a batch of structured edit operations to a site's v2 banner flow. All ops are validated server-side and the final config must be lint-clean before it is saved.",
|
|
1293
1417
|
{
|
|
1294
|
-
cbid:
|
|
1295
|
-
operations:
|
|
1418
|
+
cbid: z5.string().describe("Site identifier (cbid)."),
|
|
1419
|
+
operations: z5.array(z5.record(z5.unknown())).describe(
|
|
1296
1420
|
'Ordered list of ops. Each must have an "op" field: addView | removeView | addElement | setButtonTransition | addCustomCategory.'
|
|
1297
1421
|
)
|
|
1298
1422
|
},
|
|
@@ -1302,21 +1426,22 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1302
1426
|
"set_flow",
|
|
1303
1427
|
"Wholesale replace a site's v2 banner flow with a complete config (e.g. from a template). Validated server-side before it is saved.",
|
|
1304
1428
|
{
|
|
1305
|
-
cbid:
|
|
1306
|
-
config:
|
|
1429
|
+
cbid: z5.string().describe("Site identifier (cbid)."),
|
|
1430
|
+
config: z5.record(z5.unknown()).describe("A full v2 FlowConfig object ({ v:2, flow, categories, ... }).")
|
|
1307
1431
|
},
|
|
1308
1432
|
(a) => client.sites.setFlow(a.cbid, a.config)
|
|
1309
1433
|
);
|
|
1310
1434
|
registerConfigTools(tool, client);
|
|
1311
1435
|
registerPlatformTools(tool, client);
|
|
1436
|
+
registerIntegrationTools(tool, client);
|
|
1312
1437
|
registerRightsTools(tool, client);
|
|
1313
1438
|
registerRightsPageTools(tool, client);
|
|
1314
1439
|
tool(
|
|
1315
1440
|
"invite_member",
|
|
1316
1441
|
"Invite a person to your organization by email. role must be admin, member, or viewer. The org is derived from the API key \u2014 you cannot invite into a different org.",
|
|
1317
1442
|
{
|
|
1318
|
-
email:
|
|
1319
|
-
role:
|
|
1443
|
+
email: z5.string().describe("Email address of the person to invite."),
|
|
1444
|
+
role: z5.enum(["admin", "member", "viewer"]).describe("Role to assign: admin, member, or viewer. owner is not assignable via API key.")
|
|
1320
1445
|
},
|
|
1321
1446
|
(a) => client.members.invite(a.email, a.role)
|
|
1322
1447
|
);
|
|
@@ -1324,8 +1449,8 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1324
1449
|
"set_member_role",
|
|
1325
1450
|
"Change the role of a member in your organization. The org owner's role cannot be changed.",
|
|
1326
1451
|
{
|
|
1327
|
-
userId:
|
|
1328
|
-
role:
|
|
1452
|
+
userId: z5.string().describe("The userId of the member whose role to change."),
|
|
1453
|
+
role: z5.enum(["admin", "member", "viewer"]).describe("New role: admin, member, or viewer.")
|
|
1329
1454
|
},
|
|
1330
1455
|
(a) => client.members.setRole(a.userId, a.role)
|
|
1331
1456
|
);
|
|
@@ -1333,7 +1458,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1333
1458
|
"remove_member",
|
|
1334
1459
|
"Remove a member from your organization. The org owner cannot be removed.",
|
|
1335
1460
|
{
|
|
1336
|
-
userId:
|
|
1461
|
+
userId: z5.string().describe("The userId of the member to remove.")
|
|
1337
1462
|
},
|
|
1338
1463
|
async (a) => {
|
|
1339
1464
|
await client.members.remove(a.userId);
|
|
@@ -1344,11 +1469,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1344
1469
|
"create_brand_kit",
|
|
1345
1470
|
"Create a reusable brand kit (colors, logo, typography) for your organization's consent banners.",
|
|
1346
1471
|
{
|
|
1347
|
-
name:
|
|
1348
|
-
theme:
|
|
1349
|
-
content:
|
|
1350
|
-
logoUrl:
|
|
1351
|
-
customCss:
|
|
1472
|
+
name: z5.string().describe("Display name for the brand kit."),
|
|
1473
|
+
theme: z5.record(z5.unknown()).describe("Theme tokens (colors, fonts, etc.) as a JSON object."),
|
|
1474
|
+
content: z5.record(z5.unknown()).optional().describe("Optional banner copy overrides."),
|
|
1475
|
+
logoUrl: z5.string().optional().describe("Optional URL for your org logo."),
|
|
1476
|
+
customCss: z5.string().optional().describe("Optional custom CSS string to inject into the banner.")
|
|
1352
1477
|
},
|
|
1353
1478
|
(a) => client.brandKits.create({
|
|
1354
1479
|
name: a.name,
|
|
@@ -1362,7 +1487,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1362
1487
|
"delete_brand_kit",
|
|
1363
1488
|
"Delete a brand kit by id. The kit must belong to your organization (cross-org deletes are rejected).",
|
|
1364
1489
|
{
|
|
1365
|
-
id:
|
|
1490
|
+
id: z5.string().describe("The brand kit id to delete.")
|
|
1366
1491
|
},
|
|
1367
1492
|
async (a) => {
|
|
1368
1493
|
await client.brandKits.delete(a.id);
|
|
@@ -1373,63 +1498,65 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1373
1498
|
"save_preference",
|
|
1374
1499
|
"Save or update the consent preferences for an end-user (by subjectId) within your organization. purposes is a map of purpose-name \u2192 boolean.",
|
|
1375
1500
|
{
|
|
1376
|
-
subjectId:
|
|
1377
|
-
purposes:
|
|
1501
|
+
subjectId: z5.string().describe("The end-user identifier (e.g. email or internal user id)."),
|
|
1502
|
+
purposes: z5.record(z5.boolean()).describe('Map of purpose names to consent values, e.g. { "newsletter": true, "analytics": false }.')
|
|
1378
1503
|
},
|
|
1379
1504
|
(a) => client.preferences.save(a.subjectId, a.purposes)
|
|
1380
1505
|
);
|
|
1381
1506
|
tool(
|
|
1382
1507
|
"get_preference",
|
|
1383
1508
|
"One end-user\u2019s saved preferences, by subjectId. Read-only.",
|
|
1384
|
-
{ subjectId:
|
|
1509
|
+
{ subjectId: z5.string() },
|
|
1385
1510
|
(a) => client.preferences.get(a.subjectId)
|
|
1386
1511
|
);
|
|
1387
1512
|
tool(
|
|
1388
1513
|
"issue_api_key",
|
|
1389
1514
|
"Issue a new API key. The secret is returned once and never again. Prefer the least privilege the job needs: `scopes` limits what it can do, `cbids` locks it to specific sites (it then cannot reach anything org-wide), `expiresInDays` retires it. Omitting all three mints a full-access, org-wide, non-expiring key.",
|
|
1390
1515
|
{
|
|
1391
|
-
name:
|
|
1392
|
-
scopes:
|
|
1393
|
-
cbids:
|
|
1394
|
-
expiresInDays:
|
|
1516
|
+
name: z5.string().optional(),
|
|
1517
|
+
scopes: z5.array(z5.string()).optional(),
|
|
1518
|
+
cbids: z5.array(z5.string()).min(1).optional(),
|
|
1519
|
+
expiresInDays: z5.number().int().min(1).max(3650).optional(),
|
|
1520
|
+
expiresAt: z5.string().optional().describe("Or the exact expiry, an ISO date-time (not with expiresInDays).")
|
|
1395
1521
|
},
|
|
1396
1522
|
(a) => client.keys.issue({
|
|
1523
|
+
...a.expiresAt ? { expiresAt: a.expiresAt } : {},
|
|
1397
1524
|
...a.name ? { name: a.name } : {},
|
|
1398
1525
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1399
1526
|
...a.cbids ? { cbids: a.cbids } : {},
|
|
1400
1527
|
...a.expiresInDays !== void 0 ? { expiresInDays: a.expiresInDays } : {}
|
|
1401
1528
|
})
|
|
1402
1529
|
);
|
|
1403
|
-
tool("revoke_api_key", "Revoke an API key by its prefix. Takes effect immediately; anything using that key stops working.", { prefix:
|
|
1530
|
+
tool("revoke_api_key", "Revoke an API key by its prefix. Takes effect immediately; anything using that key stops working.", { prefix: z5.string() }, async (a) => {
|
|
1404
1531
|
await client.keys.revoke(a.prefix);
|
|
1405
1532
|
return { revoked: a.prefix };
|
|
1406
1533
|
});
|
|
1407
1534
|
tool(
|
|
1408
1535
|
"import_cookie_declaration",
|
|
1409
1536
|
"Read a cookie declaration exported from another CMP (OneTrust, Cookiebot, CookieYes, or any CSV/JSON with the same columns) and translate its categories into ours. Nothing is applied \u2014 it comes back for review, with the rows whose category could not be placed listed separately.",
|
|
1410
|
-
{ cbid:
|
|
1537
|
+
{ cbid: z5.string(), data: z5.string().describe("The exported file, as text (CSV or JSON).") },
|
|
1411
1538
|
(a) => client.sites.importDeclaration(a.cbid, a.data)
|
|
1412
1539
|
);
|
|
1413
1540
|
tool(
|
|
1414
1541
|
"apply_cookie_import",
|
|
1415
1542
|
"Import a cookie declaration exported from another CMP AND declare it: every row whose category mapped to ours and that has a purpose becomes a site declaration; the rest come back in `skipped` with the reason. Cookies the site already declared are kept unless overwrite is true. Prefer import_cookie_declaration first to review.",
|
|
1416
|
-
{ cbid:
|
|
1543
|
+
{ cbid: z5.string(), data: z5.string().describe("The exported file, as text (CSV or JSON)."), overwrite: z5.boolean().optional() },
|
|
1417
1544
|
(a) => client.sites.applyImport(a.cbid, a.data, a.overwrite ? { overwrite: true } : void 0)
|
|
1418
1545
|
);
|
|
1419
1546
|
const declarationShape = {
|
|
1420
|
-
category:
|
|
1421
|
-
purpose:
|
|
1422
|
-
purposes:
|
|
1423
|
-
provider:
|
|
1424
|
-
expiry:
|
|
1425
|
-
domain:
|
|
1426
|
-
pattern:
|
|
1547
|
+
category: z5.string().describe("necessary, preferences, statistics, marketing, or one of the site\u2019s categories.custom ids."),
|
|
1548
|
+
purpose: z5.string().describe("What the cookie does, as visitors will read it \u2014 and the fallback for any language purposes lacks."),
|
|
1549
|
+
purposes: z5.record(z5.string(), z5.string().max(1e3)).nullable().optional().describe('The purpose in other languages, keyed by BCP-47 tag: {"es": "\u2026", "pt-BR": "\u2026"}. The banner, data-cc="declaration" and cookie-declaration.js draw the visitor\u2019s language. null clears.'),
|
|
1550
|
+
provider: z5.string().optional(),
|
|
1551
|
+
expiry: z5.string().optional().describe('e.g. "Session", "30 days", "1 year" (the banner localises these forms).'),
|
|
1552
|
+
domain: z5.string().optional(),
|
|
1553
|
+
pattern: z5.boolean().optional().describe("Treat the name as a prefix wildcard (a trailing * does the same).")
|
|
1427
1554
|
};
|
|
1428
|
-
const dryRunArg =
|
|
1555
|
+
const dryRunArg = z5.boolean().optional().describe("Store nothing: answer with the would-be declarations and a diff (added / removed / changed) to check first.");
|
|
1429
1556
|
tool(
|
|
1430
1557
|
"declare_cookie",
|
|
1431
1558
|
'Declare what one of the site\u2019s cookies is. Overrides the scanner, observed visits and the cookie database everywhere the declaration is shown (API, preference modal, data-cc="declaration"). Use for the site\u2019s own cookies the database cannot know. A name ending in * covers every cookie with that prefix.',
|
|
1432
|
-
{ cbid:
|
|
1559
|
+
{ cbid: z5.string(), name: z5.string(), ...declarationShape, dryRun: dryRunArg },
|
|
1433
1560
|
(a) => {
|
|
1434
1561
|
const { cbid: cbid2, name, dryRun, ...rest } = a;
|
|
1435
1562
|
return client.sites.declareCookie(cbid2, name, rest, dryRun ? { dryRun: true } : void 0);
|
|
@@ -1438,7 +1565,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1438
1565
|
tool(
|
|
1439
1566
|
"declare_cookies",
|
|
1440
1567
|
"Declare many cookies at once. All-or-nothing: one invalid item refuses the whole request and nothing is saved. replace: true also removes every declaration the list does not name.",
|
|
1441
|
-
{ cbid:
|
|
1568
|
+
{ cbid: z5.string(), cookies: z5.array(z5.object({ name: z5.string(), ...declarationShape })).max(500), replace: z5.boolean().optional(), dryRun: dryRunArg },
|
|
1442
1569
|
(a) => {
|
|
1443
1570
|
const o = { ...a.replace ? { replace: true } : {}, ...a.dryRun ? { dryRun: true } : {} };
|
|
1444
1571
|
return client.sites.declareCookies(a.cbid, a.cookies, Object.keys(o).length ? o : void 0);
|
|
@@ -1447,35 +1574,118 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1447
1574
|
tool(
|
|
1448
1575
|
"undeclare_cookie",
|
|
1449
1576
|
"Remove a cookie declaration; the scanned/observed classification applies again.",
|
|
1450
|
-
{ cbid:
|
|
1577
|
+
{ cbid: z5.string(), name: z5.string(), dryRun: dryRunArg },
|
|
1451
1578
|
async (a) => {
|
|
1452
1579
|
if (a.dryRun) return client.sites.undeclareCookie(a.cbid, a.name, { dryRun: true });
|
|
1453
1580
|
await client.sites.undeclareCookie(a.cbid, a.name);
|
|
1454
1581
|
return { undeclared: a.name };
|
|
1455
1582
|
}
|
|
1456
1583
|
);
|
|
1584
|
+
tool(
|
|
1585
|
+
"retire_cookie",
|
|
1586
|
+
'Retire a cookie the site renamed or stopped setting: it leaves the banner\u2019s cookie list, data-cc="declaration" and the public feed, and stays listed for the owner with retired. A name ending in * retires every cookie with that prefix; the name must match a scanned, observed or declared cookie. If a crawl or a real visit sees it again afterwards, it is listed again with review: retired_but_seen.',
|
|
1587
|
+
{
|
|
1588
|
+
cbid: z5.string(),
|
|
1589
|
+
name: z5.string(),
|
|
1590
|
+
renamedTo: z5.string().max(256).optional().describe("The cookie\u2019s new name, if it was renamed."),
|
|
1591
|
+
note: z5.string().max(1e3).optional(),
|
|
1592
|
+
dryRun: z5.boolean().optional().describe("Store nothing: answer with the would-be retirement and list to check first.")
|
|
1593
|
+
},
|
|
1594
|
+
(a) => {
|
|
1595
|
+
const input = { ...a.renamedTo ? { renamedTo: a.renamedTo } : {}, ...a.note ? { note: a.note } : {} };
|
|
1596
|
+
return client.sites.retireCookie(a.cbid, a.name, input, a.dryRun ? { dryRun: true } : void 0);
|
|
1597
|
+
}
|
|
1598
|
+
);
|
|
1599
|
+
tool(
|
|
1600
|
+
"unretire_cookie",
|
|
1601
|
+
"Un-retire a cookie: it is listed again everywhere.",
|
|
1602
|
+
{ cbid: z5.string(), name: z5.string(), dryRun: z5.boolean().optional().describe("Store nothing: answer with what the list would be.") },
|
|
1603
|
+
async (a) => {
|
|
1604
|
+
if (a.dryRun) return client.sites.unretireCookie(a.cbid, a.name, { dryRun: true });
|
|
1605
|
+
await client.sites.unretireCookie(a.cbid, a.name);
|
|
1606
|
+
return { unretired: a.name };
|
|
1607
|
+
}
|
|
1608
|
+
);
|
|
1609
|
+
tool(
|
|
1610
|
+
"list_cookie_presets",
|
|
1611
|
+
"Declaration presets for the platforms a site is built on (atlas, forumulate, chatly, cookiemunch): each one\u2019s parameters, what it has declared on this site, and whether the vendor\u2019s live manifest can be imported yet. Read-only.",
|
|
1612
|
+
{ cbid: z5.string() },
|
|
1613
|
+
(a) => client.sites.cookiePresets(a.cbid)
|
|
1614
|
+
);
|
|
1615
|
+
tool(
|
|
1616
|
+
"apply_cookie_preset",
|
|
1617
|
+
"Apply (or re-sync) a vendor preset: declares exactly what that platform writes \u2014 cookies and browser storage, with domain and lifetime \u2014 marked as declared by that vendor. Re-applying removes keys the vendor no longer writes. Names the owner declared are kept (skipped). Atlas needs frontendApiHost (and crossSubdomainCookies, default true); Chatly needs publicId.",
|
|
1618
|
+
{
|
|
1619
|
+
cbid: z5.string(),
|
|
1620
|
+
vendor: z5.enum(["atlas", "forumulate", "chatly", "cookiemunch"]),
|
|
1621
|
+
frontendApiHost: z5.string().optional().describe("Atlas: your frontend API host, e.g. auth.example.com."),
|
|
1622
|
+
crossSubdomainCookies: z5.boolean().optional().describe("Atlas: default true \u2014 the cookies live on the parent domain."),
|
|
1623
|
+
publicId: z5.string().optional().describe("Chatly: the channel public id (ch_web_\u2026)."),
|
|
1624
|
+
dragging: z5.boolean().optional().describe("Chatly: the launcher can be dragged (adds the drag-position key)."),
|
|
1625
|
+
category: z5.string().optional().describe("Chatly: the category for its keys. Default necessary."),
|
|
1626
|
+
dryRun: dryRunArg
|
|
1627
|
+
},
|
|
1628
|
+
(a) => {
|
|
1629
|
+
const params = {};
|
|
1630
|
+
for (const k of ["frontendApiHost", "crossSubdomainCookies", "publicId", "dragging", "category"]) if (a[k] !== void 0) params[k] = a[k];
|
|
1631
|
+
return client.sites.applyCookiePreset(a.cbid, a.vendor, params, a.dryRun ? { dryRun: true } : void 0);
|
|
1632
|
+
}
|
|
1633
|
+
);
|
|
1634
|
+
tool(
|
|
1635
|
+
"remove_cookie_preset",
|
|
1636
|
+
"Remove every declaration a vendor preset made on this site.",
|
|
1637
|
+
{ cbid: z5.string(), vendor: z5.enum(["atlas", "forumulate", "chatly", "cookiemunch"]), dryRun: dryRunArg },
|
|
1638
|
+
(a) => client.sites.removeCookiePreset(a.cbid, a.vendor, a.dryRun ? { dryRun: true } : void 0)
|
|
1639
|
+
);
|
|
1640
|
+
tool(
|
|
1641
|
+
"delete_observed_cookie",
|
|
1642
|
+
"Remove every stored row of this name that crawls or real visits put in the site\u2019s cookie list (e.g. a name someone reported that the site never sets). A declaration of it stays. If real visits keep reporting it, it comes back quarantined.",
|
|
1643
|
+
{ cbid: z5.string(), name: z5.string(), dryRun: dryRunArg },
|
|
1644
|
+
async (a) => {
|
|
1645
|
+
if (a.dryRun) return client.sites.deleteObservedCookie(a.cbid, a.name, { dryRun: true });
|
|
1646
|
+
await client.sites.deleteObservedCookie(a.cbid, a.name);
|
|
1647
|
+
return { deleted: a.name };
|
|
1648
|
+
}
|
|
1649
|
+
);
|
|
1650
|
+
tool(
|
|
1651
|
+
"purge_observed_cookies",
|
|
1652
|
+
"Purge observed since T: remove every row a real visit first reported at or after `since` (and before `until`). Crawled rows and declarations stay. Rows from before provenance was recorded use their last-seen time, so run with dryRun first.",
|
|
1653
|
+
{
|
|
1654
|
+
cbid: z5.string(),
|
|
1655
|
+
since: z5.union([z5.string(), z5.number()]).describe("ISO-8601 time or epoch milliseconds."),
|
|
1656
|
+
until: z5.union([z5.string(), z5.number()]).optional().describe("Optional end of the window (exclusive)."),
|
|
1657
|
+
dryRun: dryRunArg
|
|
1658
|
+
},
|
|
1659
|
+
(a) => client.sites.purgeObservedCookies(
|
|
1660
|
+
a.cbid,
|
|
1661
|
+
{ since: a.since, ...a.until !== void 0 ? { until: a.until } : {} },
|
|
1662
|
+
a.dryRun ? { dryRun: true } : void 0
|
|
1663
|
+
)
|
|
1664
|
+
);
|
|
1457
1665
|
tool(
|
|
1458
1666
|
"get_blocked_pages",
|
|
1459
1667
|
"Pages where the embed could not load its banner renderer \u2014 the page\u2019s Content Security Policy or Trusted Types policy refused it, so nobody there can be asked for consent. An empty list is healthy. Read-only.",
|
|
1460
|
-
{ cbid:
|
|
1668
|
+
{ cbid: z5.string() },
|
|
1461
1669
|
(a) => client.sites.blocked(a.cbid)
|
|
1462
1670
|
);
|
|
1463
1671
|
tool(
|
|
1464
1672
|
"roll_api_key",
|
|
1465
1673
|
"Rotate an API key: returns a new secret once, with the same name, scopes, property lock and expiry. The old secret stops working immediately \u2014 if it is the key this server runs with, this server stops working too until it is reconfigured.",
|
|
1466
|
-
{ prefix:
|
|
1674
|
+
{ prefix: z5.string() },
|
|
1467
1675
|
(a) => client.keys.roll(a.prefix)
|
|
1468
1676
|
);
|
|
1469
1677
|
tool(
|
|
1470
1678
|
"update_api_key",
|
|
1471
|
-
"Rename an API key,
|
|
1679
|
+
"Rename an API key, replace its scopes or the properties it is locked to, or set or remove its expiry. Only the fields given change; the secret does not.",
|
|
1472
1680
|
{
|
|
1473
|
-
prefix:
|
|
1474
|
-
name:
|
|
1475
|
-
scopes:
|
|
1476
|
-
cbids:
|
|
1681
|
+
prefix: z5.string(),
|
|
1682
|
+
name: z5.string().optional(),
|
|
1683
|
+
scopes: z5.array(z5.string()).optional(),
|
|
1684
|
+
cbids: z5.array(z5.string()).min(1).optional(),
|
|
1685
|
+
expiresAt: z5.string().nullable().optional().describe("A new expiry (ISO date-time), or null to remove it.")
|
|
1477
1686
|
},
|
|
1478
1687
|
(a) => client.keys.update(a.prefix, {
|
|
1688
|
+
...a.expiresAt !== void 0 ? { expiresAt: a.expiresAt } : {},
|
|
1479
1689
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1480
1690
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1481
1691
|
...a.cbids ? { cbids: a.cbids } : {}
|
|
@@ -1485,7 +1695,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1485
1695
|
tool(
|
|
1486
1696
|
"update_org",
|
|
1487
1697
|
"Rename your organisation or set its logo. logoUrl: null removes the logo; upload an image with upload_asset to get a URL. Deleting the organisation is not possible here.",
|
|
1488
|
-
{ name:
|
|
1698
|
+
{ name: z5.string().min(1).optional(), logoUrl: z5.string().nullable().optional() },
|
|
1489
1699
|
(a) => client.org.update({
|
|
1490
1700
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1491
1701
|
...a.logoUrl !== void 0 ? { logoUrl: a.logoUrl } : {}
|
|
@@ -1501,20 +1711,20 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1501
1711
|
"set_mail_provider",
|
|
1502
1712
|
"Connect your own mail provider for rights-request mail \u2014 recommended, so codes come from your own domain. Replaces the stored one. It carries mail only after test_mail_provider succeeds; every save clears that. Omit secret to keep the stored one (same provider only).",
|
|
1503
1713
|
{
|
|
1504
|
-
provider:
|
|
1505
|
-
fromEmail:
|
|
1506
|
-
fromName:
|
|
1507
|
-
replyTo:
|
|
1508
|
-
secret:
|
|
1509
|
-
ses:
|
|
1510
|
-
smtp:
|
|
1714
|
+
provider: z5.enum(["brevo", "sendgrid", "postmark", "resend", "ses", "smtp"]),
|
|
1715
|
+
fromEmail: z5.string().describe("An address on a domain your provider has verified."),
|
|
1716
|
+
fromName: z5.string().max(100).nullable().optional(),
|
|
1717
|
+
replyTo: z5.string().nullable().optional(),
|
|
1718
|
+
secret: z5.string().optional().describe("API key (Brevo, SendGrid, Resend), server token (Postmark), secret access key (SES) or SMTP password. Write-only."),
|
|
1719
|
+
ses: z5.object({ region: z5.string(), accessKeyId: z5.string() }).optional().describe("Required for ses."),
|
|
1720
|
+
smtp: z5.object({ host: z5.string(), port: z5.union([z5.literal(25), z5.literal(465), z5.literal(587), z5.literal(2525)]), security: z5.enum(["tls", "starttls"]), username: z5.string() }).optional().describe("Required for smtp. TLS is always required.")
|
|
1511
1721
|
},
|
|
1512
1722
|
(a) => client.org.mailProvider.set(a)
|
|
1513
1723
|
);
|
|
1514
1724
|
tool(
|
|
1515
1725
|
"test_mail_provider",
|
|
1516
1726
|
"Send a test message through your own mail provider (never Cookie Munch\u2019s) and report what it answered. Success marks the configuration verified, after which it carries all rights mail.",
|
|
1517
|
-
{ to:
|
|
1727
|
+
{ to: z5.string().optional().describe("Recipient. Default: the reply-to, else the from address.") },
|
|
1518
1728
|
(a) => client.org.mailProvider.test(a.to)
|
|
1519
1729
|
);
|
|
1520
1730
|
tool(
|
|
@@ -1528,11 +1738,11 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1528
1738
|
);
|
|
1529
1739
|
const CAPTCHA_OFF = "Off removes spam protection beyond the hidden spam-trap field, the rate limits and the email code: expect more spam requests. Own keys are recommended.";
|
|
1530
1740
|
const captchaInput = {
|
|
1531
|
-
mode:
|
|
1532
|
-
provider:
|
|
1533
|
-
siteKey:
|
|
1534
|
-
secret:
|
|
1535
|
-
minScore:
|
|
1741
|
+
mode: z5.enum(["own", "off"]).describe(`own: your own captcha provider keys (recommended). off: no captcha. ${CAPTCHA_OFF}`),
|
|
1742
|
+
provider: z5.enum(["turnstile", "hcaptcha", "recaptcha_v2", "recaptcha_v3"]).optional().describe("Required for own."),
|
|
1743
|
+
siteKey: z5.string().optional().describe("Required for own: the public site key. List your rights-page hostnames on it at the provider."),
|
|
1744
|
+
secret: z5.string().optional().describe("The provider secret key. Write-only; never returned. Omit to keep the stored one (same provider)."),
|
|
1745
|
+
minScore: z5.number().min(0.1).max(0.9).optional().describe("reCAPTCHA v3 only. Default 0.5.")
|
|
1536
1746
|
};
|
|
1537
1747
|
const captchaBody = (a) => ({
|
|
1538
1748
|
mode: a.mode,
|
|
@@ -1544,19 +1754,19 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1544
1754
|
tool(
|
|
1545
1755
|
"get_rights_captcha",
|
|
1546
1756
|
"The captcha on a site\u2019s hosted rights page: its own setting, else the organisation default, else off (`source` says which). Never returns the secret. Read-only.",
|
|
1547
|
-
{ cbid:
|
|
1757
|
+
{ cbid: z5.string() },
|
|
1548
1758
|
(a) => client.rightsCaptcha.get(a.cbid)
|
|
1549
1759
|
);
|
|
1550
1760
|
tool(
|
|
1551
1761
|
"set_rights_captcha",
|
|
1552
1762
|
`Set a site\u2019s rights-page captcha: your own Turnstile, hCaptcha or reCAPTCHA keys (recommended; the provider must accept the secret before it is saved), or off. ${CAPTCHA_OFF} Audited with the old and new mode.`,
|
|
1553
|
-
{ cbid:
|
|
1763
|
+
{ cbid: z5.string(), ...captchaInput },
|
|
1554
1764
|
(a) => client.rightsCaptcha.set(a.cbid, captchaBody(a))
|
|
1555
1765
|
);
|
|
1556
1766
|
tool(
|
|
1557
1767
|
"remove_rights_captcha",
|
|
1558
1768
|
"Remove a site\u2019s own captcha setting: it inherits the organisation default again (or off). Returns the setting now in force.",
|
|
1559
|
-
{ cbid:
|
|
1769
|
+
{ cbid: z5.string() },
|
|
1560
1770
|
(a) => client.rightsCaptcha.remove(a.cbid)
|
|
1561
1771
|
);
|
|
1562
1772
|
tool(
|
|
@@ -1579,15 +1789,15 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1579
1789
|
);
|
|
1580
1790
|
const IDENTITY_NOTE = "The JWKS is fetched and checked before anything is saved. The session token must carry the email and a verified-email claim (default email_verified) set to true (Clerk: add email: {{user.primary_email_address}} to the session token; Clerk documents no claim for whether that address is verified, so either add your own or set trustEmailClaim). oidc_jwt needs an audience or authorizedParties.";
|
|
1581
1791
|
const identityInput = {
|
|
1582
|
-
type:
|
|
1583
|
-
issuer:
|
|
1584
|
-
jwksUrl:
|
|
1585
|
-
audience:
|
|
1586
|
-
authorizedParties:
|
|
1587
|
-
emailClaim:
|
|
1588
|
-
emailVerifiedClaim:
|
|
1589
|
-
sessionCookieName:
|
|
1590
|
-
trustEmailClaim:
|
|
1792
|
+
type: z5.enum(["clerk", "atlas", "oidc_jwt"]).describe("clerk, atlas (Clerk-shaped), or oidc_jwt (any issuer that signs session JWTs with a published JWKS)."),
|
|
1793
|
+
issuer: z5.string().describe("https URL exactly as in the token\u2019s iss (Clerk: your Frontend API URL)."),
|
|
1794
|
+
jwksUrl: z5.string().optional().describe("Required for oidc_jwt; clerk/atlas default to <issuer>/.well-known/jwks.json."),
|
|
1795
|
+
audience: z5.string().optional().describe("Expected aud. For oidc_jwt an audience or authorizedParties is required (a shared issuer mints tokens for every app)."),
|
|
1796
|
+
authorizedParties: z5.array(z5.string()).optional().describe("Your own origins (https://www.example.com) the token\u2019s azp must be one of. Required for clerk and atlas; for oidc_jwt when there is no audience."),
|
|
1797
|
+
emailClaim: z5.string().optional().describe("Default email."),
|
|
1798
|
+
emailVerifiedClaim: z5.string().optional().describe("Default email_verified; must be exactly true."),
|
|
1799
|
+
sessionCookieName: z5.string().optional().describe("Default __session: the cookie the hosted page on your custom domain reads."),
|
|
1800
|
+
trustEmailClaim: z5.boolean().optional().describe("clerk/atlas only, default false. True: a token without the verified claim is accepted, its email claim taken as verified. Set only if every address your provider puts in that claim is verified.")
|
|
1591
1801
|
};
|
|
1592
1802
|
const identityBody = (a) => {
|
|
1593
1803
|
const out = { type: a.type, issuer: a.issuer };
|
|
@@ -1597,19 +1807,19 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1597
1807
|
tool(
|
|
1598
1808
|
"get_rights_identity",
|
|
1599
1809
|
"The sign-in provider a site\u2019s rights requests are verified with: its own setting, else the organisation default, else none (`source` says which). Read-only.",
|
|
1600
|
-
{ cbid:
|
|
1810
|
+
{ cbid: z5.string() },
|
|
1601
1811
|
(a) => client.rightsIdentity.get(a.cbid)
|
|
1602
1812
|
);
|
|
1603
1813
|
tool(
|
|
1604
1814
|
"set_rights_identity",
|
|
1605
1815
|
`Connect a site\u2019s sign-in provider so a visitor signed in to the site is verified by their session, with no code mail. ${IDENTITY_NOTE} Audited.`,
|
|
1606
|
-
{ cbid:
|
|
1816
|
+
{ cbid: z5.string(), ...identityInput },
|
|
1607
1817
|
(a) => client.rightsIdentity.set(a.cbid, identityBody(a))
|
|
1608
1818
|
);
|
|
1609
1819
|
tool(
|
|
1610
1820
|
"remove_rights_identity",
|
|
1611
1821
|
"Remove a site\u2019s own sign-in provider: it inherits the organisation default again (or none). Returns the setting now in force.",
|
|
1612
|
-
{ cbid:
|
|
1822
|
+
{ cbid: z5.string() },
|
|
1613
1823
|
(a) => client.rightsIdentity.remove(a.cbid)
|
|
1614
1824
|
);
|
|
1615
1825
|
tool(
|
|
@@ -1633,22 +1843,22 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1633
1843
|
tool(
|
|
1634
1844
|
"get_audit_log",
|
|
1635
1845
|
"The organisation\u2019s audit log, newest first: administrative changes made in the dashboard or through the API, and who made them. Read-only.",
|
|
1636
|
-
{ limit:
|
|
1846
|
+
{ limit: z5.number().int().min(1).max(500).optional() },
|
|
1637
1847
|
(a) => client.audit(a.limit)
|
|
1638
1848
|
);
|
|
1639
1849
|
tool(
|
|
1640
1850
|
"upload_asset",
|
|
1641
1851
|
"Upload an image \u2014 a banner logo \u2014 and get its public URL. data is base64 (a data: URL also works); PNG, JPEG, WebP, GIF or SVG, up to 1,000,000 bytes.",
|
|
1642
1852
|
{
|
|
1643
|
-
data:
|
|
1644
|
-
contentType:
|
|
1853
|
+
data: z5.string(),
|
|
1854
|
+
contentType: z5.enum(["image/png", "image/jpeg", "image/webp", "image/gif", "image/svg+xml"])
|
|
1645
1855
|
},
|
|
1646
1856
|
(a) => client.assets.upload({ data: a.data, contentType: a.contentType })
|
|
1647
1857
|
);
|
|
1648
1858
|
tool(
|
|
1649
1859
|
"delete_asset",
|
|
1650
1860
|
"Delete a stored image by its URL (or file name). Only your own organisation\u2019s images can be named.",
|
|
1651
|
-
{ url:
|
|
1861
|
+
{ url: z5.string().describe("The URL upload_asset returned, or just its file name.") },
|
|
1652
1862
|
async (a) => {
|
|
1653
1863
|
await client.assets.delete(a.url);
|
|
1654
1864
|
return { deleted: a.url };
|
|
@@ -1663,18 +1873,18 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1663
1873
|
tool(
|
|
1664
1874
|
"get_customer",
|
|
1665
1875
|
"One child org: its controller details and usage. Read-only.",
|
|
1666
|
-
{ id:
|
|
1876
|
+
{ id: z5.string() },
|
|
1667
1877
|
(a) => client.reseller.get(a.id)
|
|
1668
1878
|
);
|
|
1669
1879
|
tool(
|
|
1670
1880
|
"provision_customer",
|
|
1671
1881
|
"Create a new child org under this reseller. With `mintKey`, its first API key is returned once. Counts toward the reseller plan\u2019s pooled limits.",
|
|
1672
1882
|
{
|
|
1673
|
-
name:
|
|
1674
|
-
ownerEmail:
|
|
1675
|
-
delegatedAccess:
|
|
1676
|
-
mintKey:
|
|
1677
|
-
keyScopes:
|
|
1883
|
+
name: z5.string(),
|
|
1884
|
+
ownerEmail: z5.string().optional(),
|
|
1885
|
+
delegatedAccess: z5.boolean().optional().describe("Whether this reseller may act inside the child."),
|
|
1886
|
+
mintKey: z5.boolean().optional(),
|
|
1887
|
+
keyScopes: z5.array(z5.string()).optional()
|
|
1678
1888
|
},
|
|
1679
1889
|
(a) => client.reseller.create({
|
|
1680
1890
|
name: a.name,
|
|
@@ -1688,10 +1898,10 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1688
1898
|
"update_customer",
|
|
1689
1899
|
"Change a child org\u2019s status, delegated access or DSAR routing. `dsarRouting: null` clears the override.",
|
|
1690
1900
|
{
|
|
1691
|
-
id:
|
|
1692
|
-
status:
|
|
1693
|
-
delegatedAccess:
|
|
1694
|
-
dsarRouting:
|
|
1901
|
+
id: z5.string(),
|
|
1902
|
+
status: z5.enum(["active", "suspended"]).optional(),
|
|
1903
|
+
delegatedAccess: z5.boolean().optional(),
|
|
1904
|
+
dsarRouting: z5.enum(["reseller", "child"]).nullable().optional()
|
|
1695
1905
|
},
|
|
1696
1906
|
(a) => client.reseller.update(a.id, {
|
|
1697
1907
|
...a.status ? { status: a.status } : {},
|
|
@@ -1702,7 +1912,7 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1702
1912
|
tool(
|
|
1703
1913
|
"suspend_customer",
|
|
1704
1914
|
"Suspend a child org: it stops ingesting consent and its keys stop working, and it can be reactivated with update_customer. Its data is kept. (Permanent deletion is deliberately not available here.)",
|
|
1705
|
-
{ id:
|
|
1915
|
+
{ id: z5.string() },
|
|
1706
1916
|
async (a) => {
|
|
1707
1917
|
await client.reseller.deprovision(a.id);
|
|
1708
1918
|
return { suspended: a.id };
|
|
@@ -1711,72 +1921,72 @@ ${JSON.stringify(r, null, 2)}` : r;
|
|
|
1711
1921
|
tool(
|
|
1712
1922
|
"list_customer_keys",
|
|
1713
1923
|
"A child org's API key prefixes. Never the secrets. Read-only.",
|
|
1714
|
-
{ id:
|
|
1924
|
+
{ id: z5.string() },
|
|
1715
1925
|
(a) => client.reseller.listKeys(a.id)
|
|
1716
1926
|
);
|
|
1717
1927
|
tool(
|
|
1718
1928
|
"issue_customer_key",
|
|
1719
1929
|
"Mint an API key for a child org. The secret is returned once. Prefer scopes and a property lock over a full-access key.",
|
|
1720
|
-
{ id:
|
|
1930
|
+
{ id: z5.string(), name: z5.string().optional(), scopes: z5.array(z5.string()).optional(), cbids: z5.array(z5.string()).min(1).optional() },
|
|
1721
1931
|
(a) => client.reseller.mintKey(a.id, {
|
|
1722
1932
|
...a.name ? { name: a.name } : {},
|
|
1723
1933
|
...a.scopes ? { scopes: a.scopes } : {},
|
|
1724
1934
|
...a.cbids ? { cbids: a.cbids } : {}
|
|
1725
1935
|
})
|
|
1726
1936
|
);
|
|
1727
|
-
tool("revoke_customer_key", "Revoke a child org's API key by prefix. Takes effect immediately.", { id:
|
|
1937
|
+
tool("revoke_customer_key", "Revoke a child org's API key by prefix. Takes effect immediately.", { id: z5.string(), prefix: z5.string() }, async (a) => {
|
|
1728
1938
|
await client.reseller.revokeKey(a.id, a.prefix);
|
|
1729
1939
|
return { revoked: a.prefix };
|
|
1730
1940
|
});
|
|
1731
1941
|
tool(
|
|
1732
1942
|
"erase_subject_data",
|
|
1733
1943
|
"IRREVERSIBLY crypto-erase a data subject's consent records by their consent-receipt stamp (GDPR/CCPA deletion). Destroys the encryption key; the tamper-evident chain stays intact.",
|
|
1734
|
-
{ cbid:
|
|
1944
|
+
{ cbid: z5.string(), stamp: z5.string() },
|
|
1735
1945
|
(a) => client.consent.eraseSubject(a.cbid, a.stamp)
|
|
1736
1946
|
);
|
|
1737
1947
|
tool(
|
|
1738
1948
|
"export_subject_data",
|
|
1739
1949
|
"Export a data subject's consent records (GDPR access/portability).",
|
|
1740
|
-
{ cbid:
|
|
1950
|
+
{ cbid: z5.string(), stamp: z5.string() },
|
|
1741
1951
|
(a) => client.consent.exportSubject(a.cbid, a.stamp)
|
|
1742
1952
|
);
|
|
1743
1953
|
tool("list_banners", "List reusable banner designs in your org.", {}, () => client.banners.list());
|
|
1744
1954
|
tool(
|
|
1745
1955
|
"create_banner",
|
|
1746
1956
|
"Create a reusable banner design.",
|
|
1747
|
-
{ name:
|
|
1957
|
+
{ name: z5.string(), json: z5.record(z5.unknown()).describe("A v2 BannerConfig.") },
|
|
1748
1958
|
(a) => client.banners.create({ name: a.name, json: a.json })
|
|
1749
1959
|
);
|
|
1750
|
-
tool("get_banner", "Get a banner design by id.", { id:
|
|
1960
|
+
tool("get_banner", "Get a banner design by id.", { id: z5.string() }, (a) => client.banners.get(a.id));
|
|
1751
1961
|
tool(
|
|
1752
1962
|
"update_banner",
|
|
1753
1963
|
"Update a banner design (name and/or config).",
|
|
1754
|
-
{ id:
|
|
1964
|
+
{ id: z5.string(), name: z5.string().optional(), json: z5.record(z5.unknown()).optional() },
|
|
1755
1965
|
(a) => client.banners.update(a.id, {
|
|
1756
1966
|
...a.name !== void 0 ? { name: a.name } : {},
|
|
1757
1967
|
...a.json !== void 0 ? { json: a.json } : {}
|
|
1758
1968
|
})
|
|
1759
1969
|
);
|
|
1760
|
-
tool("delete_banner", "Delete a banner design (fails if assigned to sites).", { id:
|
|
1970
|
+
tool("delete_banner", "Delete a banner design (fails if assigned to sites).", { id: z5.string() }, async (a) => {
|
|
1761
1971
|
await client.banners.delete(a.id);
|
|
1762
1972
|
return { ok: true };
|
|
1763
1973
|
});
|
|
1764
1974
|
tool(
|
|
1765
1975
|
"get_banner_assignments",
|
|
1766
1976
|
"The sites (cbids) a banner design is currently assigned to. Read-only.",
|
|
1767
|
-
{ id:
|
|
1977
|
+
{ id: z5.string() },
|
|
1768
1978
|
(a) => client.banners.assignments(a.id)
|
|
1769
1979
|
);
|
|
1770
1980
|
tool(
|
|
1771
1981
|
"assign_banner",
|
|
1772
1982
|
"Set which sites (cbids) use a banner design.",
|
|
1773
|
-
{ id:
|
|
1983
|
+
{ id: z5.string(), cbids: z5.array(z5.string()) },
|
|
1774
1984
|
(a) => client.banners.setAssignments(a.id, a.cbids)
|
|
1775
1985
|
);
|
|
1776
1986
|
tool(
|
|
1777
1987
|
"publish_banner",
|
|
1778
1988
|
"Publish a design live to all its assigned sites.",
|
|
1779
|
-
{ id:
|
|
1989
|
+
{ id: z5.string() },
|
|
1780
1990
|
(a) => client.banners.publish(a.id)
|
|
1781
1991
|
);
|
|
1782
1992
|
}
|
|
@@ -1793,4 +2003,4 @@ export {
|
|
|
1793
2003
|
registerTools,
|
|
1794
2004
|
createCookieMunchMcp
|
|
1795
2005
|
};
|
|
1796
|
-
//# sourceMappingURL=chunk-
|
|
2006
|
+
//# sourceMappingURL=chunk-SKCEQX3L.js.map
|