@synergy-design-system/mcp 3.15.0 → 3.16.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1313](https://github.com/synergy-design-system/synergy-design-system/pull/1313) [`89a2022`](https://github.com/synergy-design-system/synergy-design-system/commit/89a2022e49b8f7aad3469ac392e5e5601b7238e8) Thanks [@schilchSICKAG](https://github.com/schilchSICKAG)! - Released on: 2026-06-24
8
+
9
+ fix: 🐛 dependency updates ([#258](https://github.com/synergy-design-system/synergy-design-system/issues/258))
10
+
11
+ - Updated dependencies [[`89a2022`](https://github.com/synergy-design-system/synergy-design-system/commit/89a2022e49b8f7aad3469ac392e5e5601b7238e8)]:
12
+ - @synergy-design-system/assets@2.1.3
13
+ - @synergy-design-system/metadata@3.16.1
14
+
15
+ ## 3.16.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [#1301](https://github.com/synergy-design-system/synergy-design-system/pull/1301) [`672f061`](https://github.com/synergy-design-system/synergy-design-system/commit/672f061900dada6eb4bab892ec6bb945dde009be) Thanks [@schilchSICKAG](https://github.com/schilchSICKAG)! - Released on: 2026-06-22
20
+
21
+ feat: ✨ Allow the MCP server to create spritesheets for applications ([#923](https://github.com/synergy-design-system/synergy-design-system/issues/923))
22
+
23
+ This release adds a new tool `create-spritesheet` that can be used to generate synergy compatible SVG spritesheets. It also includes a prompt `/create-spritesheet` that can be used to create the spritesheet, write it to the filesystem and register the icon library.
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies []:
28
+ - @synergy-design-system/metadata@3.16.0
29
+
3
30
  ## 3.15.0
4
31
 
5
32
  ### Minor Changes
package/README.md CHANGED
@@ -484,7 +484,7 @@ Resource identifier reference (exact values used by the server):
484
484
 
485
485
  ## Available Tools
486
486
 
487
- The MCP server currently registers 16 stable tools by default.
487
+ The MCP server currently registers 17 stable tools by default.
488
488
 
489
489
  ### 1. `component-list`
490
490
 
@@ -735,11 +735,25 @@ Example prompts:
735
735
  - "Show me the setup instructions for tokens"
736
736
  - "Give me the Synergy assets setup and limitations"
737
737
 
738
+ ### 17. `create-spritesheet`
739
+
740
+ **Description:** Creates a SVG sprite sheet for a provided set of icons. Only works with the Synergy 2025 icon set.
741
+
742
+ **Parameters:**
743
+
744
+ - `icons` (array, required): The icons to include in the sprite sheet. Must be valid icon keys from the Synergy 2025 icon set.
745
+
746
+ **Example prompts:**
747
+
748
+ - "Create a spritesheet containing these icons: star, home, settings"
749
+ - "Generate a custom Synergy 2025 sprite sheet for my selected icons"
750
+ - "Build an SVG sprite sheet from this icon list"
751
+
738
752
  ### Experimental Tools (Intent Policy)
739
753
 
740
754
  The following endpoints are experimental and are only registered when `experimentalFeatures.intentTools` is set to `true`.
741
755
 
742
- ### 17. `intent-categories-list` (experimental)
756
+ ### 18. `intent-categories-list` (experimental)
743
757
 
744
758
  **Description:** List available intent categories in the intent policy layer.
745
759
 
@@ -752,7 +766,7 @@ The following endpoints are experimental and are only registered when `experimen
752
766
  - "List intent categories"
753
767
  - "Show experimental intent categories"
754
768
 
755
- ### 18. `intent-component-guide` (experimental)
769
+ ### 19. `intent-component-guide` (experimental)
756
770
 
757
771
  **Description:** Answer the question: What can I do with a component in the intent system?
758
772
 
@@ -767,7 +781,7 @@ The following endpoints are experimental and are only registered when `experimen
767
781
  - "What can I do with syn-button?"
768
782
  - "Show intent guide for syn-button in react-web-components"
769
783
 
770
- ### 19. `intent-component-validate` (experimental)
784
+ ### 20. `intent-component-validate` (experimental)
771
785
 
772
786
  **Description:** Answer the question: Do I use a component correctly for a specific intent?
773
787
 
@@ -784,7 +798,7 @@ The following endpoints are experimental and are only registered when `experimen
784
798
  - "Do I use syn-button right for action.submit?"
785
799
  - "Validate this syn-button markup for action.submit: <syn-button type=\"submit\" variant=\"filled\">Send</syn-button>"
786
800
 
787
- ### 20. `intent-task-recommendations` (experimental)
801
+ ### 21. `intent-task-recommendations` (experimental)
788
802
 
789
803
  **Description:** Answer the question: What does Synergy provide for a specific task intent?
790
804
 
@@ -803,7 +817,7 @@ The following endpoints are experimental and are only registered when `experimen
803
817
  - "What does Synergy provide to submit a form?"
804
818
  - "Recommend components for action.submit"
805
819
 
806
- ### 21. `intent-options` (experimental)
820
+ ### 22. `intent-options` (experimental)
807
821
 
808
822
  **Description:** Answer the question: What are my renderable options for a specific intent?
809
823
 
@@ -823,7 +837,7 @@ The following endpoints are experimental and are only registered when `experimen
823
837
 
824
838
  ## Available Prompts
825
839
 
826
- The MCP server currently registers 1 prompt.
840
+ The MCP server currently registers 2 prompts.
827
841
 
828
842
  ### 1. `explain-component-rules`
829
843
 
@@ -839,6 +853,22 @@ The MCP server currently registers 1 prompt.
839
853
  - "What are the design and accessibility guidelines for syn-dialog?"
840
854
  - "Give me the usage guidance for syn-accordion"
841
855
 
856
+ ### 2. `create-spritesheet`
857
+
858
+ **Description:** Generates a task-specific instruction prompt for creating an SVG sprite sheet from icon usage found in a folder, including registration and usage guidance.
859
+
860
+ **Parameters:**
861
+
862
+ - `name` (string, optional): The name of the generated sprite sheet. If not provided, the sprite sheet will be registered as the default library.
863
+ - `path` (string, required): The path that should be searched for occurrences of `syn-icon` and `syn-icon-button` elements. Will search the project root if omitted.
864
+
865
+ **Example prompts:**
866
+
867
+ - "/mcp.synergy.create-spritesheet"
868
+ - "Create a sprite sheet prompt for icons used in src/components"
869
+ - "Generate create-spritesheet instructions for apps/demo with name app-icons"
870
+ - "Help me produce a spritesheet from icon usage in my UI folder"
871
+
842
872
  ## Usage Examples
843
873
 
844
874
  ### Command Line Interface
@@ -960,6 +990,7 @@ src/
960
990
  │ └── index.ts # Middleware module entrypoint
961
991
  ├── prompts/ # MCP prompt implementations
962
992
  │ ├── component-rules.ts
993
+ │ ├── create-spritesheet.ts
963
994
  │ └── index.ts
964
995
  ├── resources/ # MCP resource implementations (static, read-only data)
965
996
  │ ├── component-list.ts
@@ -975,6 +1006,7 @@ src/
975
1006
  │ ├── component-cluster-list.ts
976
1007
  │ ├── component-info.ts
977
1008
  │ ├── component-list.ts
1009
+ │ ├── create-spritesheet.ts
978
1010
  │ ├── davinci-migration-info.ts
979
1011
  │ ├── davinci-migration-list.ts
980
1012
  │ ├── intent-categories-list.ts
@@ -0,0 +1,2 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare const createSpriteSheetPrompt: (server: McpServer) => void;
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ import { promptHandler, } from '../utilities/index.js';
3
+ export const createSpriteSheetPrompt = (server) => {
4
+ server.registerPrompt('create-spritesheet', {
5
+ argsSchema: {
6
+ name: z
7
+ .string()
8
+ .optional()
9
+ .describe('The name of the generated sprite sheet. If not provided, the sprite sheet will be registered as the default library.'),
10
+ path: z
11
+ .string()
12
+ .optional()
13
+ .describe('A directory or file that should be searched for occurrences of icons. If omitted, searches in the whole project.'),
14
+ },
15
+ description: 'Creates a SVG sprite sheet for a provided set of icons. Only works with the Synergy 2025 icon set.',
16
+ title: 'Create Sprite Sheet',
17
+ }, promptHandler('create-spritesheet', async ({ name = 'default', path,
18
+ // eslint-disable-next-line @typescript-eslint/require-await
19
+ }) => {
20
+ // Ensure to use a valid name
21
+ const resolvedName = name?.trim() || 'default';
22
+ // Ensure to use a valid path
23
+ const resolvedPath = !path ? 'the entire project' : path.trim();
24
+ // Code sample to register the generated sprite sheet as an icon library in the Synergy Design System
25
+ const registrationCode = `
26
+ import { registerIconLibrary } from '@synergy-design-system/components/components/icon/library.js';
27
+
28
+ registerIconLibrary('${resolvedName}', {
29
+ resolver: name => \`/public/${resolvedName}.svg#\${name}\`,
30
+ spriteSheet: true,
31
+ });
32
+ `;
33
+ // Final prompt content for the AI, instructing it to generate the sprite sheet and provide usage instructions
34
+ const content = `
35
+ You are working with a Synergy Design System project.
36
+ Task:
37
+ Generate an SVG sprite sheet for all synergy icons used in ${resolvedPath}.
38
+
39
+ Instructions:
40
+ 1. Search through the project (or the provided path if specified) and find all occurrences of \`<syn-icon>\` and \`<syn-icon-button>\`.
41
+ 2. Extract the value of the "name" attribute from each usage.
42
+ 3. If at least one icon name was extracted, call the "create-spritesheet" tool with the extracted icon names as the "icons" argument.
43
+ If no icons were found, do not call the tool and instead inform the user.
44
+
45
+ After the tool returns:
46
+
47
+ 1. First, explain briefly that the SVG must be registered before usage.
48
+ 2. Second, provide the following code example for registering the sprite sheet:
49
+ \`\`\`js
50
+ ${registrationCode.trim()}
51
+ \`\`\`
52
+ 3. Then show how to use an icon:
53
+ \`\`\`html
54
+ ${resolvedName === 'default' ? '<syn-icon name="star"></syn-icon>' : `<syn-icon library="${resolvedName}" name="star"></syn-icon>`}
55
+ \`\`\`
56
+ 4. Save the generated SVG sprite sheet as "${resolvedName}.svg" in the public folder of the project, so it can be accessed at "/public/${resolvedName}.svg".
57
+ 5. Save the registration code in a file called "${resolvedName}-library.js" in the project, and make sure to import it in the main entry point of the application (e.g., index.js or main.js) to ensure the sprite sheet is registered when the application starts.
58
+ 6. If you cannot save files directly:
59
+ - Output the SVG and the registration code so the user can copy them manually.
60
+
61
+ Important:
62
+
63
+ - Call the "create-spritesheet" tool exactly once when valid icons are found.
64
+ - Do not explain the steps.
65
+ - Do not include intermediate results.
66
+ - Do not claim that files were saved unless you are certain the operation succeeded.
67
+ - The final answer must contain:
68
+ 1. Registration instructions
69
+ 2. Example usage
70
+ 3. The generated SVG
71
+ `.trim();
72
+ return [
73
+ content,
74
+ ];
75
+ }, {
76
+ description: ({ name, path, }) => `Creates a SVG sprite sheet for all synergy icons found in ${path} and registers it as ${name ?? 'the default library'}.`,
77
+ }));
78
+ };
@@ -1 +1,2 @@
1
1
  export * from './component-rules.js';
2
+ export * from './create-spritesheet.js';
@@ -1 +1,2 @@
1
1
  export * from './component-rules.js';
2
+ export * from './create-spritesheet.js';
@@ -0,0 +1,7 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ /**
3
+ * Simple tool to create a spritesheet for a given set of icons.
4
+ * This can be used to generate a custom spritesheet for a specific set of icons, which can then be used in the Synergy Design System or in other projects.
5
+ * @param server - The MCP server instance to register the tool on.
6
+ */
7
+ export declare const createSpriteSheetTool: (server: McpServer) => void;
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ import { createSpriteSheet, } from '@synergy-design-system/assets';
3
+ import { createToolAnnotations, toolHandler, } from '../utilities/index.js';
4
+ /**
5
+ * Simple tool to create a spritesheet for a given set of icons.
6
+ * This can be used to generate a custom spritesheet for a specific set of icons, which can then be used in the Synergy Design System or in other projects.
7
+ * @param server - The MCP server instance to register the tool on.
8
+ */
9
+ export const createSpriteSheetTool = (server) => {
10
+ server.registerTool('create-spritesheet', {
11
+ annotations: createToolAnnotations(),
12
+ description: 'Creates a SVG sprite sheet for a provided set of icons. Only works with the Synergy 2025 icon set.',
13
+ inputSchema: {
14
+ icons: z
15
+ .array(z.string())
16
+ .describe('The icons to include in the sprite sheet. Must be valid icon keys from the Synergy 2025 icon set.'),
17
+ },
18
+ title: 'Create Sprite Sheet',
19
+ }, toolHandler('create-spritesheet', async ({ icons,
20
+ // eslint-disable-next-line @typescript-eslint/require-await
21
+ }) => {
22
+ const iconset = createSpriteSheet(icons, 'sick2025');
23
+ return [
24
+ iconset,
25
+ ];
26
+ }));
27
+ };
@@ -3,6 +3,7 @@ export * from './asset-list.js';
3
3
  export * from './component-cluster-list.js';
4
4
  export * from './component-info.js';
5
5
  export * from './component-list.js';
6
+ export * from './create-spritesheet.js';
6
7
  export * from './davinci-migration-info.js';
7
8
  export * from './davinci-migration-list.js';
8
9
  export * from './migration-info.js';
@@ -3,6 +3,7 @@ export * from './asset-list.js';
3
3
  export * from './component-cluster-list.js';
4
4
  export * from './component-info.js';
5
5
  export * from './component-list.js';
6
+ export * from './create-spritesheet.js';
6
7
  export * from './davinci-migration-info.js';
7
8
  export * from './davinci-migration-list.js';
8
9
  export * from './migration-info.js';
package/package.json CHANGED
@@ -9,12 +9,13 @@
9
9
  "dependencies": {
10
10
  "@modelcontextprotocol/sdk": "^1.29.0",
11
11
  "zod": "^4.4.3",
12
- "@synergy-design-system/metadata": "3.15.0"
12
+ "@synergy-design-system/assets": "2.1.3",
13
+ "@synergy-design-system/metadata": "3.16.1"
13
14
  },
14
15
  "description": "MCP Server for the Synergy Design System",
15
16
  "devDependencies": {
16
17
  "@toon-format/toon": "^2.1.0",
17
- "@types/node": "^24.12.4",
18
+ "@types/node": "^24.13.2",
18
19
  "eslint": "^9.39.4",
19
20
  "tiktoken": "^1.0.22",
20
21
  "typescript": "^5.9.3",
@@ -56,7 +57,7 @@
56
57
  "directory": "packages/mcp"
57
58
  },
58
59
  "type": "module",
59
- "version": "3.15.0",
60
+ "version": "3.16.1",
60
61
  "scripts": {
61
62
  "debug": "npx @modelcontextprotocol/inspector",
62
63
  "build": "pnpm run clean && tsc",