@atlaskit/ads-mcp 0.2.4 → 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.
Files changed (48) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +57 -1
  3. package/dist/cjs/index.js +9 -2
  4. package/dist/cjs/instructions.js +1 -1
  5. package/dist/cjs/tools/analyze-accessibility/index.js +483 -0
  6. package/dist/cjs/tools/get-accessibility-guidelines/index.js +204 -0
  7. package/dist/cjs/tools/suggest-accessibility-fixes/fixes.js +387 -0
  8. package/dist/cjs/tools/suggest-accessibility-fixes/index.js +185 -0
  9. package/dist/cjs/tools/suggest-accessibility-fixes/keywords.js +34 -0
  10. package/dist/es2019/index.js +9 -2
  11. package/dist/es2019/instructions.js +8 -1
  12. package/dist/es2019/tools/analyze-accessibility/index.js +457 -0
  13. package/dist/es2019/tools/get-accessibility-guidelines/index.js +312 -0
  14. package/dist/es2019/tools/suggest-accessibility-fixes/fixes.js +705 -0
  15. package/dist/es2019/tools/suggest-accessibility-fixes/index.js +143 -0
  16. package/dist/es2019/tools/suggest-accessibility-fixes/keywords.js +28 -0
  17. package/dist/esm/index.js +9 -2
  18. package/dist/esm/instructions.js +1 -1
  19. package/dist/esm/tools/analyze-accessibility/index.js +476 -0
  20. package/dist/esm/tools/get-accessibility-guidelines/index.js +197 -0
  21. package/dist/esm/tools/suggest-accessibility-fixes/fixes.js +381 -0
  22. package/dist/esm/tools/suggest-accessibility-fixes/index.js +178 -0
  23. package/dist/esm/tools/suggest-accessibility-fixes/keywords.js +28 -0
  24. package/dist/types/instructions.d.ts +1 -1
  25. package/dist/types/tools/analyze-accessibility/index.d.ts +56 -0
  26. package/dist/types/tools/get-accessibility-guidelines/index.d.ts +26 -0
  27. package/dist/types/tools/suggest-accessibility-fixes/fixes.d.ts +17 -0
  28. package/dist/types/tools/suggest-accessibility-fixes/index.d.ts +28 -0
  29. package/dist/types/tools/suggest-accessibility-fixes/keywords.d.ts +12 -0
  30. package/dist/types-ts4.5/instructions.d.ts +1 -1
  31. package/dist/types-ts4.5/tools/analyze-accessibility/index.d.ts +56 -0
  32. package/dist/types-ts4.5/tools/get-accessibility-guidelines/index.d.ts +26 -0
  33. package/dist/types-ts4.5/tools/suggest-accessibility-fixes/fixes.d.ts +17 -0
  34. package/dist/types-ts4.5/tools/suggest-accessibility-fixes/index.d.ts +28 -0
  35. package/dist/types-ts4.5/tools/suggest-accessibility-fixes/keywords.d.ts +12 -0
  36. package/package.json +9 -3
  37. package/build/tsconfig.json +0 -22
  38. package/src/index.tsx +0 -70
  39. package/src/instructions.tsx +0 -5
  40. package/src/schema.tsx +0 -19
  41. package/src/tools/get-component-details/index.tsx +0 -64
  42. package/src/tools/get-components/components.tsx +0 -3579
  43. package/src/tools/get-components/index.tsx +0 -36
  44. package/src/tools/get-icons/index.tsx +0 -49
  45. package/src/tools/get-tokens/index.tsx +0 -43
  46. package/tsconfig.app.json +0 -41
  47. package/tsconfig.dev.json +0 -43
  48. package/tsconfig.json +0 -20
