@centrali-io/centrali-mcp 4.2.3 → 4.2.4
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/structures.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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,
|
|
152
|
+
}, (_a) => __awaiter(this, [_a], void 0, function* ({ name, recordSlug, description, properties, enableVersioning, schemaDiscoveryMode, tags }) {
|
|
153
153
|
try {
|
|
154
|
-
const input = { name,
|
|
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 '${
|
|
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
|
+
"version": "4.2.4",
|
|
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.
|
|
28
|
+
"@centrali-io/centrali-sdk": "^4.2.4",
|
|
29
29
|
"@modelcontextprotocol/sdk": "^1.12.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/tools/structures.ts
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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,
|
|
167
|
+
async ({ name, recordSlug, description, properties, enableVersioning, schemaDiscoveryMode, tags }) => {
|
|
168
168
|
try {
|
|
169
|
-
const input: Record<string, any> = { name,
|
|
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 '${
|
|
186
|
+
text: formatError(error, `creating collection '${recordSlug}'`),
|
|
187
187
|
},
|
|
188
188
|
],
|
|
189
189
|
isError: true,
|