@centrali-io/centrali-mcp 4.2.3 → 4.2.5

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.
@@ -469,6 +469,16 @@ function registerDescribeTools(server) {
469
469
  required_params: ["triggerId"],
470
470
  },
471
471
  },
472
+ sandbox_api: {
473
+ description: "Functions receive an `api` object with built-in utilities. Key crypto methods:",
474
+ crypto: {
475
+ "api.crypto.sha256(data)": "SHA256 hash → base64 string",
476
+ "api.crypto.hmacSha256(key, data, options?)": "HMAC-SHA256 → base64 string. options: { keyEncoding: 'utf8' | 'base64' }",
477
+ "api.crypto.rsaSign(privateKeyPem, data, algorithm?)": "RSA signature → base64url string. algorithm: 'RS256' (default), 'RS384', 'RS512'",
478
+ "api.crypto.signJwt(privateKeyPem, payload, options?)": "Build + sign a JWT → 'header.payload.signature'. options: { algorithm, expiresIn (seconds), issuer }",
479
+ },
480
+ note: "Private keys should be stored as encrypted trigger params. signJwt automatically sets iat and supports RS256/RS384/RS512.",
481
+ },
472
482
  tips: [
473
483
  "Use list_functions to see all available functions",
474
484
  "Use list_triggers to see how functions are wired to execution events",
@@ -477,6 +487,7 @@ function registerDescribeTools(server) {
477
487
  "Use pause_trigger/resume_trigger to temporarily disable triggers without deleting them",
478
488
  "Use test_function to validate code before creating or updating a function",
479
489
  "Use create_function + create_trigger together to set up a complete compute pipeline",
490
+ "Use api.crypto.signJwt() for GitHub App, Google Cloud, or Azure AD authentication flows",
480
491
  ],
481
492
  }, null, 2),
482
493
  },
@@ -135,9 +135,9 @@ function registerCollectionTools(server, sdk) {
135
135
  };
136
136
  }
137
137
  }));
