@atlaskit/ads-mcp 0.3.0 → 0.4.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.
Files changed (34) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/index.js +9 -5
  3. package/dist/cjs/instructions.js +1 -1
  4. package/dist/cjs/tools/{get-icons → get-all-icons}/index.js +6 -6
  5. package/dist/cjs/tools/{get-tokens → get-all-tokens}/index.js +7 -8
  6. package/dist/cjs/tools/search-icons/index.js +138 -0
  7. package/dist/cjs/tools/search-tokens/index.js +106 -0
  8. package/dist/cjs/tools/suggest-accessibility-fixes/fixes.js +1 -1
  9. package/dist/es2019/index.js +9 -5
  10. package/dist/es2019/instructions.js +4 -0
  11. package/dist/es2019/tools/{get-icons → get-all-icons}/index.js +4 -4
  12. package/dist/es2019/tools/get-all-tokens/index.js +34 -0
  13. package/dist/es2019/tools/search-icons/index.js +126 -0
  14. package/dist/es2019/tools/search-tokens/index.js +96 -0
  15. package/dist/es2019/tools/suggest-accessibility-fixes/fixes.js +1 -1
  16. package/dist/esm/index.js +9 -5
  17. package/dist/esm/instructions.js +1 -1
  18. package/dist/esm/tools/{get-icons → get-all-icons}/index.js +5 -5
  19. package/dist/esm/tools/{get-tokens → get-all-tokens}/index.js +6 -7
  20. package/dist/esm/tools/search-icons/index.js +131 -0
  21. package/dist/esm/tools/search-tokens/index.js +99 -0
  22. package/dist/esm/tools/suggest-accessibility-fixes/fixes.js +1 -1
  23. package/dist/types/instructions.d.ts +1 -1
  24. package/dist/{types-ts4.5/tools/get-tokens → types/tools/get-all-icons}/index.d.ts +2 -2
  25. package/dist/types/tools/{get-tokens → get-all-tokens}/index.d.ts +2 -2
  26. package/dist/types/tools/search-icons/index.d.ts +38 -0
  27. package/dist/types/tools/search-tokens/index.d.ts +38 -0
  28. package/dist/types-ts4.5/instructions.d.ts +1 -1
  29. package/dist/types-ts4.5/tools/{get-icons → get-all-icons}/index.d.ts +2 -2
  30. package/dist/{types/tools/get-icons → types-ts4.5/tools/get-all-tokens}/index.d.ts +2 -2
  31. package/dist/types-ts4.5/tools/search-icons/index.d.ts +38 -0
  32. package/dist/types-ts4.5/tools/search-tokens/index.d.ts +38 -0
  33. package/package.json +4 -3
  34. package/dist/es2019/tools/get-tokens/index.js +0 -35
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ declare const inputSchema: z.ZodObject<{
3
+ terms: z.ZodArray<z.ZodString, "many">;
4
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
5
+ exactName: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ terms: string[];
8
+ limit: number;
9
+ exactName: boolean;
10
+ }, {
11
+ terms: string[];
12
+ limit?: number | undefined;
13
+ exactName?: boolean | undefined;
14
+ }>;
15
+ export declare const listSearchIconsTool: {
16
+ name: string;
17
+ description: string;
18
+ annotations: {
19
+ title: string;
20
+ readOnlyHint: boolean;
21
+ destructiveHint: boolean;
22
+ idempotentHint: boolean;
23
+ openWorldHint: boolean;
24
+ };
25
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
26
+ $schema?: string | undefined;
27
+ definitions?: {
28
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
29
+ } | undefined;
30
+ };
31
+ };
32
+ export declare const searchIconsTool: (params: z.infer<typeof inputSchema>) => Promise<{
33
+ content: {
34
+ type: string;
35
+ text: string;
36
+ }[];
37
+ }>;
38
+ export {};
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ declare const inputSchema: z.ZodObject<{
3
+ terms: z.ZodArray<z.ZodString, "many">;
4
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
5
+ exactName: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ terms: string[];
8
+ limit: number;
9
+ exactName: boolean;
10
+ }, {
11
+ terms: string[];
12
+ limit?: number | undefined;
13
+ exactName?: boolean | undefined;
14
+ }>;
15
+ export declare const listSearchTokensTool: {
16
+ name: string;
17
+ description: string;
18
+ annotations: {
19
+ title: string;
20
+ readOnlyHint: boolean;
21
+ destructiveHint: boolean;
22
+ idempotentHint: boolean;
23
+ openWorldHint: boolean;
24
+ };
25
+ inputSchema: import("zod-to-json-schema").JsonSchema7Type & {
26
+ $schema?: string | undefined;
27
+ definitions?: {
28
+ [key: string]: import("zod-to-json-schema").JsonSchema7Type;
29
+ } | undefined;
30
+ };
31
+ };
32
+ export declare const searchTokensTool: (params: z.infer<typeof inputSchema>) => Promise<{
33
+ content: {
34
+ type: string;
35
+ text: string;
36
+ }[];
37
+ }>;
38
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ads-mcp",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "The official Atlassian Design System MCP server to develop apps and user interfaces matching the Atlassian style.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -30,13 +30,14 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@atlaskit/icon": "^28.1.0",
33
- "@atlaskit/tokens": "^6.1.0",
33
+ "@atlaskit/tokens": "^6.3.0",
34
34
  "@axe-core/playwright": "^4.8.0",
35
35
  "@axe-core/puppeteer": "^4.7.3",
36
36
  "@babel/runtime": "^7.0.0",
37
37
  "@modelcontextprotocol/sdk": "^1.8.0",
38
38
  "axe-core": "^4.10.2",
39
- "jsdom": "^22.0.0",
39
+ "fuse.js": "^6.6.2",
40
+ "jsdom": "root:*",
40
41
  "playwright": "1.44.1",
41
42
  "puppeteer": "13.7.0",
42
43
  "zod": "^3.23.8",
@@ -1,35 +0,0 @@
1
- import { z } from 'zod';
2
- import { zodToJsonSchema } from 'zod-to-json-schema';
3
- import { tokens } from '@atlaskit/tokens/token-metadata';
4
- const inputSchema = z.object({});
5
- export const listGetTokensTool = {
6
- name: 'get_tokens',
7
- description: `You MUST use this to fetch all Atlassian Design System tokens and parse their names and descriptions (provided in JSON format) before working with tokens.
8
- These tokens are used in place of hardcoded values; you should never use a hardcoded value where a token value is appropriate.
9
- The resulting token name is used inside of the \`token()\` function, eg.:
10
- \`\`\`tsx
11
- import { token } from '@atlaskit/tokens';
12
- const styles = css({ color: token('color.text') });
13
- \`\`\`
14
- `,
15
- annotations: {
16
- title: 'Get ADS tokens',
17
- readOnlyHint: true,
18
- destructiveHint: false,
19
- idempotentHint: true,
20
- openWorldHint: true
21
- },
22
- inputSchema: zodToJsonSchema(inputSchema)
23
- };
24
- export const getTokensTool = async () => ({
25
- content: tokens.map(token => ({
26
- // NOTE: Ideally one day the MCP would support structured content…
27
- // eg. `type: 'object', data: token`
28
- type: 'text',
29
- text: JSON.stringify({
30
- name: token.name,
31
- description: token.description,
32
- exampleValue: token.exampleValue
33
- }, null, 2)
34
- }))
35
- });