@neopress/mcp 1.6.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -1
- package/dist/bin.cjs +467 -12
- package/dist/http-bin.cjs +467 -12
- package/dist/index.d.ts +154 -2
- package/dist/index.js +467 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -252,6 +252,12 @@ var FormsEndpoint = class {
|
|
|
252
252
|
async deleteResponse(formId, responseId) {
|
|
253
253
|
await this.client.delete(`${this.basePath}/${formId}/responses/${responseId}`);
|
|
254
254
|
}
|
|
255
|
+
async getResponse(formId, responseId) {
|
|
256
|
+
return (await this.client.get(`${this.basePath}/${formId}/responses/${responseId}`)).data;
|
|
257
|
+
}
|
|
258
|
+
async markResponseRead(formId, responseId) {
|
|
259
|
+
return (await this.client.patch(`${this.basePath}/${formId}/responses/${responseId}`, { read: true })).data;
|
|
260
|
+
}
|
|
255
261
|
};
|
|
256
262
|
//#endregion
|
|
257
263
|
//#region ../sdk/src/endpoints/assets.ts
|
|
@@ -399,8 +405,14 @@ var PublishEndpoint = class {
|
|
|
399
405
|
async preview() {
|
|
400
406
|
return (await this.client.get(`${this.client.siteBasePath}/publish`)).data;
|
|
401
407
|
}
|
|
402
|
-
async site() {
|
|
403
|
-
return (await this.client.post(`${this.client.siteBasePath}/publish
|
|
408
|
+
async site(selection) {
|
|
409
|
+
return (await this.client.post(`${this.client.siteBasePath}/publish`, selection ? { selection } : void 0)).data;
|
|
410
|
+
}
|
|
411
|
+
async unpublishPages(pageIds) {
|
|
412
|
+
return (await this.client.patch(`${this.client.siteBasePath}/publish`, { pageIds })).data;
|
|
413
|
+
}
|
|
414
|
+
async undeploy() {
|
|
415
|
+
return (await this.client.delete(`${this.client.siteBasePath}/publish`)).data;
|
|
404
416
|
}
|
|
405
417
|
};
|
|
406
418
|
//#endregion
|
|
@@ -568,6 +580,14 @@ var AnalyticsFunnelsEndpoint = class {
|
|
|
568
580
|
async delete(funnelId) {
|
|
569
581
|
await this.client.delete(`${this.basePath}/${funnelId}`);
|
|
570
582
|
}
|
|
583
|
+
async results(funnelId, params) {
|
|
584
|
+
const query = new URLSearchParams();
|
|
585
|
+
if (params?.dateFrom) query.set("dateFrom", params.dateFrom);
|
|
586
|
+
if (params?.dateTo) query.set("dateTo", params.dateTo);
|
|
587
|
+
if (params?.timezone) query.set("timezone", params.timezone);
|
|
588
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
589
|
+
return (await this.client.get(`${this.basePath}/${funnelId}/results${suffix}`)).data;
|
|
590
|
+
}
|
|
571
591
|
};
|
|
572
592
|
//#endregion
|
|
573
593
|
//#region ../sdk/src/endpoints/templates.ts
|
|
@@ -696,6 +716,122 @@ var LogosEndpoint = class {
|
|
|
696
716
|
}
|
|
697
717
|
};
|
|
698
718
|
//#endregion
|
|
719
|
+
//#region ../sdk/src/endpoints/domains.ts
|
|
720
|
+
var DomainsEndpoint = class {
|
|
721
|
+
client;
|
|
722
|
+
constructor(client) {
|
|
723
|
+
this.client = client;
|
|
724
|
+
}
|
|
725
|
+
get basePath() {
|
|
726
|
+
return `${this.client.siteBasePath}/domains`;
|
|
727
|
+
}
|
|
728
|
+
async status() {
|
|
729
|
+
return (await this.client.get(this.basePath)).data;
|
|
730
|
+
}
|
|
731
|
+
async connect(domain) {
|
|
732
|
+
return (await this.client.post(this.basePath, { domain })).data;
|
|
733
|
+
}
|
|
734
|
+
async refresh() {
|
|
735
|
+
return (await this.client.patch(this.basePath, {})).data;
|
|
736
|
+
}
|
|
737
|
+
async remove(domain) {
|
|
738
|
+
return (await this.client.delete(this.basePath, { domain })).data;
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
//#endregion
|
|
742
|
+
//#region ../sdk/src/endpoints/search-console.ts
|
|
743
|
+
var SearchConsoleConnectionEndpoint = class {
|
|
744
|
+
client;
|
|
745
|
+
constructor(client) {
|
|
746
|
+
this.client = client;
|
|
747
|
+
}
|
|
748
|
+
get basePath() {
|
|
749
|
+
return `${this.client.siteBasePath}/search-console`;
|
|
750
|
+
}
|
|
751
|
+
async status() {
|
|
752
|
+
return (await this.client.get(this.basePath)).data;
|
|
753
|
+
}
|
|
754
|
+
async authorize(locale) {
|
|
755
|
+
return (await this.client.post(this.basePath, locale ? { locale } : {})).data;
|
|
756
|
+
}
|
|
757
|
+
async disconnect() {
|
|
758
|
+
return (await this.client.delete(this.basePath)).data;
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
//#endregion
|
|
762
|
+
//#region ../sdk/src/endpoints/billing.ts
|
|
763
|
+
var BillingEndpoint = class {
|
|
764
|
+
client;
|
|
765
|
+
constructor(client) {
|
|
766
|
+
this.client = client;
|
|
767
|
+
}
|
|
768
|
+
get basePath() {
|
|
769
|
+
return `${this.client.siteBasePath}/billing`;
|
|
770
|
+
}
|
|
771
|
+
async status() {
|
|
772
|
+
return (await this.client.get(this.basePath)).data;
|
|
773
|
+
}
|
|
774
|
+
async checkout(plan) {
|
|
775
|
+
return (await this.client.post(`${this.basePath}/checkout`, { plan })).data;
|
|
776
|
+
}
|
|
777
|
+
async portal() {
|
|
778
|
+
return (await this.client.post(`${this.basePath}/portal`)).data;
|
|
779
|
+
}
|
|
780
|
+
async cancel() {
|
|
781
|
+
return (await this.client.post(`${this.basePath}/subscription/cancel`)).data;
|
|
782
|
+
}
|
|
783
|
+
async resume() {
|
|
784
|
+
return (await this.client.post(`${this.basePath}/subscription/resume`)).data;
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
//#endregion
|
|
788
|
+
//#region ../sdk/src/endpoints/team.ts
|
|
789
|
+
var TeamEndpoint = class {
|
|
790
|
+
client;
|
|
791
|
+
constructor(client) {
|
|
792
|
+
this.client = client;
|
|
793
|
+
}
|
|
794
|
+
get basePath() {
|
|
795
|
+
return `${this.client.siteBasePath}/team`;
|
|
796
|
+
}
|
|
797
|
+
async list() {
|
|
798
|
+
return (await this.client.get(this.basePath)).data;
|
|
799
|
+
}
|
|
800
|
+
async invite(input) {
|
|
801
|
+
return (await this.client.post(this.basePath, input)).data;
|
|
802
|
+
}
|
|
803
|
+
async updateRole(profileId, role) {
|
|
804
|
+
return (await this.client.patch(`${this.basePath}/${profileId}`, { role })).data;
|
|
805
|
+
}
|
|
806
|
+
async remove(profileId) {
|
|
807
|
+
return (await this.client.delete(`${this.basePath}/${profileId}`)).data;
|
|
808
|
+
}
|
|
809
|
+
async transferOwnership(profileId) {
|
|
810
|
+
return (await this.client.post(`${this.basePath}/ownership`, { profileId })).data;
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region ../sdk/src/endpoints/history.ts
|
|
815
|
+
var HistoryEndpoint = class {
|
|
816
|
+
client;
|
|
817
|
+
constructor(client) {
|
|
818
|
+
this.client = client;
|
|
819
|
+
}
|
|
820
|
+
get basePath() {
|
|
821
|
+
return `${this.client.siteBasePath}/history/snapshots`;
|
|
822
|
+
}
|
|
823
|
+
async list(limit) {
|
|
824
|
+
const query = limit === void 0 ? "" : `?limit=${encodeURIComponent(String(limit))}`;
|
|
825
|
+
return (await this.client.get(`${this.basePath}${query}`)).data;
|
|
826
|
+
}
|
|
827
|
+
async get(snapshotId) {
|
|
828
|
+
return (await this.client.get(`${this.basePath}/${snapshotId}`)).data;
|
|
829
|
+
}
|
|
830
|
+
async restore(snapshotId) {
|
|
831
|
+
return (await this.client.post(`${this.basePath}/${snapshotId}/restore`)).data;
|
|
832
|
+
}
|
|
833
|
+
};
|
|
834
|
+
//#endregion
|
|
699
835
|
//#region ../sdk/src/client.ts
|
|
700
836
|
/**
|
|
701
837
|
* @neopress/sdk — API Client
|
|
@@ -720,6 +856,11 @@ var NeopressClient = class {
|
|
|
720
856
|
templates;
|
|
721
857
|
headshots;
|
|
722
858
|
logos;
|
|
859
|
+
domains;
|
|
860
|
+
searchConsole;
|
|
861
|
+
billing;
|
|
862
|
+
team;
|
|
863
|
+
history;
|
|
723
864
|
constructor(options) {
|
|
724
865
|
this.baseUrl = (options.baseUrl || "https://app.neopress.ai").replace(/\/$/, "");
|
|
725
866
|
this.accessToken = options.accessToken || "";
|
|
@@ -738,6 +879,11 @@ var NeopressClient = class {
|
|
|
738
879
|
this.templates = new TemplatesEndpoint(this);
|
|
739
880
|
this.headshots = new HeadshotsEndpoint(this);
|
|
740
881
|
this.logos = new LogosEndpoint(this);
|
|
882
|
+
this.domains = new DomainsEndpoint(this);
|
|
883
|
+
this.searchConsole = new SearchConsoleConnectionEndpoint(this);
|
|
884
|
+
this.billing = new BillingEndpoint(this);
|
|
885
|
+
this.team = new TeamEndpoint(this);
|
|
886
|
+
this.history = new HistoryEndpoint(this);
|
|
741
887
|
}
|
|
742
888
|
get siteBasePath() {
|
|
743
889
|
return `/api/v1/sites/${this.siteId}`;
|
|
@@ -787,8 +933,8 @@ var NeopressClient = class {
|
|
|
787
933
|
async patch(path, body) {
|
|
788
934
|
return this.request("PATCH", path, body);
|
|
789
935
|
}
|
|
790
|
-
async delete(path) {
|
|
791
|
-
return this.request("DELETE", path);
|
|
936
|
+
async delete(path, body) {
|
|
937
|
+
return this.request("DELETE", path, body);
|
|
792
938
|
}
|
|
793
939
|
};
|
|
794
940
|
//#endregion
|
|
@@ -944,7 +1090,9 @@ Use these rules before generating pages, collection schemas, entries, forms, or
|
|
|
944
1090
|
|
|
945
1091
|
## Analytics and autopilot
|
|
946
1092
|
|
|
947
|
-
- Analytics tools are
|
|
1093
|
+
- Analytics result tools are OAuth-authenticated read queries for traffic, forms, AI crawler reach, Search Console, and tenant-owned saved funnels. Event/funnel definitions and the Search Console connection have separate mutation tools.
|
|
1094
|
+
- The API re-checks site role, work access, and plan entitlements on every MCP call. MCP starts at Launch; deep analytics such as saved funnel results requires Growth. Billing is Owner-only and team/domain management is Owner/Admin.
|
|
1095
|
+
- Consequential public, account, billing, team, deletion, and history-restore tools carry destructive/open-world annotations for host approval. OAuth consent, DNS-provider credentials, checkout, and billing-portal steps still require user interaction.
|
|
948
1096
|
- Generated page TSX must not call analytics APIs, Tinybird, Search Console, Supabase, or server resources directly.
|
|
949
1097
|
- Search Console can return connected=false. Do not claim query-level SEO evidence unless connected data is returned.
|
|
950
1098
|
- Analytics may justify the next draft change, but mutations still follow the compile, publish, entry publish, form publish, and production verification contracts.
|
|
@@ -1287,6 +1435,7 @@ const READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1287
1435
|
"neopress_forms_list",
|
|
1288
1436
|
"neopress_form_get",
|
|
1289
1437
|
"neopress_form_responses_list",
|
|
1438
|
+
"neopress_form_response_get",
|
|
1290
1439
|
"neopress_analytics_query",
|
|
1291
1440
|
"neopress_analytics_pageviews",
|
|
1292
1441
|
"neopress_analytics_summary",
|
|
@@ -1303,6 +1452,13 @@ const READ_ONLY_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1303
1452
|
"neopress_assets_list",
|
|
1304
1453
|
"neopress_asset_get",
|
|
1305
1454
|
"neopress_publish_preview",
|
|
1455
|
+
"neopress_domain_status",
|
|
1456
|
+
"neopress_search_console_connection_status",
|
|
1457
|
+
"neopress_billing_status",
|
|
1458
|
+
"neopress_team_list",
|
|
1459
|
+
"neopress_history_snapshots_list",
|
|
1460
|
+
"neopress_history_snapshot_get",
|
|
1461
|
+
"neopress_analytics_funnel_results",
|
|
1306
1462
|
"neopress_template_get"
|
|
1307
1463
|
]);
|
|
1308
1464
|
const DESTRUCTIVE_TOOLS = /* @__PURE__ */ new Set([
|
|
@@ -1328,15 +1484,48 @@ const DESTRUCTIVE_TOOLS = /* @__PURE__ */ new Set([
|
|
|
1328
1484
|
"neopress_analytics_event_delete",
|
|
1329
1485
|
"neopress_analytics_funnel_create",
|
|
1330
1486
|
"neopress_analytics_funnel_update",
|
|
1331
|
-
"neopress_analytics_funnel_delete"
|
|
1487
|
+
"neopress_analytics_funnel_delete",
|
|
1488
|
+
"neopress_domain_connect",
|
|
1489
|
+
"neopress_domain_remove",
|
|
1490
|
+
"neopress_search_console_disconnect",
|
|
1491
|
+
"neopress_billing_cancel",
|
|
1492
|
+
"neopress_team_member_update_role",
|
|
1493
|
+
"neopress_team_member_remove",
|
|
1494
|
+
"neopress_team_transfer_ownership",
|
|
1495
|
+
"neopress_form_response_delete",
|
|
1496
|
+
"neopress_history_snapshot_restore",
|
|
1497
|
+
"neopress_unpublish_pages",
|
|
1498
|
+
"neopress_undeploy_site"
|
|
1332
1499
|
]);
|
|
1333
|
-
const
|
|
1500
|
+
const OPEN_WORLD_TOOLS = /* @__PURE__ */ new Set([
|
|
1334
1501
|
"neopress_entry_publish",
|
|
1335
1502
|
"neopress_entry_unpublish",
|
|
1336
1503
|
"neopress_form_publish",
|
|
1337
|
-
"neopress_publish_site"
|
|
1504
|
+
"neopress_publish_site",
|
|
1505
|
+
"neopress_unpublish_pages",
|
|
1506
|
+
"neopress_undeploy_site",
|
|
1507
|
+
"neopress_domain_connect",
|
|
1508
|
+
"neopress_domain_refresh",
|
|
1509
|
+
"neopress_domain_remove",
|
|
1510
|
+
"neopress_search_console_authorize",
|
|
1511
|
+
"neopress_search_console_disconnect",
|
|
1512
|
+
"neopress_billing_checkout",
|
|
1513
|
+
"neopress_billing_portal",
|
|
1514
|
+
"neopress_billing_cancel",
|
|
1515
|
+
"neopress_billing_resume",
|
|
1516
|
+
"neopress_team_invite",
|
|
1517
|
+
"neopress_team_member_update_role",
|
|
1518
|
+
"neopress_team_member_remove",
|
|
1519
|
+
"neopress_team_transfer_ownership",
|
|
1520
|
+
"neopress_history_snapshot_restore"
|
|
1521
|
+
]);
|
|
1522
|
+
const IDEMPOTENT_TOOLS = /* @__PURE__ */ new Set([
|
|
1523
|
+
"neopress_site_select",
|
|
1524
|
+
"neopress_page_compile",
|
|
1525
|
+
"neopress_domain_refresh",
|
|
1526
|
+
"neopress_form_response_mark_read",
|
|
1527
|
+
"neopress_billing_resume"
|
|
1338
1528
|
]);
|
|
1339
|
-
const IDEMPOTENT_TOOLS = /* @__PURE__ */ new Set(["neopress_site_select", "neopress_page_compile"]);
|
|
1340
1529
|
function getToolAnnotations(tool) {
|
|
1341
1530
|
const readOnly = READ_ONLY_TOOLS.has(tool.name);
|
|
1342
1531
|
return {
|
|
@@ -1344,7 +1533,7 @@ function getToolAnnotations(tool) {
|
|
|
1344
1533
|
readOnlyHint: readOnly,
|
|
1345
1534
|
destructiveHint: readOnly ? false : DESTRUCTIVE_TOOLS.has(tool.name),
|
|
1346
1535
|
idempotentHint: readOnly || IDEMPOTENT_TOOLS.has(tool.name),
|
|
1347
|
-
openWorldHint:
|
|
1536
|
+
openWorldHint: OPEN_WORLD_TOOLS.has(tool.name)
|
|
1348
1537
|
};
|
|
1349
1538
|
}
|
|
1350
1539
|
function getToolMeta(tool) {
|
|
@@ -2638,6 +2827,247 @@ const toolDefinitions = [
|
|
|
2638
2827
|
return { ok: true };
|
|
2639
2828
|
}
|
|
2640
2829
|
},
|
|
2830
|
+
{
|
|
2831
|
+
name: "neopress_domain_status",
|
|
2832
|
+
title: "Get Custom Domain Status",
|
|
2833
|
+
description: "Get the active site's connected custom domain and verification status.",
|
|
2834
|
+
inputSchema: siteIdShape,
|
|
2835
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).domains.status()
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
name: "neopress_domain_connect",
|
|
2839
|
+
title: "Connect Custom Domain",
|
|
2840
|
+
description: "Connect a custom domain. Changes public routing and may require DNS updates.",
|
|
2841
|
+
inputSchema: {
|
|
2842
|
+
...siteIdShape,
|
|
2843
|
+
domain: z.string().min(1)
|
|
2844
|
+
},
|
|
2845
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).domains.connect(asString(input, "domain"))
|
|
2846
|
+
},
|
|
2847
|
+
{
|
|
2848
|
+
name: "neopress_domain_refresh",
|
|
2849
|
+
title: "Refresh Custom Domain",
|
|
2850
|
+
description: "Refresh DNS and verification status for the currently connected domain.",
|
|
2851
|
+
inputSchema: siteIdShape,
|
|
2852
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).domains.refresh()
|
|
2853
|
+
},
|
|
2854
|
+
{
|
|
2855
|
+
name: "neopress_domain_remove",
|
|
2856
|
+
title: "Remove Custom Domain",
|
|
2857
|
+
description: "Remove the exact currently connected domain. Call the status tool first and pass that exact domain.",
|
|
2858
|
+
inputSchema: {
|
|
2859
|
+
...siteIdShape,
|
|
2860
|
+
domain: z.string().min(1)
|
|
2861
|
+
},
|
|
2862
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).domains.remove(asString(input, "domain"))
|
|
2863
|
+
},
|
|
2864
|
+
{
|
|
2865
|
+
name: "neopress_search_console_connection_status",
|
|
2866
|
+
title: "Get Search Console Connection",
|
|
2867
|
+
description: "Get Google Search Console authorization and property connection status.",
|
|
2868
|
+
inputSchema: siteIdShape,
|
|
2869
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).searchConsole.status()
|
|
2870
|
+
},
|
|
2871
|
+
{
|
|
2872
|
+
name: "neopress_search_console_authorize",
|
|
2873
|
+
title: "Authorize Search Console",
|
|
2874
|
+
description: "Create a Google OAuth URL that the user must open and complete.",
|
|
2875
|
+
inputSchema: {
|
|
2876
|
+
...siteIdShape,
|
|
2877
|
+
locale: z.string().optional()
|
|
2878
|
+
},
|
|
2879
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).searchConsole.authorize(asOptionalString(input, "locale"))
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
name: "neopress_search_console_disconnect",
|
|
2883
|
+
title: "Disconnect Search Console",
|
|
2884
|
+
description: "Disconnect the site's Google Search Console integration.",
|
|
2885
|
+
inputSchema: siteIdShape,
|
|
2886
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).searchConsole.disconnect()
|
|
2887
|
+
},
|
|
2888
|
+
{
|
|
2889
|
+
name: "neopress_billing_status",
|
|
2890
|
+
title: "Get Billing Status",
|
|
2891
|
+
description: "Get owner-only plan and subscription status for the active site.",
|
|
2892
|
+
inputSchema: siteIdShape,
|
|
2893
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).billing.status()
|
|
2894
|
+
},
|
|
2895
|
+
{
|
|
2896
|
+
name: "neopress_billing_checkout",
|
|
2897
|
+
title: "Create Billing Checkout",
|
|
2898
|
+
description: "Create a checkout URL for the user to open. Does not itself complete payment.",
|
|
2899
|
+
inputSchema: {
|
|
2900
|
+
...siteIdShape,
|
|
2901
|
+
plan: z.enum(["launch", "growth"])
|
|
2902
|
+
},
|
|
2903
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).billing.checkout(input.plan)
|
|
2904
|
+
},
|
|
2905
|
+
{
|
|
2906
|
+
name: "neopress_billing_portal",
|
|
2907
|
+
title: "Create Billing Portal",
|
|
2908
|
+
description: "Create a customer-portal URL for the owner to open.",
|
|
2909
|
+
inputSchema: siteIdShape,
|
|
2910
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).billing.portal()
|
|
2911
|
+
},
|
|
2912
|
+
{
|
|
2913
|
+
name: "neopress_billing_cancel",
|
|
2914
|
+
title: "Cancel Subscription",
|
|
2915
|
+
description: "Schedule the site's subscription to cancel at the end of the billing period.",
|
|
2916
|
+
inputSchema: siteIdShape,
|
|
2917
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).billing.cancel()
|
|
2918
|
+
},
|
|
2919
|
+
{
|
|
2920
|
+
name: "neopress_billing_resume",
|
|
2921
|
+
title: "Resume Subscription",
|
|
2922
|
+
description: "Remove a scheduled end-of-period subscription cancellation.",
|
|
2923
|
+
inputSchema: siteIdShape,
|
|
2924
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).billing.resume()
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
name: "neopress_team_list",
|
|
2928
|
+
title: "List Project Team",
|
|
2929
|
+
description: "List active members and pending invitations. Requires owner or admin.",
|
|
2930
|
+
inputSchema: siteIdShape,
|
|
2931
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).team.list()
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
name: "neopress_team_invite",
|
|
2935
|
+
title: "Invite Project Member",
|
|
2936
|
+
description: "Invite a member. Seat limits and owner-only admin invitation rules apply.",
|
|
2937
|
+
inputSchema: {
|
|
2938
|
+
...siteIdShape,
|
|
2939
|
+
email: z.string().email(),
|
|
2940
|
+
role: z.enum([
|
|
2941
|
+
"admin",
|
|
2942
|
+
"editor",
|
|
2943
|
+
"viewer"
|
|
2944
|
+
]),
|
|
2945
|
+
locale: z.string().optional()
|
|
2946
|
+
},
|
|
2947
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).team.invite({
|
|
2948
|
+
email: asString(input, "email"),
|
|
2949
|
+
role: input.role,
|
|
2950
|
+
locale: asOptionalString(input, "locale")
|
|
2951
|
+
})
|
|
2952
|
+
},
|
|
2953
|
+
{
|
|
2954
|
+
name: "neopress_team_member_update_role",
|
|
2955
|
+
title: "Update Project Member Role",
|
|
2956
|
+
description: "Change an active member's role preset. Owner and seat rules apply.",
|
|
2957
|
+
inputSchema: {
|
|
2958
|
+
...siteIdShape,
|
|
2959
|
+
profileId: z.string().uuid(),
|
|
2960
|
+
role: z.enum([
|
|
2961
|
+
"admin",
|
|
2962
|
+
"editor",
|
|
2963
|
+
"viewer"
|
|
2964
|
+
])
|
|
2965
|
+
},
|
|
2966
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).team.updateRole(asString(input, "profileId"), input.role)
|
|
2967
|
+
},
|
|
2968
|
+
{
|
|
2969
|
+
name: "neopress_team_member_remove",
|
|
2970
|
+
title: "Remove Project Member",
|
|
2971
|
+
description: "Remove an active member. The owner cannot be removed.",
|
|
2972
|
+
inputSchema: {
|
|
2973
|
+
...siteIdShape,
|
|
2974
|
+
profileId: z.string().uuid()
|
|
2975
|
+
},
|
|
2976
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).team.remove(asString(input, "profileId"))
|
|
2977
|
+
},
|
|
2978
|
+
{
|
|
2979
|
+
name: "neopress_team_transfer_ownership",
|
|
2980
|
+
title: "Transfer Project Ownership",
|
|
2981
|
+
description: "Transfer ownership atomically to an active member. Owner-only.",
|
|
2982
|
+
inputSchema: {
|
|
2983
|
+
...siteIdShape,
|
|
2984
|
+
profileId: z.string().uuid()
|
|
2985
|
+
},
|
|
2986
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).team.transferOwnership(asString(input, "profileId"))
|
|
2987
|
+
},
|
|
2988
|
+
{
|
|
2989
|
+
name: "neopress_form_response_get",
|
|
2990
|
+
title: "Get Form Response",
|
|
2991
|
+
description: "Get one form response by form and response ID.",
|
|
2992
|
+
inputSchema: {
|
|
2993
|
+
...siteIdShape,
|
|
2994
|
+
formId: z.number().int().positive(),
|
|
2995
|
+
responseId: z.number().int().positive()
|
|
2996
|
+
},
|
|
2997
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).forms.getResponse(asNumber(input, "formId"), asNumber(input, "responseId"))
|
|
2998
|
+
},
|
|
2999
|
+
{
|
|
3000
|
+
name: "neopress_form_response_mark_read",
|
|
3001
|
+
title: "Mark Form Response Read",
|
|
3002
|
+
description: "Mark one form response as read.",
|
|
3003
|
+
inputSchema: {
|
|
3004
|
+
...siteIdShape,
|
|
3005
|
+
formId: z.number().int().positive(),
|
|
3006
|
+
responseId: z.number().int().positive()
|
|
3007
|
+
},
|
|
3008
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).forms.markResponseRead(asNumber(input, "formId"), asNumber(input, "responseId"))
|
|
3009
|
+
},
|
|
3010
|
+
{
|
|
3011
|
+
name: "neopress_form_response_delete",
|
|
3012
|
+
title: "Delete Form Response",
|
|
3013
|
+
description: "Soft-delete one form response.",
|
|
3014
|
+
inputSchema: {
|
|
3015
|
+
...siteIdShape,
|
|
3016
|
+
formId: z.number().int().positive(),
|
|
3017
|
+
responseId: z.number().int().positive()
|
|
3018
|
+
},
|
|
3019
|
+
handler: async (input, context, extra) => {
|
|
3020
|
+
await (await context.createClient({ siteId: siteId(input) }, extra)).forms.deleteResponse(asNumber(input, "formId"), asNumber(input, "responseId"));
|
|
3021
|
+
return { ok: true };
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
name: "neopress_history_snapshots_list",
|
|
3026
|
+
title: "List Site Snapshots",
|
|
3027
|
+
description: "List restorable page, layout, collection, and form snapshots.",
|
|
3028
|
+
inputSchema: {
|
|
3029
|
+
...siteIdShape,
|
|
3030
|
+
limit: z.number().int().positive().max(100).optional()
|
|
3031
|
+
},
|
|
3032
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).history.list(asOptionalNumber(input, "limit"))
|
|
3033
|
+
},
|
|
3034
|
+
{
|
|
3035
|
+
name: "neopress_history_snapshot_get",
|
|
3036
|
+
title: "Get Site Snapshot",
|
|
3037
|
+
description: "Get one exact restorable snapshot and its stored data.",
|
|
3038
|
+
inputSchema: {
|
|
3039
|
+
...siteIdShape,
|
|
3040
|
+
snapshotId: z.number().int().positive()
|
|
3041
|
+
},
|
|
3042
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).history.get(asNumber(input, "snapshotId"))
|
|
3043
|
+
},
|
|
3044
|
+
{
|
|
3045
|
+
name: "neopress_history_snapshot_restore",
|
|
3046
|
+
title: "Restore Site Snapshot",
|
|
3047
|
+
description: "Restore one exact page, layout, collection, or form snapshot. Draft state changes; page visibility and form settings may affect live behavior immediately.",
|
|
3048
|
+
inputSchema: {
|
|
3049
|
+
...siteIdShape,
|
|
3050
|
+
snapshotId: z.number().int().positive()
|
|
3051
|
+
},
|
|
3052
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).history.restore(asNumber(input, "snapshotId"))
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
name: "neopress_analytics_funnel_results",
|
|
3056
|
+
title: "Get Saved Funnel Results",
|
|
3057
|
+
description: "Get aggregate results for a saved funnel. Steps and filters are resolved from the tenant-owned definition.",
|
|
3058
|
+
inputSchema: {
|
|
3059
|
+
...siteIdShape,
|
|
3060
|
+
funnelId: z.string().uuid(),
|
|
3061
|
+
dateFrom: z.string().optional(),
|
|
3062
|
+
dateTo: z.string().optional(),
|
|
3063
|
+
timezone: z.string().optional()
|
|
3064
|
+
},
|
|
3065
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).analytics.funnels.results(asString(input, "funnelId"), {
|
|
3066
|
+
dateFrom: asOptionalString(input, "dateFrom"),
|
|
3067
|
+
dateTo: asOptionalString(input, "dateTo"),
|
|
3068
|
+
timezone: asOptionalString(input, "timezone")
|
|
3069
|
+
})
|
|
3070
|
+
},
|
|
2641
3071
|
{
|
|
2642
3072
|
name: "neopress_publish_preview",
|
|
2643
3073
|
title: "Preview Site Publish",
|
|
@@ -2651,10 +3081,35 @@ const toolDefinitions = [
|
|
|
2651
3081
|
name: "neopress_publish_site",
|
|
2652
3082
|
title: "Publish Site",
|
|
2653
3083
|
description: "Publish layout, pages, collections, and forms from draft to production. Does not publish draft entry rows.",
|
|
2654
|
-
inputSchema:
|
|
3084
|
+
inputSchema: {
|
|
3085
|
+
...siteIdShape,
|
|
3086
|
+
selection: z.object({
|
|
3087
|
+
pageIds: z.array(z.number().int().positive()).optional(),
|
|
3088
|
+
collectionIds: z.array(z.number().int().positive()).optional(),
|
|
3089
|
+
formIds: z.array(z.number().int().positive()).optional(),
|
|
3090
|
+
includeLayout: z.boolean().optional()
|
|
3091
|
+
}).optional()
|
|
3092
|
+
},
|
|
2655
3093
|
handler: async (input, context, extra) => {
|
|
2656
|
-
return (await context.createClient({ siteId: siteId(input) }, extra)).publish.site();
|
|
3094
|
+
return (await context.createClient({ siteId: siteId(input) }, extra)).publish.site(input.selection);
|
|
2657
3095
|
}
|
|
3096
|
+
},
|
|
3097
|
+
{
|
|
3098
|
+
name: "neopress_unpublish_pages",
|
|
3099
|
+
title: "Unpublish Site Pages",
|
|
3100
|
+
description: "Remove exact page IDs from production without deleting their draft state.",
|
|
3101
|
+
inputSchema: {
|
|
3102
|
+
...siteIdShape,
|
|
3103
|
+
pageIds: z.array(z.number().int().positive()).min(1)
|
|
3104
|
+
},
|
|
3105
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).publish.unpublishPages(input.pageIds)
|
|
3106
|
+
},
|
|
3107
|
+
{
|
|
3108
|
+
name: "neopress_undeploy_site",
|
|
3109
|
+
title: "Undeploy Site",
|
|
3110
|
+
description: "Take the whole site offline while preserving draft state.",
|
|
3111
|
+
inputSchema: siteIdShape,
|
|
3112
|
+
handler: async (input, context, extra) => (await context.createClient({ siteId: siteId(input) }, extra)).publish.undeploy()
|
|
2658
3113
|
}
|
|
2659
3114
|
];
|
|
2660
3115
|
function registerNeopressTools(server, context = createDefaultToolContext(), options = {}) {
|