@centrali-io/centrali-mcp 4.4.8-rc.7 → 4.4.8-rc.8

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.
@@ -228,18 +228,18 @@ function registerServiceAccountTools(server, sdk, centraliUrl, workspaceId, ownC
228
228
  };
229
229
  }
230
230
  }));
231
- server.tool("delete_service_account", "Permanently delete a service account. This is irreversible — all tokens are invalidated immediately.", {
232
- serviceAccountId: zod_1.z.number().describe("The service account numeric ID to delete"),
233
- }, (_a) => __awaiter(this, [_a], void 0, function* ({ serviceAccountId }) {
231
+ server.tool("delete_service_account", "Permanently delete a service account. This is irreversible — all tokens are invalidated immediately. Note: the service account must not be revoked (revoke prevents deletion).", {
232
+ clientId: zod_1.z.string().describe("The service account's clientId string (e.g., 'ci_abc123') — NOT the numeric ID"),
233
+ }, (_a) => __awaiter(this, [_a], void 0, function* ({ clientId }) {
234
234
  try {
235
- yield getSaClient().delete(`/${serviceAccountId}`);
235
+ yield getSaClient().delete(`/${clientId}`);
236
236
  return {
237
- content: [{ type: "text", text: `Service account '${serviceAccountId}' deleted successfully.` }],
237
+ content: [{ type: "text", text: `Service account '${clientId}' deleted successfully.` }],
238
238
  };
239
239
  }
240
240
  catch (error) {
241
241
  return {
242
- content: [{ type: "text", text: formatError(error, `deleting service account '${serviceAccountId}'`) }],
242
+ content: [{ type: "text", text: formatError(error, `deleting service account '${clientId}'`) }],
243
243
  isError: true,
244
244
  };
245
245
  }
@@ -614,16 +614,13 @@ function registerServiceAccountTools(server, sdk, centraliUrl, workspaceId, ownC
614
614
  };
615
615
  }
616
616
  }));
617
- server.tool("update_role", "Update a role's name, description, or permissions.", {
617
+ server.tool("update_role", "Update a role's description or permissions. Role names are immutable and cannot be changed after creation.", {
618
618
  roleId: zod_1.z.string().describe("The role ID (UUID) to update"),
619
- name: zod_1.z.string().optional().describe("Updated name"),
620
619
  description: zod_1.z.string().optional().describe("Updated description"),
621
620
  permissions: zod_1.z.array(zod_1.z.string()).optional().describe("Updated permission UUIDs (replaces all existing)"),
622
- }, (_a) => __awaiter(this, [_a], void 0, function* ({ roleId, name, description, permissions }) {
621
+ }, (_a) => __awaiter(this, [_a], void 0, function* ({ roleId, description, permissions }) {
623
622
  try {
624
623
  const input = {};
625
- if (name !== undefined)
626
- input.name = name;
627
624
  if (description !== undefined)
628
625
  input.description = description;
629
626
  if (permissions !== undefined)
@@ -715,15 +712,12 @@ function registerServiceAccountTools(server, sdk, centraliUrl, workspaceId, ownC
715
712
  };
716
713
  }
717
714
  }));
718
- server.tool("update_group", "Update a group's name or description.", {
715
+ server.tool("update_group", "Update a group's description. Group names are immutable and cannot be changed after creation.", {
719
716
  groupId: zod_1.z.string().describe("The group ID (UUID) to update"),
720
- name: zod_1.z.string().optional().describe("Updated name"),
721
717
  description: zod_1.z.string().optional().describe("Updated description"),
722
- }, (_a) => __awaiter(this, [_a], void 0, function* ({ groupId, name, description }) {
718
+ }, (_a) => __awaiter(this, [_a], void 0, function* ({ groupId, description }) {
723
719
  try {
724
720
  const input = {};
725
- if (name !== undefined)
726
- input.name = name;
727
721
  if (description !== undefined)
728
722
  input.description = description;
729
723
  const result = yield getGroupsClient().put(`/${groupId}`, input);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centrali-io/centrali-mcp",
3
- "version": "4.4.8-rc.7",
3
+ "version": "4.4.8-rc.8",
4
4
  "description": "Centrali MCP Server - AI assistant integration for Centrali workspaces",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -261,19 +261,19 @@ export function registerServiceAccountTools(server: McpServer, sdk: CentraliSDK,
261
261
 
262
262
  server.tool(
263
263
  "delete_service_account",
264
- "Permanently delete a service account. This is irreversible — all tokens are invalidated immediately.",
264
+ "Permanently delete a service account. This is irreversible — all tokens are invalidated immediately. Note: the service account must not be revoked (revoke prevents deletion).",
265
265
  {
266
- serviceAccountId: z.number().describe("The service account numeric ID to delete"),
266
+ clientId: z.string().describe("The service account's clientId string (e.g., 'ci_abc123') — NOT the numeric ID"),
267
267
  },
268
- async ({ serviceAccountId }) => {
268
+ async ({ clientId }) => {
269
269
  try {
270
- await getSaClient().delete(`/${serviceAccountId}`);
270
+ await getSaClient().delete(`/${clientId}`);
271
271
  return {
272
- content: [{ type: "text", text: `Service account '${serviceAccountId}' deleted successfully.` }],
272
+ content: [{ type: "text", text: `Service account '${clientId}' deleted successfully.` }],
273
273
  };
274
274
  } catch (error: unknown) {
275
275
  return {
276
- content: [{ type: "text", text: formatError(error, `deleting service account '${serviceAccountId}'`) }],
276
+ content: [{ type: "text", text: formatError(error, `deleting service account '${clientId}'`) }],
277
277
  isError: true,
278
278
  };
279
279
  }
@@ -754,17 +754,15 @@ export function registerServiceAccountTools(server: McpServer, sdk: CentraliSDK,
754
754
 
755
755
  server.tool(
756
756
  "update_role",
757
- "Update a role's name, description, or permissions.",
757
+ "Update a role's description or permissions. Role names are immutable and cannot be changed after creation.",
758
758
  {
759
759
  roleId: z.string().describe("The role ID (UUID) to update"),
760
- name: z.string().optional().describe("Updated name"),
761
760
  description: z.string().optional().describe("Updated description"),
762
761
  permissions: z.array(z.string()).optional().describe("Updated permission UUIDs (replaces all existing)"),
763
762
  },
764
- async ({ roleId, name, description, permissions }) => {
763
+ async ({ roleId, description, permissions }) => {
765
764
  try {
766
765
  const input: Record<string, any> = {};
767
- if (name !== undefined) input.name = name;
768
766
  if (description !== undefined) input.description = description;
769
767
  if (permissions !== undefined) input.permissions = permissions;
770
768
  const result = await getRolesClient().put(`/${roleId}`, input);
@@ -875,16 +873,14 @@ export function registerServiceAccountTools(server: McpServer, sdk: CentraliSDK,
875
873
 
876
874
  server.tool(
877
875
  "update_group",
878
- "Update a group's name or description.",
876
+ "Update a group's description. Group names are immutable and cannot be changed after creation.",
879
877
  {
880
878
  groupId: z.string().describe("The group ID (UUID) to update"),
881
- name: z.string().optional().describe("Updated name"),
882
879
  description: z.string().optional().describe("Updated description"),
883
880
  },
884
- async ({ groupId, name, description }) => {
881
+ async ({ groupId, description }) => {
885
882
  try {
886
883
  const input: Record<string, any> = {};
887
- if (name !== undefined) input.name = name;
888
884
  if (description !== undefined) input.description = description;
889
885
  const result = await getGroupsClient().put(`/${groupId}`, input);
890
886
  return {