@centrali-io/centrali-mcp 4.2.8 → 4.2.10
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/tools/compute.js +1 -1
- package/dist/tools/describe.js +34 -18
- package/package.json +1 -1
- package/src/tools/compute.ts +1 -1
- package/src/tools/describe.ts +34 -18
package/dist/tools/compute.js
CHANGED
|
@@ -346,7 +346,7 @@ function registerComputeTools(server, sdk) {
|
|
|
346
346
|
triggerMetadata: zod_1.z
|
|
347
347
|
.record(zod_1.z.string(), zod_1.z.any())
|
|
348
348
|
.optional()
|
|
349
|
-
.describe("Type-specific configuration. For event-driven: {
|
|
349
|
+
.describe("Type-specific configuration. For event-driven: { eventType, recordSlug } where eventType is record_created | record_updated | record_deleted. For scheduled: { scheduleType, cronExpression, timezone }. For http-trigger: auto-generated URL."),
|
|
350
350
|
enabled: zod_1.z.boolean().optional().describe("Whether the trigger is enabled (default: true)"),
|
|
351
351
|
}, (_a) => __awaiter(this, [_a], void 0, function* ({ name, functionId, executionType, description, triggerMetadata, enabled }) {
|
|
352
352
|
try {
|
package/dist/tools/describe.js
CHANGED
|
@@ -394,9 +394,9 @@ function registerDescribeTools(server) {
|
|
|
394
394
|
"event-driven": {
|
|
395
395
|
description: "Automatically fires when a data event occurs (record created, updated, deleted).",
|
|
396
396
|
event_types: [
|
|
397
|
-
"
|
|
398
|
-
"
|
|
399
|
-
"
|
|
397
|
+
"record_created — fires after a new record is created",
|
|
398
|
+
"record_updated — fires after a record is modified",
|
|
399
|
+
"record_deleted — fires after a record is deleted",
|
|
400
400
|
],
|
|
401
401
|
config: "Specify the collection (structureId) and event type to listen for",
|
|
402
402
|
},
|
|
@@ -459,7 +459,7 @@ function registerDescribeTools(server) {
|
|
|
459
459
|
required_params: ["name", "functionId", "executionType"],
|
|
460
460
|
optional_params: ["description", "triggerMetadata", "enabled"],
|
|
461
461
|
triggerMetadata_examples: {
|
|
462
|
-
"event-driven": {
|
|
462
|
+
"event-driven": { eventType: "record_created", recordSlug: "orders" },
|
|
463
463
|
scheduled: { scheduleType: "cron", cronExpression: "0 9 * * *", timezone: "America/New_York" },
|
|
464
464
|
},
|
|
465
465
|
},
|
|
@@ -893,12 +893,27 @@ function registerDescribeTools(server) {
|
|
|
893
893
|
inherit: "boolean — if true, inherits the workspace theme. Usually set to true.",
|
|
894
894
|
},
|
|
895
895
|
},
|
|
896
|
+
draft_vs_publish: {
|
|
897
|
+
description: "Drafts are lenient — most fields are optional and will default. Publishing validates strictly. Always provide the fields below to avoid 400 errors.",
|
|
898
|
+
always_required_even_in_drafts: [
|
|
899
|
+
"sections[*].id — MUST be a valid UUID",
|
|
900
|
+
"sections[*].blocks — array (can be empty)",
|
|
901
|
+
"blocks[*].id — MUST be a valid UUID",
|
|
902
|
+
],
|
|
903
|
+
required_for_publish: [
|
|
904
|
+
"sections[*].kind — enum (see section_kinds)",
|
|
905
|
+
"sections[*].title — non-empty string",
|
|
906
|
+
"sections[*].layout — enum (see section_layouts)",
|
|
907
|
+
"blocks[*].blockType — non-empty string",
|
|
908
|
+
"theme.inherit — boolean",
|
|
909
|
+
],
|
|
910
|
+
},
|
|
896
911
|
section_shape: {
|
|
897
|
-
id: "string —
|
|
898
|
-
kind: "'content' | 'metrics' | 'exceptions' | 'actions' | 'hero' | 'supporting'",
|
|
899
|
-
title: "string — section heading displayed to users",
|
|
900
|
-
layout: "'single-column' | 'two-column' | 'metric-strip' | 'stack'",
|
|
901
|
-
blocks: "PageBlock[] — array of blocks in this section",
|
|
912
|
+
id: "string — MUST be a valid UUID (e.g., crypto.randomUUID()). Non-UUID strings will cause 400 errors.",
|
|
913
|
+
kind: "'content' | 'metrics' | 'exceptions' | 'actions' | 'hero' | 'supporting' — optional in drafts, required for publish",
|
|
914
|
+
title: "string — section heading displayed to users. Optional in drafts, required (non-empty) for publish.",
|
|
915
|
+
layout: "'single-column' | 'two-column' | 'metric-strip' | 'stack' — optional in drafts, required for publish",
|
|
916
|
+
blocks: "PageBlock[] — array of blocks in this section (required, can be empty)",
|
|
902
917
|
},
|
|
903
918
|
section_kinds: {
|
|
904
919
|
hero: "Top of page — typically a title/summary or key metric. Use for detail pages.",
|
|
@@ -915,8 +930,8 @@ function registerDescribeTools(server) {
|
|
|
915
930
|
stack: "Compact vertical stack",
|
|
916
931
|
},
|
|
917
932
|
block_shape: {
|
|
918
|
-
id: "string —
|
|
919
|
-
blockType: "string — the type of UI component (see describe_page_blocks for all types)",
|
|
933
|
+
id: "string — MUST be a valid UUID. Non-UUID strings will cause 400 errors.",
|
|
934
|
+
blockType: "string — the type of UI component (see describe_page_blocks for all types). Optional in drafts, required (non-empty) for publish.",
|
|
920
935
|
dataSource: "DataSource | null — where this block gets its data (see below)",
|
|
921
936
|
presentation: "BlockPresentation | null — display options (density, columns, chart type, emphasis rules)",
|
|
922
937
|
actions: "BlockAction[] | null — interactive actions (buttons, row clicks, form submissions). See describe_page_actions.",
|
|
@@ -954,16 +969,17 @@ function registerDescribeTools(server) {
|
|
|
954
969
|
comparison: "{ type: 'previous-period' | 'target' | 'baseline', value: number } — for metrics comparison",
|
|
955
970
|
nextActionLabel: "string — label for a suggested next action (e.g., 'View all orders')",
|
|
956
971
|
},
|
|
972
|
+
IMPORTANT_all_ids_must_be_uuids: "Section IDs and block IDs MUST be valid UUIDs (e.g., 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'). Using slugs like 'main-content' will cause a 400 error.",
|
|
957
973
|
example_list_page_definition: {
|
|
958
974
|
sections: [
|
|
959
975
|
{
|
|
960
|
-
id: "
|
|
976
|
+
id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
961
977
|
kind: "content",
|
|
962
978
|
title: "All Customers",
|
|
963
979
|
layout: "single-column",
|
|
964
980
|
blocks: [
|
|
965
981
|
{
|
|
966
|
-
id: "
|
|
982
|
+
id: "d290f1ee-6c54-4b01-90e6-d701748f0851",
|
|
967
983
|
blockType: "data-table",
|
|
968
984
|
dataSource: {
|
|
969
985
|
type: "structure",
|
|
@@ -991,13 +1007,13 @@ function registerDescribeTools(server) {
|
|
|
991
1007
|
example_dashboard_definition: {
|
|
992
1008
|
sections: [
|
|
993
1009
|
{
|
|
994
|
-
id: "
|
|
1010
|
+
id: "c73bcdcc-2669-4bf6-81d3-e4ae73fb11fd",
|
|
995
1011
|
kind: "metrics",
|
|
996
1012
|
title: "Key Metrics",
|
|
997
1013
|
layout: "metric-strip",
|
|
998
1014
|
blocks: [
|
|
999
1015
|
{
|
|
1000
|
-
id: "
|
|
1016
|
+
id: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
|
|
1001
1017
|
blockType: "metric-card",
|
|
1002
1018
|
dataSource: {
|
|
1003
1019
|
type: "structure",
|
|
@@ -1013,7 +1029,7 @@ function registerDescribeTools(server) {
|
|
|
1013
1029
|
},
|
|
1014
1030
|
},
|
|
1015
1031
|
{
|
|
1016
|
-
id: "
|
|
1032
|
+
id: "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
|
|
1017
1033
|
blockType: "metric-card",
|
|
1018
1034
|
dataSource: {
|
|
1019
1035
|
type: "structure",
|
|
@@ -1033,13 +1049,13 @@ function registerDescribeTools(server) {
|
|
|
1033
1049
|
],
|
|
1034
1050
|
},
|
|
1035
1051
|
{
|
|
1036
|
-
id: "
|
|
1052
|
+
id: "6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b",
|
|
1037
1053
|
kind: "content",
|
|
1038
1054
|
title: "Trends",
|
|
1039
1055
|
layout: "two-column",
|
|
1040
1056
|
blocks: [
|
|
1041
1057
|
{
|
|
1042
|
-
id: "
|
|
1058
|
+
id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1043
1059
|
blockType: "chart",
|
|
1044
1060
|
dataSource: {
|
|
1045
1061
|
type: "structure",
|
package/package.json
CHANGED
package/src/tools/compute.ts
CHANGED
|
@@ -389,7 +389,7 @@ export function registerComputeTools(server: McpServer, sdk: CentraliSDK) {
|
|
|
389
389
|
triggerMetadata: z
|
|
390
390
|
.record(z.string(), z.any())
|
|
391
391
|
.optional()
|
|
392
|
-
.describe("Type-specific configuration. For event-driven: {
|
|
392
|
+
.describe("Type-specific configuration. For event-driven: { eventType, recordSlug } where eventType is record_created | record_updated | record_deleted. For scheduled: { scheduleType, cronExpression, timezone }. For http-trigger: auto-generated URL."),
|
|
393
393
|
enabled: z.boolean().optional().describe("Whether the trigger is enabled (default: true)"),
|
|
394
394
|
},
|
|
395
395
|
async ({ name, functionId, executionType, description, triggerMetadata, enabled }) => {
|
package/src/tools/describe.ts
CHANGED
|
@@ -461,9 +461,9 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
461
461
|
description:
|
|
462
462
|
"Automatically fires when a data event occurs (record created, updated, deleted).",
|
|
463
463
|
event_types: [
|
|
464
|
-
"
|
|
465
|
-
"
|
|
466
|
-
"
|
|
464
|
+
"record_created — fires after a new record is created",
|
|
465
|
+
"record_updated — fires after a record is modified",
|
|
466
|
+
"record_deleted — fires after a record is deleted",
|
|
467
467
|
],
|
|
468
468
|
config:
|
|
469
469
|
"Specify the collection (structureId) and event type to listen for",
|
|
@@ -529,7 +529,7 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
529
529
|
required_params: ["name", "functionId", "executionType"],
|
|
530
530
|
optional_params: ["description", "triggerMetadata", "enabled"],
|
|
531
531
|
triggerMetadata_examples: {
|
|
532
|
-
"event-driven": {
|
|
532
|
+
"event-driven": { eventType: "record_created", recordSlug: "orders" },
|
|
533
533
|
scheduled: { scheduleType: "cron", cronExpression: "0 9 * * *", timezone: "America/New_York" },
|
|
534
534
|
},
|
|
535
535
|
},
|
|
@@ -1055,13 +1055,28 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
1055
1055
|
"boolean — if true, inherits the workspace theme. Usually set to true.",
|
|
1056
1056
|
},
|
|
1057
1057
|
},
|
|
1058
|
+
draft_vs_publish: {
|
|
1059
|
+
description: "Drafts are lenient — most fields are optional and will default. Publishing validates strictly. Always provide the fields below to avoid 400 errors.",
|
|
1060
|
+
always_required_even_in_drafts: [
|
|
1061
|
+
"sections[*].id — MUST be a valid UUID",
|
|
1062
|
+
"sections[*].blocks — array (can be empty)",
|
|
1063
|
+
"blocks[*].id — MUST be a valid UUID",
|
|
1064
|
+
],
|
|
1065
|
+
required_for_publish: [
|
|
1066
|
+
"sections[*].kind — enum (see section_kinds)",
|
|
1067
|
+
"sections[*].title — non-empty string",
|
|
1068
|
+
"sections[*].layout — enum (see section_layouts)",
|
|
1069
|
+
"blocks[*].blockType — non-empty string",
|
|
1070
|
+
"theme.inherit — boolean",
|
|
1071
|
+
],
|
|
1072
|
+
},
|
|
1058
1073
|
section_shape: {
|
|
1059
|
-
id: "string —
|
|
1060
|
-
kind: "'content' | 'metrics' | 'exceptions' | 'actions' | 'hero' | 'supporting'",
|
|
1061
|
-
title: "string — section heading displayed to users",
|
|
1074
|
+
id: "string — MUST be a valid UUID (e.g., crypto.randomUUID()). Non-UUID strings will cause 400 errors.",
|
|
1075
|
+
kind: "'content' | 'metrics' | 'exceptions' | 'actions' | 'hero' | 'supporting' — optional in drafts, required for publish",
|
|
1076
|
+
title: "string — section heading displayed to users. Optional in drafts, required (non-empty) for publish.",
|
|
1062
1077
|
layout:
|
|
1063
|
-
"'single-column' | 'two-column' | 'metric-strip' | 'stack'",
|
|
1064
|
-
blocks: "PageBlock[] — array of blocks in this section",
|
|
1078
|
+
"'single-column' | 'two-column' | 'metric-strip' | 'stack' — optional in drafts, required for publish",
|
|
1079
|
+
blocks: "PageBlock[] — array of blocks in this section (required, can be empty)",
|
|
1065
1080
|
},
|
|
1066
1081
|
section_kinds: {
|
|
1067
1082
|
hero: "Top of page — typically a title/summary or key metric. Use for detail pages.",
|
|
@@ -1084,9 +1099,9 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
1084
1099
|
stack: "Compact vertical stack",
|
|
1085
1100
|
},
|
|
1086
1101
|
block_shape: {
|
|
1087
|
-
id: "string —
|
|
1102
|
+
id: "string — MUST be a valid UUID. Non-UUID strings will cause 400 errors.",
|
|
1088
1103
|
blockType:
|
|
1089
|
-
"string — the type of UI component (see describe_page_blocks for all types)",
|
|
1104
|
+
"string — the type of UI component (see describe_page_blocks for all types). Optional in drafts, required (non-empty) for publish.",
|
|
1090
1105
|
dataSource:
|
|
1091
1106
|
"DataSource | null — where this block gets its data (see below)",
|
|
1092
1107
|
presentation:
|
|
@@ -1140,16 +1155,17 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
1140
1155
|
nextActionLabel:
|
|
1141
1156
|
"string — label for a suggested next action (e.g., 'View all orders')",
|
|
1142
1157
|
},
|
|
1158
|
+
IMPORTANT_all_ids_must_be_uuids: "Section IDs and block IDs MUST be valid UUIDs (e.g., 'a1b2c3d4-e5f6-7890-abcd-ef1234567890'). Using slugs like 'main-content' will cause a 400 error.",
|
|
1143
1159
|
example_list_page_definition: {
|
|
1144
1160
|
sections: [
|
|
1145
1161
|
{
|
|
1146
|
-
id: "
|
|
1162
|
+
id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
|
|
1147
1163
|
kind: "content",
|
|
1148
1164
|
title: "All Customers",
|
|
1149
1165
|
layout: "single-column",
|
|
1150
1166
|
blocks: [
|
|
1151
1167
|
{
|
|
1152
|
-
id: "
|
|
1168
|
+
id: "d290f1ee-6c54-4b01-90e6-d701748f0851",
|
|
1153
1169
|
blockType: "data-table",
|
|
1154
1170
|
dataSource: {
|
|
1155
1171
|
type: "structure",
|
|
@@ -1177,13 +1193,13 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
1177
1193
|
example_dashboard_definition: {
|
|
1178
1194
|
sections: [
|
|
1179
1195
|
{
|
|
1180
|
-
id: "
|
|
1196
|
+
id: "c73bcdcc-2669-4bf6-81d3-e4ae73fb11fd",
|
|
1181
1197
|
kind: "metrics",
|
|
1182
1198
|
title: "Key Metrics",
|
|
1183
1199
|
layout: "metric-strip",
|
|
1184
1200
|
blocks: [
|
|
1185
1201
|
{
|
|
1186
|
-
id: "
|
|
1202
|
+
id: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
|
|
1187
1203
|
blockType: "metric-card",
|
|
1188
1204
|
dataSource: {
|
|
1189
1205
|
type: "structure",
|
|
@@ -1199,7 +1215,7 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
1199
1215
|
},
|
|
1200
1216
|
},
|
|
1201
1217
|
{
|
|
1202
|
-
id: "
|
|
1218
|
+
id: "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed",
|
|
1203
1219
|
blockType: "metric-card",
|
|
1204
1220
|
dataSource: {
|
|
1205
1221
|
type: "structure",
|
|
@@ -1219,13 +1235,13 @@ export function registerDescribeTools(server: McpServer) {
|
|
|
1219
1235
|
],
|
|
1220
1236
|
},
|
|
1221
1237
|
{
|
|
1222
|
-
id: "
|
|
1238
|
+
id: "6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b",
|
|
1223
1239
|
kind: "content",
|
|
1224
1240
|
title: "Trends",
|
|
1225
1241
|
layout: "two-column",
|
|
1226
1242
|
blocks: [
|
|
1227
1243
|
{
|
|
1228
|
-
id: "
|
|
1244
|
+
id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1229
1245
|
blockType: "chart",
|
|
1230
1246
|
dataSource: {
|
|
1231
1247
|
type: "structure",
|