138
- server.tool("create_collection", "Create a new data collection (schema). Define the name, slug, description, and properties (fields) for the collection.", {
138
+ server.tool("create_collection", "Create a new data collection (schema). Define the name, recordSlug, description, and properties (fields) for the collection.", {
139
139
  name: zod_1.z.string().describe("Display name for the collection (e.g., 'Customers')"),
140
- slug: zod_1.z.string().describe("URL-safe identifier used in API calls (e.g., 'customers')"),
140
+ recordSlug: zod_1.z.string().describe("URL-safe identifier used in API calls (e.g., 'customers'). This is the recordSlug, not 'slug'."),
141
141
  description: zod_1.z.string().optional().describe("Optional description of the collection"),
142
142
  properties: zod_1.z
143
143
  .array(zod_1.z.record(zod_1.z.string(), zod_1.z.any()))
@@ -149,9 +149,9 @@ function registerCollectionTools(server, sdk) {
149
149
  .optional()
150
150
  .describe("Schema discovery mode: 'strict' rejects unknown fields, 'flexible' auto-adds them"),
151
151
  tags: zod_1.z.array(zod_1.z.string()).optional().describe("Optional tags for organizing collections"),
152
- }, (_a) => __awaiter(this, [_a], void 0, function* ({ name, slug, description, properties, enableVersioning, schemaDiscoveryMode, tags }) {
152
+ }, (_a) => __awaiter(this, [_a], void 0, function* ({ name, recordSlug, description, properties, enableVersioning, schemaDiscoveryMode, tags }) {
153
153
  try {
154
- const input = { name, slug };
154
+ const input = { name, recordSlug };
155
155
  if (description !== undefined)
156
156
  input.description = description;
157
157
  if (properties !== undefined)
@@ -174,7 +174,7 @@ function registerCollectionTools(server, sdk) {
174
174
  content: [
175
175
  {
176
176
  type: "text",
177
- text: formatError(error, `creating collection '${slug}'`),
177
+ text: formatError(error, `creating collection '${recordSlug}'`),
178
178
  },
179
179
  ],
180
180
  isError: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centrali-io/centrali-mcp",
3
- "version": "4.2.3",
3
+ "version": "4.2.5",
4
4
  "description": "Centrali MCP Server - AI assistant integration for Centrali workspaces",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -25,7 +25,7 @@
25
25
  "author": "Blueinit",
26
26
  "license": "ISC",
27
27
  "dependencies": {
28
- "@centrali-io/centrali-sdk": "^4.2.0",
28
+ "@centrali-io/centrali-sdk": "^4.2.4",
29
29
  "@modelcontextprotocol/sdk": "^1.12.1"
30
30
  },
31
31
  "devDependencies": {
@@ -539,6 +539,16 @@ export function registerDescribeTools(server: McpServer) {
539
539
  required_params: ["triggerId"],
540
540
  },
541
541
  },
542
+ sandbox_api: {
543
+ description: "Functions receive an `api` object with built-in utilities. Key crypto methods:",
544
+ crypto: {
545
+ "api.crypto.sha256(data)": "SHA256 hash → base64 string",
546
+ "api.crypto.hmacSha256(key, data, options?)": "HMAC-SHA256 → base64 string. options: { keyEncoding: 'utf8' | 'base64' }",
547
+ "api.crypto.rsaSign(privateKeyPem, data, algorithm?)": "RSA signature → base64url string. algorithm: 'RS256' (default), 'RS384', 'RS512'",
548
+ "api.crypto.signJwt(privateKeyPem, payload, options?)": "Build + sign a JWT → 'header.payload.signature'. options: { algorithm, expiresIn (seconds), issuer }",
549
+ },
550
+ note: "Private keys should be stored as encrypted trigger params. signJwt automatically sets iat and supports RS256/RS384/RS512.",
551
+ },
542
552
  tips: [
543
553
  "Use list_functions to see all available functions",
544
554
  "Use list_triggers to see how functions are wired to execution events",
@@ -547,6 +557,7 @@ export function registerDescribeTools(server: McpServer) {
547
557
  "Use pause_trigger/resume_trigger to temporarily disable triggers without deleting them",
548
558
  "Use test_function to validate code before creating or updating a function",
549
559
  "Use create_function + create_trigger together to set up a complete compute pipeline",
560
+ "Use api.crypto.signJwt() for GitHub App, Google Cloud, or Azure AD authentication flows",
550
561
  ],
551
562
  },
552
563
  null,
@@ -146,10 +146,10 @@ export function registerCollectionTools(server: McpServer, sdk: CentraliSDK) {
146
146
 
147
147
  server.tool(
148
148
  "create_collection",
149
- "Create a new data collection (schema). Define the name, slug, description, and properties (fields) for the collection.",
149
+ "Create a new data collection (schema). Define the name, recordSlug, description, and properties (fields) for the collection.",
150
150
  {
151
151
  name: z.string().describe("Display name for the collection (e.g., 'Customers')"),
152
- slug: z.string().describe("URL-safe identifier used in API calls (e.g., 'customers')"),
152
+ recordSlug: z.string().describe("URL-safe identifier used in API calls (e.g., 'customers'). This is the recordSlug, not 'slug'."),
153
153
  description: z.string().optional().describe("Optional description of the collection"),
154
154
  properties: z
155
155
  .array(z.record(z.string(), z.any()))
@@ -164,9 +164,9 @@ export function registerCollectionTools(server: McpServer, sdk: CentraliSDK) {
164
164
  .describe("Schema discovery mode: 'strict' rejects unknown fields, 'flexible' auto-adds them"),
165
165
  tags: z.array(z.string()).optional().describe("Optional tags for organizing collections"),
166
166
  },
167
- async ({ name, slug, description, properties, enableVersioning, schemaDiscoveryMode, tags }) => {
167
+ async ({ name, recordSlug, description, properties, enableVersioning, schemaDiscoveryMode, tags }) => {
168
168
  try {
169
- const input: Record<string, any> = { name, slug };
169
+ const input: Record<string, any> = { name, recordSlug };
170
170
  if (description !== undefined) input.description = description;
171
171
  if (properties !== undefined) input.properties = properties;
172
172
  if (enableVersioning !== undefined) input.enableVersioning = enableVersioning;
@@ -183,7 +183,7 @@ export function registerCollectionTools(server: McpServer, sdk: CentraliSDK) {
183
183
  content: [
184
184
  {
185
185
  type: "text",
186
- text: formatError(error, `creating collection '${slug}'`),
186
+ text: formatError(error, `creating collection '${recordSlug}'`),
187
187
  },
188
188
  ],
189
189
  isError: true,