@bimatrix-aud-platform/aud_mcp_server 1.1.25 → 1.1.26
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/index.js +99 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { generateDataSource } from "./generators/datasource.js";
|
|
|
13
13
|
import { fixMtsd } from "./generators/fixer.js";
|
|
14
14
|
import { getControlInfo } from "./generators/control-info.js";
|
|
15
15
|
import { generateOlapFields } from "./generators/olap-field.js";
|
|
16
|
+
import { generateId } from "./utils/uuid.js";
|
|
16
17
|
import { callSchemaService, callDbmsList, isAudConfigured, setWorkspaceRoots } from "./utils/aud-api-client.js";
|
|
17
18
|
const __filename = fileURLToPath(import.meta.url);
|
|
18
19
|
const __dirname = dirname(__filename);
|
|
@@ -614,6 +615,44 @@ const tools = [
|
|
|
614
615
|
required: ["path"],
|
|
615
616
|
},
|
|
616
617
|
},
|
|
618
|
+
// ── UUID Generation Tool ───────────────────────────
|
|
619
|
+
{
|
|
620
|
+
name: "generate_uuid",
|
|
621
|
+
description: "i-AUD 보고서용 UUID(고유 식별자)를 생성합니다. Element, DataSource, Variable 등의 ID로 사용할 수 있는 'prefix + 32자리 HEX' 형식의 ID를 생성합니다. 한 번에 여러 개를 생성하거나, 여러 prefix를 지정하여 다양한 컴포넌트의 ID를 일괄 생성할 수 있습니다.",
|
|
622
|
+
inputSchema: {
|
|
623
|
+
type: "object",
|
|
624
|
+
properties: {
|
|
625
|
+
prefix: {
|
|
626
|
+
type: "string",
|
|
627
|
+
description: "ID 접두사 (예: Label, Button, TextBox, DataGrid, DS, Var 등). items 파라미터 사용 시 무시됩니다.",
|
|
628
|
+
default: "",
|
|
629
|
+
},
|
|
630
|
+
count: {
|
|
631
|
+
type: "number",
|
|
632
|
+
description: "생성할 UUID 개수 (기본값: 1, 최대: 50)",
|
|
633
|
+
default: 1,
|
|
634
|
+
},
|
|
635
|
+
items: {
|
|
636
|
+
type: "array",
|
|
637
|
+
items: {
|
|
638
|
+
type: "object",
|
|
639
|
+
properties: {
|
|
640
|
+
prefix: {
|
|
641
|
+
type: "string",
|
|
642
|
+
description: "ID 접두사 (예: Label, Button, DS 등)",
|
|
643
|
+
},
|
|
644
|
+
count: {
|
|
645
|
+
type: "number",
|
|
646
|
+
description: "해당 prefix로 생성할 개수 (기본값: 1)",
|
|
647
|
+
},
|
|
648
|
+
},
|
|
649
|
+
required: ["prefix"],
|
|
650
|
+
},
|
|
651
|
+
description: "여러 prefix를 한 번에 지정하여 일괄 생성. 예: [{prefix:'Label',count:2},{prefix:'DS',count:1}]",
|
|
652
|
+
},
|
|
653
|
+
},
|
|
654
|
+
},
|
|
655
|
+
},
|
|
617
656
|
// ── i-AUD DBMS Connection List Tool ────────────────
|
|
618
657
|
{
|
|
619
658
|
name: "get_dbms_list",
|
|
@@ -1358,6 +1397,66 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1358
1397
|
],
|
|
1359
1398
|
};
|
|
1360
1399
|
}
|
|
1400
|
+
// ── UUID Generation Handler ──────────────────────────
|
|
1401
|
+
case "generate_uuid": {
|
|
1402
|
+
const items = args?.items;
|
|
1403
|
+
if (items && Array.isArray(items)) {
|
|
1404
|
+
// 일괄 생성 모드
|
|
1405
|
+
const totalRequested = items.reduce((sum, item) => sum + Math.min(Number(item.count) || 1, 50), 0);
|
|
1406
|
+
if (totalRequested > 100) {
|
|
1407
|
+
return {
|
|
1408
|
+
content: [{
|
|
1409
|
+
type: "text",
|
|
1410
|
+
text: JSON.stringify({ error: "총 생성 개수가 100개를 초과할 수 없습니다." }),
|
|
1411
|
+
}],
|
|
1412
|
+
};
|
|
1413
|
+
}
|
|
1414
|
+
const results = {};
|
|
1415
|
+
for (const item of items) {
|
|
1416
|
+
const prefix = item.prefix || "";
|
|
1417
|
+
const count = Math.min(Math.max(Number(item.count) || 1, 1), 50);
|
|
1418
|
+
const ids = [];
|
|
1419
|
+
for (let i = 0; i < count; i++) {
|
|
1420
|
+
ids.push(generateId(prefix));
|
|
1421
|
+
}
|
|
1422
|
+
if (results[prefix]) {
|
|
1423
|
+
results[prefix].push(...ids);
|
|
1424
|
+
}
|
|
1425
|
+
else {
|
|
1426
|
+
results[prefix] = ids;
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
return {
|
|
1430
|
+
content: [{
|
|
1431
|
+
type: "text",
|
|
1432
|
+
text: JSON.stringify({
|
|
1433
|
+
success: true,
|
|
1434
|
+
format: "prefix + 32자리 HEX (16바이트)",
|
|
1435
|
+
results,
|
|
1436
|
+
}, null, 2),
|
|
1437
|
+
}],
|
|
1438
|
+
};
|
|
1439
|
+
}
|
|
1440
|
+
else {
|
|
1441
|
+
// 단일 prefix 모드
|
|
1442
|
+
const prefix = args?.prefix || "";
|
|
1443
|
+
const count = Math.min(Math.max(Number(args?.count) || 1, 1), 50);
|
|
1444
|
+
const ids = [];
|
|
1445
|
+
for (let i = 0; i < count; i++) {
|
|
1446
|
+
ids.push(generateId(prefix));
|
|
1447
|
+
}
|
|
1448
|
+
return {
|
|
1449
|
+
content: [{
|
|
1450
|
+
type: "text",
|
|
1451
|
+
text: JSON.stringify({
|
|
1452
|
+
success: true,
|
|
1453
|
+
format: "prefix + 32자리 HEX (16바이트)",
|
|
1454
|
+
ids,
|
|
1455
|
+
}, null, 2),
|
|
1456
|
+
}],
|
|
1457
|
+
};
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1361
1460
|
// ── i-AUD DBMS List Handler ──────────────────────────
|
|
1362
1461
|
case "get_dbms_list": {
|
|
1363
1462
|
if (!isAudConfigured()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bimatrix-aud-platform/aud_mcp_server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
4
4
|
"description": "MCP Server for i-AUD MTSD document validation, generation, schema querying, control info extraction, and database operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|