@uidbai/mcp-server 0.2.0 → 0.3.0
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/README.md +164 -62
- package/dist/cli.js +0 -0
- package/dist/core/local-fs.d.ts +174 -0
- package/dist/core/local-fs.d.ts.map +1 -0
- package/dist/core/local-fs.js +263 -0
- package/dist/core/local-fs.js.map +1 -0
- package/dist/templates/index.d.ts +22 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +19 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/minimal.d.ts +9 -0
- package/dist/templates/minimal.d.ts.map +1 -0
- package/dist/templates/minimal.js +115 -0
- package/dist/templates/minimal.js.map +1 -0
- package/dist/templates/standard.d.ts +9 -0
- package/dist/templates/standard.d.ts.map +1 -0
- package/dist/templates/standard.js +527 -0
- package/dist/templates/standard.js.map +1 -0
- package/dist/tools/detect-pattern.d.ts +8 -5
- package/dist/tools/detect-pattern.d.ts.map +1 -1
- package/dist/tools/detect-pattern.js +151 -18
- package/dist/tools/detect-pattern.js.map +1 -1
- package/dist/tools/get-config.d.ts +1 -1
- package/dist/tools/get-config.d.ts.map +1 -1
- package/dist/tools/get-config.js +45 -10
- package/dist/tools/get-config.js.map +1 -1
- package/dist/tools/guide.d.ts +65 -0
- package/dist/tools/guide.d.ts.map +1 -0
- package/dist/tools/guide.js +304 -0
- package/dist/tools/guide.js.map +1 -0
- package/dist/tools/index.d.ts +4 -5
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -5
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/init.d.ts +73 -0
- package/dist/tools/init.d.ts.map +1 -0
- package/dist/tools/init.js +149 -0
- package/dist/tools/init.js.map +1 -0
- package/dist/tools/list-components.d.ts +18 -3
- package/dist/tools/list-components.d.ts.map +1 -1
- package/dist/tools/list-components.js +86 -11
- package/dist/tools/list-components.js.map +1 -1
- package/dist/tools/list-patterns.d.ts +18 -3
- package/dist/tools/list-patterns.d.ts.map +1 -1
- package/dist/tools/list-patterns.js +85 -10
- package/dist/tools/list-patterns.js.map +1 -1
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +14 -15
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/status.d.ts +1 -1
- package/dist/tools/status.d.ts.map +1 -1
- package/dist/tools/status.js +54 -42
- package/dist/tools/status.js.map +1 -1
- package/dist/tools/submit-pattern.d.ts +13 -11
- package/dist/tools/submit-pattern.d.ts.map +1 -1
- package/dist/tools/submit-pattern.js +90 -19
- package/dist/tools/submit-pattern.js.map +1 -1
- package/dist/tools/update-config.d.ts +16 -8
- package/dist/tools/update-config.d.ts.map +1 -1
- package/dist/tools/update-config.js +93 -39
- package/dist/tools/update-config.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,39 +1,114 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UIDB MCP Tool: uidb_list_components
|
|
3
3
|
*
|
|
4
|
-
* List all available components
|
|
4
|
+
* List all available components from the local .uidb folder.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { formatErrorResponse } from "../core/errors.js";
|
|
6
|
+
import { readComponentsIndex, readComponent, UIDBNotFoundError, } from "../core/local-fs.js";
|
|
8
7
|
export const listComponentsTool = {
|
|
9
8
|
name: "uidb_list_components",
|
|
10
|
-
description: `List all available UI components in the
|
|
9
|
+
description: `List all available UI components in the design system.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
Reads from .uidb/components/ to show what's available.
|
|
12
|
+
Optionally filter by category or include full component details.
|
|
13
|
+
|
|
14
|
+
Categories: interaction, form, layout, navigation, overlay, feedback, data-display`,
|
|
14
15
|
inputSchema: {
|
|
15
16
|
type: "object",
|
|
16
|
-
properties: {
|
|
17
|
+
properties: {
|
|
18
|
+
category: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Filter by category (e.g., 'form', 'layout', 'overlay')",
|
|
21
|
+
},
|
|
22
|
+
include_details: {
|
|
23
|
+
type: "boolean",
|
|
24
|
+
description: "Include full component definitions (props, examples)",
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
17
28
|
required: [],
|
|
18
29
|
},
|
|
19
|
-
async execute() {
|
|
30
|
+
async execute(args) {
|
|
20
31
|
try {
|
|
21
|
-
const
|
|
32
|
+
const index = await readComponentsIndex();
|
|
33
|
+
let components = index.components;
|
|
34
|
+
// Filter by category if specified
|
|
35
|
+
if (args.category) {
|
|
36
|
+
components = components.filter((c) => c.category.toLowerCase() === args.category.toLowerCase());
|
|
37
|
+
}
|
|
38
|
+
// Include full details if requested
|
|
39
|
+
if (args.include_details) {
|
|
40
|
+
const detailedComponents = await Promise.all(components.map(async (entry) => {
|
|
41
|
+
try {
|
|
42
|
+
const details = await readComponent(entry.id);
|
|
43
|
+
return {
|
|
44
|
+
...entry,
|
|
45
|
+
props: details.props,
|
|
46
|
+
semantic_intents: details.semantic_intents,
|
|
47
|
+
examples: details.examples,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return entry;
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
return {
|
|
55
|
+
content: [
|
|
56
|
+
{
|
|
57
|
+
type: "text",
|
|
58
|
+
text: JSON.stringify({
|
|
59
|
+
total: detailedComponents.length,
|
|
60
|
+
components: detailedComponents,
|
|
61
|
+
categories: index.categories,
|
|
62
|
+
}, null, 2),
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
// Return basic list
|
|
22
68
|
return {
|
|
23
69
|
content: [
|
|
24
70
|
{
|
|
25
71
|
type: "text",
|
|
26
|
-
text: JSON.stringify(
|
|
72
|
+
text: JSON.stringify({
|
|
73
|
+
total: components.length,
|
|
74
|
+
components: components.map((c) => ({
|
|
75
|
+
id: c.id,
|
|
76
|
+
name: c.name,
|
|
77
|
+
category: c.category,
|
|
78
|
+
description: c.description,
|
|
79
|
+
})),
|
|
80
|
+
categories: index.categories,
|
|
81
|
+
tip: "Use include_details=true to see props and examples",
|
|
82
|
+
}, null, 2),
|
|
27
83
|
},
|
|
28
84
|
],
|
|
29
85
|
};
|
|
30
86
|
}
|
|
31
87
|
catch (error) {
|
|
88
|
+
if (error instanceof UIDBNotFoundError) {
|
|
89
|
+
return {
|
|
90
|
+
content: [
|
|
91
|
+
{
|
|
92
|
+
type: "text",
|
|
93
|
+
text: JSON.stringify({
|
|
94
|
+
error: "NOT_INITIALIZED",
|
|
95
|
+
message: "No .uidb folder found. Run uidb_init first.",
|
|
96
|
+
}, null, 2),
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
isError: true,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
32
102
|
return {
|
|
33
103
|
content: [
|
|
34
104
|
{
|
|
35
105
|
type: "text",
|
|
36
|
-
text:
|
|
106
|
+
text: JSON.stringify({
|
|
107
|
+
error: "LIST_FAILED",
|
|
108
|
+
message: error instanceof Error
|
|
109
|
+
? error.message
|
|
110
|
+
: "Failed to list components",
|
|
111
|
+
}, null, 2),
|
|
37
112
|
},
|
|
38
113
|
],
|
|
39
114
|
isError: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-components.js","sourceRoot":"","sources":["../../src/tools/list-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"list-components.js","sourceRoot":"","sources":["../../src/tools/list-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAO7B,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE;;;;;mFAKoE;IAEjF,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EA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,OAAO;gCACf,CAAC,CAAC,2BAA2B;yBAClC,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UIDB MCP Tool: uidb_list_patterns
|
|
3
3
|
*
|
|
4
|
-
* List all documented patterns
|
|
4
|
+
* List all documented patterns from the local .uidb folder.
|
|
5
5
|
*/
|
|
6
|
+
interface ListPatternsInput {
|
|
7
|
+
category?: string;
|
|
8
|
+
include_code?: boolean;
|
|
9
|
+
}
|
|
6
10
|
export declare const listPatternsTool: {
|
|
7
11
|
name: string;
|
|
8
12
|
description: string;
|
|
9
13
|
inputSchema: {
|
|
10
14
|
type: "object";
|
|
11
|
-
properties: {
|
|
15
|
+
properties: {
|
|
16
|
+
category: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
include_code: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
12
26
|
required: never[];
|
|
13
27
|
};
|
|
14
|
-
execute(): Promise<{
|
|
28
|
+
execute(args: ListPatternsInput): Promise<{
|
|
15
29
|
content: {
|
|
16
30
|
type: "text";
|
|
17
31
|
text: string;
|
|
@@ -25,4 +39,5 @@ export declare const listPatternsTool: {
|
|
|
25
39
|
isError: boolean;
|
|
26
40
|
}>;
|
|
27
41
|
};
|
|
42
|
+
export {};
|
|
28
43
|
//# sourceMappingURL=list-patterns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-patterns.d.ts","sourceRoot":"","sources":["../../src/tools/list-patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"list-patterns.d.ts","sourceRoot":"","sources":["../../src/tools/list-patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,UAAU,iBAAiB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;kBAyBP,iBAAiB;;;;;;;;;;;;;CAgHtC,CAAC"}
|
|
@@ -1,39 +1,114 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UIDB MCP Tool: uidb_list_patterns
|
|
3
3
|
*
|
|
4
|
-
* List all documented patterns
|
|
4
|
+
* List all documented patterns from the local .uidb folder.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { formatErrorResponse } from "../core/errors.js";
|
|
6
|
+
import { readPatternsIndex, readPattern, UIDBNotFoundError, } from "../core/local-fs.js";
|
|
8
7
|
export const listPatternsTool = {
|
|
9
8
|
name: "uidb_list_patterns",
|
|
10
|
-
description: `List all documented UI patterns in the
|
|
9
|
+
description: `List all documented UI patterns in the design system.
|
|
11
10
|
|
|
12
11
|
Patterns are reusable UI compositions (3+ components) that have been documented.
|
|
13
|
-
Use existing patterns when building similar UIs to maintain consistency
|
|
12
|
+
Use existing patterns when building similar UIs to maintain consistency.
|
|
13
|
+
|
|
14
|
+
Categories: layout, forms, feedback, navigation, data-display, identity`,
|
|
14
15
|
inputSchema: {
|
|
15
16
|
type: "object",
|
|
16
|
-
properties: {
|
|
17
|
+
properties: {
|
|
18
|
+
category: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "Filter by category (e.g., 'forms', 'feedback', 'layout')",
|
|
21
|
+
},
|
|
22
|
+
include_code: {
|
|
23
|
+
type: "boolean",
|
|
24
|
+
description: "Include code examples for each pattern variant",
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
17
28
|
required: [],
|
|
18
29
|
},
|
|
19
|
-
async execute() {
|
|
30
|
+
async execute(args) {
|
|
20
31
|
try {
|
|
21
|
-
const
|
|
32
|
+
const index = await readPatternsIndex();
|
|
33
|
+
let patterns = index.patterns;
|
|
34
|
+
// Filter by category if specified
|
|
35
|
+
if (args.category) {
|
|
36
|
+
patterns = patterns.filter((p) => p.category.toLowerCase() === args.category.toLowerCase());
|
|
37
|
+
}
|
|
38
|
+
// Include code if requested
|
|
39
|
+
if (args.include_code) {
|
|
40
|
+
const detailedPatterns = await Promise.all(patterns.map(async (entry) => {
|
|
41
|
+
try {
|
|
42
|
+
const details = await readPattern(entry.id);
|
|
43
|
+
return {
|
|
44
|
+
...entry,
|
|
45
|
+
components_used: details.components_used,
|
|
46
|
+
variants: details.variants,
|
|
47
|
+
guidelines: details.guidelines,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return entry;
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
return {
|
|
55
|
+
content: [
|
|
56
|
+
{
|
|
57
|
+
type: "text",
|
|
58
|
+
text: JSON.stringify({
|
|
59
|
+
total: detailedPatterns.length,
|
|
60
|
+
patterns: detailedPatterns,
|
|
61
|
+
categories: index.categories,
|
|
62
|
+
}, null, 2),
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
// Return basic list
|
|
22
68
|
return {
|
|
23
69
|
content: [
|
|
24
70
|
{
|
|
25
71
|
type: "text",
|
|
26
|
-
text: JSON.stringify(
|
|
72
|
+
text: JSON.stringify({
|
|
73
|
+
total: patterns.length,
|
|
74
|
+
patterns: patterns.map((p) => ({
|
|
75
|
+
id: p.id,
|
|
76
|
+
name: p.name,
|
|
77
|
+
category: p.category,
|
|
78
|
+
description: p.description,
|
|
79
|
+
})),
|
|
80
|
+
categories: index.categories,
|
|
81
|
+
tip: "Use include_code=true to see code examples",
|
|
82
|
+
}, null, 2),
|
|
27
83
|
},
|
|
28
84
|
],
|
|
29
85
|
};
|
|
30
86
|
}
|
|
31
87
|
catch (error) {
|
|
88
|
+
if (error instanceof UIDBNotFoundError) {
|
|
89
|
+
return {
|
|
90
|
+
content: [
|
|
91
|
+
{
|
|
92
|
+
type: "text",
|
|
93
|
+
text: JSON.stringify({
|
|
94
|
+
error: "NOT_INITIALIZED",
|
|
95
|
+
message: "No .uidb folder found. Run uidb_init first.",
|
|
96
|
+
}, null, 2),
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
isError: true,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
32
102
|
return {
|
|
33
103
|
content: [
|
|
34
104
|
{
|
|
35
105
|
type: "text",
|
|
36
|
-
text:
|
|
106
|
+
text: JSON.stringify({
|
|
107
|
+
error: "LIST_FAILED",
|
|
108
|
+
message: error instanceof Error
|
|
109
|
+
? error.message
|
|
110
|
+
: "Failed to list patterns",
|
|
111
|
+
}, null, 2),
|
|
37
112
|
},
|
|
38
113
|
],
|
|
39
114
|
isError: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-patterns.js","sourceRoot":"","sources":["../../src/tools/list-patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"list-patterns.js","sourceRoot":"","sources":["../../src/tools/list-patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAO7B,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE;;;;;wEAKyD;IAEtE,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0DAA0D;aACxE;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,gDAAgD;gBAC7D,OAAO,EAAE,KAAK;aACf;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IAED,KAAK,CAAC,OAAO,CAAC,IAA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Root":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ,CAAC;QACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpC,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;IAEF,OAAO,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC;QAC9B,OAAO,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC,CAAC;CACJ;AAMD,eAAO,MAAM,KAAK,EAAE,OAAO,EAqB1B,CAAC;AAEF;;GAEG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEzD;AAED;;GAEG;AACH,wBAAgB,kBAAkB;;;;cAhDxB,QAAQ;oBACF,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;kBACzB,MAAM,EAAE;;IAoDrB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;aArDhD,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;cACpC,OAAO;GA4EpB"}
|
package/dist/tools/registry.js
CHANGED
|
@@ -2,38 +2,36 @@
|
|
|
2
2
|
* UIDB MCP Server - Tool Registry
|
|
3
3
|
*
|
|
4
4
|
* Central registry for all MCP tools.
|
|
5
|
-
*
|
|
5
|
+
* Tools operate on the local .uidb folder (embedded design system).
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { finalizeTool } from "./finalize.js";
|
|
7
|
+
import { initTool } from "./init.js";
|
|
8
|
+
import { guideTool } from "./guide.js";
|
|
10
9
|
import { listComponentsTool } from "./list-components.js";
|
|
11
|
-
import { detectPatternTool } from "./detect-pattern.js";
|
|
12
|
-
import { submitPatternTool } from "./submit-pattern.js";
|
|
13
10
|
import { listPatternsTool } from "./list-patterns.js";
|
|
14
11
|
import { getConfigTool } from "./get-config.js";
|
|
15
12
|
import { updateConfigTool } from "./update-config.js";
|
|
16
|
-
import {
|
|
13
|
+
import { detectPatternTool } from "./detect-pattern.js";
|
|
14
|
+
import { submitPatternTool } from "./submit-pattern.js";
|
|
17
15
|
import { statusTool } from "./status.js";
|
|
18
16
|
// ============================================================================
|
|
19
17
|
// Tool Registry
|
|
20
18
|
// ============================================================================
|
|
21
19
|
export const tools = [
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
// Initialization
|
|
21
|
+
initTool,
|
|
22
|
+
// Status
|
|
23
|
+
statusTool,
|
|
24
|
+
// Guidance (main workflow tool)
|
|
25
|
+
guideTool,
|
|
26
|
+
// Component tools
|
|
26
27
|
listComponentsTool,
|
|
27
28
|
// Pattern tools
|
|
29
|
+
listPatternsTool,
|
|
28
30
|
detectPatternTool,
|
|
29
31
|
submitPatternTool,
|
|
30
|
-
listPatternsTool,
|
|
31
32
|
// Config tools
|
|
32
33
|
getConfigTool,
|
|
33
34
|
updateConfigTool,
|
|
34
|
-
// Auth tools
|
|
35
|
-
loginTool,
|
|
36
|
-
statusTool,
|
|
37
35
|
];
|
|
38
36
|
/**
|
|
39
37
|
* Get a tool by name
|
|
@@ -64,6 +62,7 @@ export async function executeTool(name, args) {
|
|
|
64
62
|
text: JSON.stringify({
|
|
65
63
|
error: "TOOL_NOT_FOUND",
|
|
66
64
|
message: `Unknown tool: ${name}`,
|
|
65
|
+
available_tools: tools.map((t) => t.name),
|
|
67
66
|
}, null, 2),
|
|
68
67
|
},
|
|
69
68
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/tools/registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAqBzC,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,KAAK,GAAc;IAC9B,iBAAiB;IACjB,QAAQ;IAER,SAAS;IACT,UAAU;IAEV,gCAAgC;IAChC,SAAS;IAET,kBAAkB;IAClB,kBAAkB;IAElB,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,iBAAiB;IAEjB,eAAe;IACf,aAAa;IACb,gBAAgB;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC1B,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;KAC9B,CAAC,CAAC,CAAC;AACN,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAY,EAAE,IAAa;IAC3D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,KAAK,EAAE,gBAAgB;wBACvB,OAAO,EAAE,iBAAiB,IAAI,EAAE;wBAChC,eAAe,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;qBAC1C,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC,OAAO,CAAC,IAA+B,CAAC,CAAC;AACvD,CAAC"}
|
package/dist/tools/status.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;CA8GtB,CAAC"}
|
package/dist/tools/status.js
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UIDB MCP Tool: uidb_status
|
|
3
3
|
*
|
|
4
|
-
* Check the current UIDB
|
|
4
|
+
* Check the current UIDB design system status.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { apiClient } from "../core/api-client.js";
|
|
8
|
-
import { formatErrorResponse } from "../core/errors.js";
|
|
6
|
+
import { uidbExists, readManifest, readConfig, readComponentsIndex, readPatternsIndex, } from "../core/local-fs.js";
|
|
9
7
|
export const statusTool = {
|
|
10
8
|
name: "uidb_status",
|
|
11
|
-
description: `Check the current UIDB
|
|
9
|
+
description: `Check the current UIDB design system status.
|
|
12
10
|
|
|
13
11
|
Shows:
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
- API health`,
|
|
12
|
+
- Whether .uidb folder exists
|
|
13
|
+
- Project name and version
|
|
14
|
+
- Theme configuration
|
|
15
|
+
- Number of components and patterns`,
|
|
19
16
|
inputSchema: {
|
|
20
17
|
type: "object",
|
|
21
18
|
properties: {},
|
|
@@ -23,51 +20,61 @@ Shows:
|
|
|
23
20
|
},
|
|
24
21
|
async execute() {
|
|
25
22
|
try {
|
|
26
|
-
const
|
|
27
|
-
if (!
|
|
23
|
+
const exists = await uidbExists();
|
|
24
|
+
if (!exists) {
|
|
28
25
|
return {
|
|
29
26
|
content: [
|
|
30
27
|
{
|
|
31
28
|
type: "text",
|
|
32
29
|
text: JSON.stringify({
|
|
33
|
-
|
|
34
|
-
message: "
|
|
35
|
-
action: "Run
|
|
30
|
+
initialized: false,
|
|
31
|
+
message: "No .uidb folder found in this project",
|
|
32
|
+
action: "Run uidb_init to initialize a design system",
|
|
36
33
|
}, null, 2),
|
|
37
34
|
},
|
|
38
35
|
],
|
|
39
36
|
};
|
|
40
37
|
}
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
apiHealthy = response.status === "ok";
|
|
49
|
-
// Get project info
|
|
50
|
-
projectInfo = await apiClient.get(`/api/integration/project/${credentials.projectSlug}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
catch {
|
|
54
|
-
// API check failed, but auth is still valid
|
|
55
|
-
}
|
|
56
|
-
const statusResponse = {
|
|
57
|
-
authenticated: true,
|
|
58
|
-
project: authStatus.projectSlug,
|
|
59
|
-
user: authStatus.userEmail,
|
|
60
|
-
expiresAt: authStatus.expiresAt,
|
|
61
|
-
apiHealthy,
|
|
62
|
-
};
|
|
63
|
-
if (projectInfo) {
|
|
64
|
-
statusResponse.projectDetails = projectInfo;
|
|
65
|
-
}
|
|
38
|
+
// Get design system info
|
|
39
|
+
const [manifest, config, componentsIndex, patternsIndex] = await Promise.all([
|
|
40
|
+
readManifest().catch(() => null),
|
|
41
|
+
readConfig().catch(() => null),
|
|
42
|
+
readComponentsIndex().catch(() => ({ components: [] })),
|
|
43
|
+
readPatternsIndex().catch(() => ({ patterns: [] })),
|
|
44
|
+
]);
|
|
66
45
|
return {
|
|
67
46
|
content: [
|
|
68
47
|
{
|
|
69
48
|
type: "text",
|
|
70
|
-
text: JSON.stringify(
|
|
49
|
+
text: JSON.stringify({
|
|
50
|
+
initialized: true,
|
|
51
|
+
project: {
|
|
52
|
+
name: manifest?.name || "Unknown",
|
|
53
|
+
version: manifest?.version || "1.0.0",
|
|
54
|
+
framework: manifest?.framework?.name || "unknown",
|
|
55
|
+
},
|
|
56
|
+
theme: config?.theme
|
|
57
|
+
? {
|
|
58
|
+
accentColor: config.theme.accentColor,
|
|
59
|
+
grayColor: config.theme.grayColor,
|
|
60
|
+
radius: config.theme.radius,
|
|
61
|
+
appearance: config.appearance || "light",
|
|
62
|
+
}
|
|
63
|
+
: null,
|
|
64
|
+
stats: {
|
|
65
|
+
components: componentsIndex.components.length,
|
|
66
|
+
patterns: patternsIndex.patterns.length,
|
|
67
|
+
},
|
|
68
|
+
available_tools: [
|
|
69
|
+
"uidb_guide - Get component guidance",
|
|
70
|
+
"uidb_list_components - List all components",
|
|
71
|
+
"uidb_list_patterns - List all patterns",
|
|
72
|
+
"uidb_get_config - Get theme config",
|
|
73
|
+
"uidb_update_config - Update theme config",
|
|
74
|
+
"uidb_detect_pattern - Check if UI is a pattern",
|
|
75
|
+
"uidb_submit_pattern - Add new pattern",
|
|
76
|
+
],
|
|
77
|
+
}, null, 2),
|
|
71
78
|
},
|
|
72
79
|
],
|
|
73
80
|
};
|
|
@@ -77,7 +84,12 @@ Shows:
|
|
|
77
84
|
content: [
|
|
78
85
|
{
|
|
79
86
|
type: "text",
|
|
80
|
-
text:
|
|
87
|
+
text: JSON.stringify({
|
|
88
|
+
error: "STATUS_FAILED",
|
|
89
|
+
message: error instanceof Error
|
|
90
|
+
? error.message
|
|
91
|
+
: "Failed to get status",
|
|
92
|
+
}, null, 2),
|
|
81
93
|
},
|
|
82
94
|
],
|
|
83
95
|
isError: true,
|
package/dist/tools/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,UAAU,EACV,YAAY,EACZ,UAAU,EACV,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE;;;;;;oCAMqB;IAElC,WAAW,EAAE;QACX,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;IAED,KAAK,CAAC,OAAO;QACX,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,EAAE,CAAC;YAElC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO;o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AAC,MAAM;oCAC3B,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,OAAO;iCACzC;gCACH,CAAC,CAAC,IAAI;4BACR,KAAK,EAAE;gCACL,UAAU,EAAE,eAAe,CAAC,UAAU,CAAC,MAAM;gCAC7C,QAAQ,EAAE,aAAa,CAAC,QAAQ,CAAC,MAAM;6BACxC;4BACD,eAAe,EAAE;gCACf,qCAAqC;gCACrC,4CAA4C;gCAC5C,wCAAwC;gCACxC,oCAAoC;gCACpC,0CAA0C;gCAC1C,gDAAgD;gCAChD,uCAAuC;6BACxC;yBACF,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;4BACE,KAAK,EAAE,eAAe;4BACtB,OAAO,EACL,KAAK,YAAY,KAAK;gCACpB,CAAC,CAAC,KAAK,CAAC,OAAO;gCACf,CAAC,CAAC,sBAAsB;yBAC7B,EACD,IAAI,EACJ,CAAC,CACF;qBACF;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* UIDB MCP Tool: uidb_submit_pattern
|
|
3
3
|
*
|
|
4
|
-
* Submit a new reusable pattern to the design system.
|
|
4
|
+
* Submit a new reusable pattern to the local .uidb design system.
|
|
5
5
|
*/
|
|
6
|
+
interface SubmitPatternInput {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
components: string[];
|
|
10
|
+
code_template: string;
|
|
11
|
+
category: string;
|
|
12
|
+
use_cases?: string[];
|
|
13
|
+
}
|
|
6
14
|
export declare const submitPatternTool: {
|
|
7
15
|
name: string;
|
|
8
16
|
description: string;
|
|
@@ -43,25 +51,19 @@ export declare const submitPatternTool: {
|
|
|
43
51
|
};
|
|
44
52
|
required: string[];
|
|
45
53
|
};
|
|
46
|
-
execute(args: {
|
|
47
|
-
name: string;
|
|
48
|
-
description: string;
|
|
49
|
-
components: string[];
|
|
50
|
-
code_template: string;
|
|
51
|
-
category: string;
|
|
52
|
-
use_cases?: string[];
|
|
53
|
-
}): Promise<{
|
|
54
|
+
execute(args: SubmitPatternInput): Promise<{
|
|
54
55
|
content: {
|
|
55
56
|
type: "text";
|
|
56
57
|
text: string;
|
|
57
58
|
}[];
|
|
58
|
-
isError
|
|
59
|
+
isError: boolean;
|
|
59
60
|
} | {
|
|
60
61
|
content: {
|
|
61
62
|
type: "text";
|
|
62
63
|
text: string;
|
|
63
64
|
}[];
|
|
64
|
-
isError
|
|
65
|
+
isError?: undefined;
|
|
65
66
|
}>;
|
|
66
67
|
};
|
|
68
|
+
export {};
|
|
67
69
|
//# sourceMappingURL=submit-pattern.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-pattern.d.ts","sourceRoot":"","sources":["../../src/tools/submit-pattern.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"submit-pattern.d.ts","sourceRoot":"","sources":["../../src/tools/submit-pattern.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmDR,kBAAkB;;;;;;;;;;;;;CAoIvC,CAAC"}
|