@@ -1,36 +0,0 @@
1
- import { emptyInputSchema } from '../../schema';
2
-
3
- import { components } from './components';
4
-
5
- const componentsList = components.map((c) => ({
6
- name: c.name,
7
- description: c.description,
8
- releasePhase: c.releasePhase,
9
- category: c.category,
10
- }));
11
-
12
- export const listGetComponentsTool = {
13
- name: 'get_components',
14
- description: `You MUST use this to fetch all Atlassian Design System components and parse their names, descriptions, and understand how they might be used (provided in JSON format) before working with components.
15
- You should never use a custom component not provided via this API where appropriate, or the custom component is a necessary wrapper around an ADS component.
16
-
17
- For a full example, guidelines, list of props, and more information, you should use the \`get_component_details\` tool passing one or many component names as the 'names' tool parameter.
18
- `,
19
- annotations: {
20
- title: 'Get ADS components',
21
- readOnlyHint: true,
22
- destructiveHint: false,
23
- idempotentHint: true,
24
- openWorldHint: true,
25
- },
26
- inputSchema: emptyInputSchema,
27
- };
28
-
29
- export const getComponentsTool = async () => ({
30
- content: componentsList.map((component) => ({
31
- // NOTE: Ideally one day the MCP would support structured content…
32
- // eg. `type: 'object', data: component`
33
- type: 'text',
34
- text: JSON.stringify(component, null, 2),
35
- })),
36
- });
@@ -1,49 +0,0 @@
1
- import { coreIconMetadata } from '@atlaskit/icon/metadata';
2
-
3
- import { emptyInputSchema } from '../../schema';
4
-
5
- const icons = Object.entries(coreIconMetadata).map(([_key, icon]) => ({
6
- componentName: icon.componentName,
7
- package: icon.package,
8
- categorization: icon.categorization,
9
- keywords: icon.keywords,
10
- status: icon.status,
11
- usage: icon.usage,
12
- type: icon.type,
13
- shouldRecommendSmallIcon: icon.shouldRecommendSmallIcon,
14
- }));
15
-
16
- export const listGetIconsTool = {
17
- name: 'get_icons',
18
- description: `You MUST use this to fetch all Atlassian Design System icons and parse their names, package, and understand how they're used (provided in JSON format) before working with iconography.
19
- These are the only icons to be used in modern code, though other legacy icons may still be found, these are not to be used by you, but you can keep them if you see them in existing code.
20
- The resulting icon name and package is often like this:
21
- \`\`\`tsx
22
- import AddIcon from '@atlaskit/icon/core/add';
23
-
24
- // Usage in isolation
25
- <AddIcon label="Add" />
26
-
27
- // Usage with a button
28
- import Button from '@atlaskit/button/new';
29
- <Button iconAfter={AddIcon}>Create</Button>
30
- \`\`\`
31
- `,
32
- annotations: {
33
- title: 'Get ADS icons',
34
- readOnlyHint: true,
35
- destructiveHint: false,
36
- idempotentHint: true,
37
- openWorldHint: true,
38
- },
39
- inputSchema: emptyInputSchema,
40
- };
41
-
42
- export const getIconsTool = async () => ({
43
- content: icons.map((icon) => ({
44
- // NOTE: Ideally one day the MCP would support structured content…
45
- // eg. `type: 'object', data: icon`
46
- type: 'text',
47
- text: JSON.stringify(icon, null, 2),
48
- })),
49
- });
@@ -1,43 +0,0 @@
1
- import { z } from 'zod';
2
- import { zodToJsonSchema } from 'zod-to-json-schema';
3
-
4
- import { tokens } from '@atlaskit/tokens/token-metadata';
5
-
6
- const inputSchema = z.object({});
7
-
8
- export const listGetTokensTool = {
9
- name: 'get_tokens',
10
- 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.
11
- These tokens are used in place of hardcoded values; you should never use a hardcoded value where a token value is appropriate.
12
- The resulting token name is used inside of the \`token()\` function, eg.:
13
- \`\`\`tsx
14
- import { token } from '@atlaskit/tokens';
15
- const styles = css({ color: token('color.text') });
16
- \`\`\`
17
- `,
18
- annotations: {
19
- title: 'Get ADS tokens',
20
- readOnlyHint: true,
21
- destructiveHint: false,
22
- idempotentHint: true,
23
- openWorldHint: true,
24
- },
25
- inputSchema: zodToJsonSchema(inputSchema),
26
- };
27
-
28
- export const getTokensTool = async () => ({
29
- content: tokens.map((token) => ({
30
- // NOTE: Ideally one day the MCP would support structured content…
31
- // eg. `type: 'object', data: token`
32
- type: 'text',
33
- text: JSON.stringify(
34
- {
35
- name: token.name,
36
- description: token.description,
37
- exampleValue: token.exampleValue,
38
- },
39
- null,
40
- 2,
41
- ),
42
- })),
43
- });
package/tsconfig.app.json DELETED
@@ -1,41 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.base.json",
3
- "include": ["./src/**/*.ts", "./src/**/*.tsx"],
4
- "exclude": [
5
- "**/docs/**/*",
6
- "**/__tests__/**/*",
7
- "**/vr-tests/**/*",
8
- "**/*.test.*",
9
- "**/test.*",
10
- "**/test-*",
11
- "**/examples.ts",
12
- "**/examples.tsx",
13
- "**/examples/*.ts",
14
- "**/examples/*.tsx",
15
- "**/examples/**/*.ts",
16
- "**/examples/**/*.tsx",
17
- "**/storybook/**/*",
18
- "**/constellation/**/*",
19
- ".storybook/*",
20
- "./__fixtures__/**/*",
21
- "./__generated__/**/*",
22
- "./mocks/**/*",
23
- "./__mocks__/**/*",
24
- "**/mock.*",
25
- "**/codemods/**/*.ts",
26
- "**/codemods/**/*.tsx"
27
- ],
28
- "compilerOptions": {
29
- "composite": true,
30
- "outDir": "../../../tsDist/@atlaskit__ads-mcp/app"
31
- },
32
- "references": [
33
- {
34
- "path": "../icon/tsconfig.app.json"
35
- },
36
- {
37
- "path": "../tokens/tsconfig.app.json"
38
- }
39
- ],
40
- "files": []
41
- }
package/tsconfig.dev.json DELETED
@@ -1,43 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.base.json",
3
- "include": [
4
- "**/docs/**/*",
5
- "**/__tests__/**/*",
6
- "**/vr-tests/**/*",
7
- "**/*.test.*",
8
- "**/test.*",
9
- "**/test-*",
10
- "**/examples.ts",
11
- "**/examples.tsx",
12
- "**/examples/*.ts",
13
- "**/examples/*.tsx",
14
- "**/examples/**/*.ts",
15
- "**/examples/**/*.tsx",
16
- "**/storybook/**/*",
17
- "**/constellation/**/*",
18
- ".storybook/*",
19
- "./__fixtures__/**/*",
20
- "./__generated__/**/*",
21
- "./mocks/**/*",
22
- "./__mocks__/**/*",
23
- "**/mock.*",
24
- "**/codemods/**/*.ts",
25
- "**/codemods/**/*.tsx",
26
- "**/stories.ts",
27
- "**/stories.tsx",
28
- "**/stories/*.ts",
29
- "**/stories/*.tsx",
30
- "**/stories/**/*.ts",
31
- "**/stories/**/*.tsx"
32
- ],
33
- "exclude": ["./dist/**/*", "./build/**/*", "./node_modules/**/*"],
34
- "compilerOptions": {
35
- "composite": true,
36
- "outDir": "../../../tsDist/@atlaskit__ads-mcp/dev"
37
- },
38
- "references": [
39
- {
40
- "path": "./tsconfig.app.json"
41
- }
42
- ]
43
- }
package/tsconfig.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "include": [
4
- "__tests__/**/*.ts",
5
- "__tests__/**/*.tsx",
6
- "docs/**/*.ts",
7
- "docs/**/*.tsx",
8
- "examples/**/*.ts",
9
- "examples/**/*.tsx",
10
- "src/**/*.ts",
11
- "src/**/*.tsx",
12
- "**/stories.ts",
13
- "**/stories.tsx",
14
- "**/stories/*.ts",
15
- "**/stories/*.tsx",
16
- "**/stories/**/*.ts",
17
- "**/stories/**/*.tsx"
18
- ],
19
- "compilerOptions": {}
20
- }