@vezham/icons-mcp 1.0.6 → 1.0.7
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 +1 -1
- package/dist/README.md +1 -1
- package/dist/cli/index.js +4 -4
- package/dist/core/codegen.js +1 -3
- package/dist/core/index-builder.js +5 -2
- package/dist/core/search.js +1 -1
- package/dist/core/types.d.ts +1 -1
- package/dist/data/icon-index.json +1 -1
- package/dist/package.json +1 -1
- package/dist/server/index.js +5 -4
- package/package.json +1 -1
package/dist/package.json
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { handleApplyIcon } from './tools/apply-icon.js';
|
|
|
5
5
|
import { handleListCategories } from './tools/list-categories.js';
|
|
6
6
|
import { handleSearchIcons } from './tools/search-icons.js';
|
|
7
7
|
import { handleViewIcon } from './tools/view-icon.js';
|
|
8
|
+
const ICON_WEIGHT_VALUES = ['outline', 'filled', 'duotone-outline', 'duotone-filled'];
|
|
8
9
|
const server = new McpServer({
|
|
9
10
|
name: 'vezham-icons-mcp',
|
|
10
11
|
version: '1.1.0',
|
|
@@ -19,9 +20,9 @@ server.tool('search_icons', [
|
|
|
19
20
|
].join(' '), {
|
|
20
21
|
query: z.string().describe('Keyword(s) or phrase — e.g. "cart", "user circle", "volume up", "credit card", "go back", "delete". Handles synonyms, misspellings, and multi-word queries.'),
|
|
21
22
|
weight: z
|
|
22
|
-
.enum(
|
|
23
|
+
.enum(ICON_WEIGHT_VALUES)
|
|
23
24
|
.optional()
|
|
24
|
-
.describe('Filter by weight. Omit to search
|
|
25
|
+
.describe('Filter by weight. Omit to search all weights.'),
|
|
25
26
|
limit: z
|
|
26
27
|
.number()
|
|
27
28
|
.int()
|
|
@@ -41,7 +42,7 @@ server.tool('view_icon', [
|
|
|
41
42
|
'For generating import/docs code, prefer apply_icon instead.',
|
|
42
43
|
].join(' '), {
|
|
43
44
|
name: z.string().describe('Icon kebab-case name, e.g. "heart", "arrow-right", "user-circle"'),
|
|
44
|
-
weight: z.enum(
|
|
45
|
+
weight: z.enum(ICON_WEIGHT_VALUES).describe('Which weight variant to fetch'),
|
|
45
46
|
}, async (args) => {
|
|
46
47
|
const result = handleViewIcon(args);
|
|
47
48
|
return {
|
|
@@ -56,7 +57,7 @@ server.tool('apply_icon', [
|
|
|
56
57
|
'Always call search_icons first to confirm the icon name and weight exist.',
|
|
57
58
|
].join(' '), {
|
|
58
59
|
name: z.string().describe('Icon kebab-case name, e.g. "heart"'),
|
|
59
|
-
weight: z.enum(
|
|
60
|
+
weight: z.enum(ICON_WEIGHT_VALUES).describe('Icon weight variant'),
|
|
60
61
|
framework: z
|
|
61
62
|
.enum(['react', 'react-native', 'vue', 'svelte', 'html', 'svg'])
|
|
62
63
|
.describe('Target framework or output format'),
|