@atlaskit/ads-mcp 0.21.1 → 1.1.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 (203) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/a11y-fixes/package.json +1 -8
  3. package/a11y-guidelines/package.json +1 -8
  4. package/dist/cjs/index.js +27 -1
  5. package/dist/cjs/tools/get-all-components/components.codegen.js +2 -2
  6. package/dist/cjs/tools/get-all-components/types.js +5 -1
  7. package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +19 -6
  8. package/dist/cjs/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +206 -0
  9. package/dist/cjs/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.js +40 -0
  10. package/dist/cjs/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +22 -0
  11. package/dist/cjs/tools/get-atlaskit-hooks/types.js +5 -0
  12. package/dist/cjs/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +836 -0
  13. package/dist/cjs/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.js +40 -0
  14. package/dist/cjs/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +22 -0
  15. package/dist/cjs/tools/get-atlaskit-utilities/types.js +5 -0
  16. package/dist/cjs/tools/get-guidelines/guidelines-structured-content.codegen.js +4 -4
  17. package/dist/cjs/tools/get-lint-rules/lint-rules-structured-content.codegen.js +31 -11
  18. package/dist/cjs/tools/i18n-conversion/guide.js +7 -7
  19. package/dist/cjs/tools/i18n-conversion/list-i18n-conversion-tool.js +1 -1
  20. package/dist/cjs/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +22 -0
  21. package/dist/cjs/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +11 -0
  22. package/dist/cjs/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.js +109 -0
  23. package/dist/cjs/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +22 -0
  24. package/dist/cjs/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +11 -0
  25. package/dist/cjs/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.js +111 -0
  26. package/dist/cjs/tools/types.js +1 -0
  27. package/dist/es2019/index.js +30 -0
  28. package/dist/es2019/tools/get-all-components/components.codegen.js +2 -2
  29. package/dist/es2019/tools/get-all-components/types.js +1 -0
  30. package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +19 -6
  31. package/dist/es2019/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +200 -0
  32. package/dist/es2019/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.js +14 -0
  33. package/dist/es2019/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +21 -0
  34. package/dist/es2019/tools/get-atlaskit-hooks/types.js +1 -0
  35. package/dist/es2019/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +830 -0
  36. package/dist/es2019/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.js +14 -0
  37. package/dist/es2019/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +21 -0
  38. package/dist/es2019/tools/get-atlaskit-utilities/types.js +1 -0
  39. package/dist/es2019/tools/get-guidelines/guidelines-structured-content.codegen.js +4 -4
  40. package/dist/es2019/tools/get-lint-rules/lint-rules-structured-content.codegen.js +31 -11
  41. package/dist/es2019/tools/i18n-conversion/guide.js +7 -7
  42. package/dist/es2019/tools/i18n-conversion/list-i18n-conversion-tool.js +1 -1
  43. package/dist/es2019/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +19 -0
  44. package/dist/es2019/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +5 -0
  45. package/dist/es2019/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.js +79 -0
  46. package/dist/es2019/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +19 -0
  47. package/dist/es2019/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +5 -0
  48. package/dist/es2019/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.js +81 -0
  49. package/dist/es2019/tools/types.js +0 -0
  50. package/dist/esm/index.js +27 -1
  51. package/dist/esm/tools/get-all-components/components.codegen.js +2 -2
  52. package/dist/esm/tools/get-all-components/types.js +1 -0
  53. package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +19 -6
  54. package/dist/esm/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.js +200 -0
  55. package/dist/esm/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.js +32 -0
  56. package/dist/esm/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.js +16 -0
  57. package/dist/esm/tools/get-atlaskit-hooks/types.js +1 -0
  58. package/dist/esm/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.js +830 -0
  59. package/dist/esm/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.js +32 -0
  60. package/dist/esm/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.js +16 -0
  61. package/dist/esm/tools/get-atlaskit-utilities/types.js +1 -0
  62. package/dist/esm/tools/get-guidelines/guidelines-structured-content.codegen.js +4 -4
  63. package/dist/esm/tools/get-lint-rules/lint-rules-structured-content.codegen.js +31 -11
  64. package/dist/esm/tools/i18n-conversion/guide.js +7 -7
  65. package/dist/esm/tools/i18n-conversion/list-i18n-conversion-tool.js +1 -1
  66. package/dist/esm/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.js +16 -0
  67. package/dist/esm/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +5 -0
  68. package/dist/esm/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.js +102 -0
  69. package/dist/esm/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.js +16 -0
  70. package/dist/esm/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +5 -0
  71. package/dist/esm/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.js +106 -0
  72. package/dist/esm/tools/types.js +0 -0
  73. package/dist/types/tools/get-all-components/components.codegen.d.ts +1 -1
  74. package/dist/types/tools/get-all-components/types.d.ts +2 -1
  75. package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +1 -1
  76. package/dist/types/tools/get-atlaskit-hooks/atlaskit-hooks.codegen.d.ts +10 -0
  77. package/dist/{types-ts4.5/tools/get-all-tokens/get-all-tokens-tool.d.ts → types/tools/get-atlaskit-hooks/get-atlaskit-hooks-tool.d.ts} +1 -1
  78. package/dist/{types-ts4.5/tools/analyze-a11y/list-analyze-a11y-tool.d.ts → types/tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool.d.ts} +1 -1
  79. package/dist/types/tools/get-atlaskit-hooks/types.d.ts +14 -0
  80. package/dist/types/tools/get-atlaskit-utilities/atlaskit-utilities.codegen.d.ts +10 -0
  81. package/dist/{types-ts4.5/tools/get-all-components/get-all-components-tool.d.ts → types/tools/get-atlaskit-utilities/get-atlaskit-utilities-tool.d.ts} +1 -1
  82. package/dist/{types-ts4.5/tools/analyze-a11y/list-analyze-localhost-a11y-tool.d.ts → types/tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool.d.ts} +1 -1
  83. package/dist/types/tools/get-atlaskit-utilities/types.d.ts +41 -0
  84. package/dist/types/tools/get-guidelines/guidelines-structured-content.codegen.d.ts +1 -1
  85. package/dist/types/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +1 -1
  86. package/dist/{types-ts4.5/tools/get-all-icons/list-get-all-icons-tool.d.ts → types/tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool.d.ts} +1 -1
  87. package/dist/{types-ts4.5/tools/search-tokens/search-tokens-input-schema.d.ts → types/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.d.ts} +1 -1
  88. package/dist/types/tools/search-atlaskit-hooks/search-atlaskit-hooks-tool.d.ts +4 -0
  89. package/dist/{types-ts4.5/tools/get-a11y-guidelines/list-get-a11y-guidelines-tool.d.ts → types/tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool.d.ts} +1 -1
  90. package/dist/{types-ts4.5/tools/search-components/search-components-input-schema.d.ts → types/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.d.ts} +1 -1
  91. package/dist/types/tools/search-atlaskit-utilities/search-atlaskit-utilities-tool.d.ts +4 -0
  92. package/dist/types/tools/types.d.ts +12 -0
  93. package/i18n-conversion-guide/package.json +1 -8
  94. package/migration-registry/package.json +1 -8
  95. package/package.json +5 -13
  96. package/tools/analyze-a11y/package.json +1 -8
  97. package/tools/get-a11y-guidelines/package.json +1 -8
  98. package/tools/get-all-components/package.json +1 -8
  99. package/tools/get-all-icons/package.json +1 -8
  100. package/tools/get-all-tokens/package.json +1 -8
  101. package/tools/get-guidelines/package.json +1 -8
  102. package/tools/get-lint-rules/package.json +1 -8
  103. package/tools/i18n-conversion/package.json +1 -8
  104. package/tools/migration-guides/package.json +1 -8
  105. package/tools/plan/package.json +1 -8
  106. package/tools/search-components/package.json +1 -8
  107. package/tools/search-icons/package.json +1 -8
  108. package/tools/search-tokens/package.json +1 -8
  109. package/tools/suggest-a11y-fixes/package.json +1 -8
  110. package/dist/types-ts4.5/entry-points/a11y-fixes.d.ts +0 -1
  111. package/dist/types-ts4.5/entry-points/a11y-guidelines.d.ts +0 -1
  112. package/dist/types-ts4.5/entry-points/analyze-a11y.d.ts +0 -5
  113. package/dist/types-ts4.5/entry-points/get-a11y-guidelines.d.ts +0 -3
  114. package/dist/types-ts4.5/entry-points/get-all-components.d.ts +0 -2
  115. package/dist/types-ts4.5/entry-points/get-all-icons.d.ts +0 -2
  116. package/dist/types-ts4.5/entry-points/get-all-tokens.d.ts +0 -2
  117. package/dist/types-ts4.5/entry-points/get-atlaskit-components.d.ts +0 -2
  118. package/dist/types-ts4.5/entry-points/get-guidelines.d.ts +0 -3
  119. package/dist/types-ts4.5/entry-points/get-lint-rules.d.ts +0 -3
  120. package/dist/types-ts4.5/entry-points/i18n-conversion-guide.d.ts +0 -1
  121. package/dist/types-ts4.5/entry-points/i18n-conversion.d.ts +0 -3
  122. package/dist/types-ts4.5/entry-points/migration-guides.d.ts +0 -3
  123. package/dist/types-ts4.5/entry-points/migration-registry.d.ts +0 -1
  124. package/dist/types-ts4.5/entry-points/plan.d.ts +0 -3
  125. package/dist/types-ts4.5/entry-points/search-atlaskit-components.d.ts +0 -3
  126. package/dist/types-ts4.5/entry-points/search-components.d.ts +0 -3
  127. package/dist/types-ts4.5/entry-points/search-icons.d.ts +0 -3
  128. package/dist/types-ts4.5/entry-points/search-tokens.d.ts +0 -3
  129. package/dist/types-ts4.5/entry-points/suggest-a11y-fixes.d.ts +0 -3
  130. package/dist/types-ts4.5/helpers/agent.d.ts +0 -3
  131. package/dist/types-ts4.5/helpers/analytics.d.ts +0 -21
  132. package/dist/types-ts4.5/helpers/clean-query.d.ts +0 -1
  133. package/dist/types-ts4.5/helpers/compute-multi-term-fuse-allocation.d.ts +0 -14
  134. package/dist/types-ts4.5/helpers/config-path.d.ts +0 -7
  135. package/dist/types-ts4.5/helpers/fuse-multi-term.d.ts +0 -26
  136. package/dist/types-ts4.5/helpers/index.d.ts +0 -3
  137. package/dist/types-ts4.5/helpers/send-operational-event.d.ts +0 -13
  138. package/dist/types-ts4.5/helpers/staff-id.d.ts +0 -1
  139. package/dist/types-ts4.5/helpers/validation.d.ts +0 -26
  140. package/dist/types-ts4.5/helpers/zod-to-json-schema.d.ts +0 -3
  141. package/dist/types-ts4.5/index.d.ts +0 -7
  142. package/dist/types-ts4.5/instructions.d.ts +0 -1
  143. package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-input-schema.d.ts +0 -17
  144. package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-localhost-input-schema.d.ts +0 -17
  145. package/dist/types-ts4.5/tools/analyze-a11y/analyze-a11y-tool.d.ts +0 -8
  146. package/dist/types-ts4.5/tools/analyze-a11y/analyze-localhost-a11y-tool.d.ts +0 -8
  147. package/dist/types-ts4.5/tools/analyze-a11y/generate-ads-fix-for-violation.d.ts +0 -1
  148. package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-input-schema.d.ts +0 -8
  149. package/dist/types-ts4.5/tools/get-a11y-guidelines/get-a11y-guidelines-tool.d.ts +0 -8
  150. package/dist/types-ts4.5/tools/get-a11y-guidelines/guidelines.d.ts +0 -102
  151. package/dist/types-ts4.5/tools/get-all-components/components.codegen.d.ts +0 -10
  152. package/dist/types-ts4.5/tools/get-all-components/components.d.ts +0 -10
  153. package/dist/types-ts4.5/tools/get-all-components/list-get-all-components-tool.d.ts +0 -2
  154. package/dist/types-ts4.5/tools/get-all-components/load-all-components.d.ts +0 -2
  155. package/dist/types-ts4.5/tools/get-all-components/types.d.ts +0 -26
  156. package/dist/types-ts4.5/tools/get-all-icons/get-all-icons-tool.d.ts +0 -6
  157. package/dist/types-ts4.5/tools/get-all-icons/icons.d.ts +0 -11
  158. package/dist/types-ts4.5/tools/get-all-tokens/list-get-all-tokens-tool.d.ts +0 -2
  159. package/dist/types-ts4.5/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +0 -10
  160. package/dist/types-ts4.5/tools/get-atlaskit-components/get-atlaskit-components-tool.d.ts +0 -6
  161. package/dist/types-ts4.5/tools/get-atlaskit-components/list-get-atlaskit-components-tool.d.ts +0 -2
  162. package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-input-schema.d.ts +0 -5
  163. package/dist/types-ts4.5/tools/get-guidelines/get-guidelines-tool.d.ts +0 -8
  164. package/dist/types-ts4.5/tools/get-guidelines/guidelines-structured-content.codegen.d.ts +0 -13
  165. package/dist/types-ts4.5/tools/get-guidelines/list-get-guidelines-tool.d.ts +0 -2
  166. package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +0 -6
  167. package/dist/types-ts4.5/tools/get-lint-rules/get-lint-rules-tool.d.ts +0 -4
  168. package/dist/types-ts4.5/tools/get-lint-rules/lint-rules-structured-content.codegen.d.ts +0 -13
  169. package/dist/types-ts4.5/tools/get-lint-rules/list-get-lint-rules-tool.d.ts +0 -19
  170. package/dist/types-ts4.5/tools/i18n-conversion/guide.d.ts +0 -5
  171. package/dist/types-ts4.5/tools/i18n-conversion/i18n-conversion-input-schema.d.ts +0 -10
  172. package/dist/types-ts4.5/tools/i18n-conversion/i18n-conversion-tool.d.ts +0 -8
  173. package/dist/types-ts4.5/tools/i18n-conversion/list-i18n-conversion-tool.d.ts +0 -2
  174. package/dist/types-ts4.5/tools/i18n-conversion/types.d.ts +0 -22
  175. package/dist/types-ts4.5/tools/migration-guides/get-available-migration-ids.d.ts +0 -12
  176. package/dist/types-ts4.5/tools/migration-guides/get-available-migrations-description.d.ts +0 -13
  177. package/dist/types-ts4.5/tools/migration-guides/list-migration-guides-tool.d.ts +0 -2
  178. package/dist/types-ts4.5/tools/migration-guides/migration-guides-input-schema.d.ts +0 -15
  179. package/dist/types-ts4.5/tools/migration-guides/migration-guides-tool.d.ts +0 -8
  180. package/dist/types-ts4.5/tools/migration-guides/migration-registry.d.ts +0 -2
  181. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-jira-spotlight.d.ts +0 -2
  182. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-multi-step.d.ts +0 -2
  183. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-single-step.d.ts +0 -2
  184. package/dist/types-ts4.5/tools/migration-guides/migrations/onboarding-with-motion.d.ts +0 -2
  185. package/dist/types-ts4.5/tools/migration-guides/types.d.ts +0 -23
  186. package/dist/types-ts4.5/tools/plan/list-plan-tool.d.ts +0 -2
  187. package/dist/types-ts4.5/tools/plan/plan-input-schema.d.ts +0 -20
  188. package/dist/types-ts4.5/tools/plan/plan-tool.d.ts +0 -15
  189. package/dist/types-ts4.5/tools/search-atlaskit-components/list-search-atlaskit-components-tool.d.ts +0 -2
  190. package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +0 -11
  191. package/dist/types-ts4.5/tools/search-atlaskit-components/search-atlaskit-components-tool.d.ts +0 -4
  192. package/dist/types-ts4.5/tools/search-components/list-search-components-tool.d.ts +0 -2
  193. package/dist/types-ts4.5/tools/search-components/search-components-tool.d.ts +0 -4
  194. package/dist/types-ts4.5/tools/search-icons/list-search-icons-tool.d.ts +0 -2
  195. package/dist/types-ts4.5/tools/search-icons/search-icons-input-schema.d.ts +0 -11
  196. package/dist/types-ts4.5/tools/search-icons/search-icons-tool.d.ts +0 -4
  197. package/dist/types-ts4.5/tools/search-tokens/list-search-tokens-tool.d.ts +0 -2
  198. package/dist/types-ts4.5/tools/search-tokens/search-tokens-tool.d.ts +0 -4
  199. package/dist/types-ts4.5/tools/suggest-a11y-fixes/fixes.d.ts +0 -17
  200. package/dist/types-ts4.5/tools/suggest-a11y-fixes/keywords.d.ts +0 -12
  201. package/dist/types-ts4.5/tools/suggest-a11y-fixes/list-suggest-a11y-fixes-tool.d.ts +0 -2
  202. package/dist/types-ts4.5/tools/suggest-a11y-fixes/suggest-a11y-fixes-input-schema.d.ts +0 -17
  203. package/dist/types-ts4.5/tools/suggest-a11y-fixes/suggest-a11y-fixes-tool.d.ts +0 -8
@@ -0,0 +1,79 @@
1
+ /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
+
3
+ import Fuse from 'fuse.js';
4
+ import { cleanQuery, mergeMultiTermFuseResults } from '../../helpers';
5
+ import { atlaskitHooks } from '../get-atlaskit-hooks/atlaskit-hooks.codegen';
6
+ const buildHookResult = result => {
7
+ return {
8
+ name: result.name,
9
+ package: result.package,
10
+ description: result.description,
11
+ usageGuidelines: result.usageGuidelines,
12
+ keywords: result.keywords,
13
+ category: result.category,
14
+ parameters: result.parameters,
15
+ returns: result.returns
16
+ };
17
+ };
18
+ export const searchAtlaskitHooksTool = async ({
19
+ terms,
20
+ limit = 2
21
+ }) => {
22
+ const searchTerms = [...new Set(terms.filter(Boolean).map(cleanQuery))];
23
+ if (!searchTerms.length) {
24
+ return {
25
+ content: [{
26
+ type: 'text',
27
+ text: '[]'
28
+ }]
29
+ };
30
+ }
31
+ const hooks = atlaskitHooks;
32
+ const fuse = new Fuse(hooks, {
33
+ keys: [{
34
+ name: 'name',
35
+ weight: 5
36
+ }, {
37
+ name: 'package',
38
+ weight: 3
39
+ }, {
40
+ name: 'category',
41
+ weight: 2
42
+ }, {
43
+ name: 'description',
44
+ weight: 2
45
+ }, {
46
+ name: 'keywords',
47
+ weight: 2
48
+ }, {
49
+ name: 'usageGuidelines',
50
+ weight: 2
51
+ }],
52
+ threshold: 0.4,
53
+ distance: 80,
54
+ minMatchCharLength: 3,
55
+ ignoreFieldNorm: true,
56
+ includeScore: true
57
+ });
58
+ const matchedItems = mergeMultiTermFuseResults({
59
+ searchTerms,
60
+ limit,
61
+ search: query => fuse.search(query, {
62
+ limit: limit * searchTerms.length
63
+ })
64
+ });
65
+ if (!matchedItems.length) {
66
+ return {
67
+ content: [{
68
+ type: 'text',
69
+ text: `Error: No Atlaskit hooks found for '${terms.join(', ')}'.`
70
+ }]
71
+ };
72
+ }
73
+ return {
74
+ content: [{
75
+ type: 'text',
76
+ text: JSON.stringify(matchedItems.map(buildHookResult))
77
+ }]
78
+ };
79
+ };
@@ -0,0 +1,19 @@
1
+ /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
+
3
+ import { zodToJsonSchema } from '../../helpers';
4
+ import { searchAtlaskitUtilitiesInputSchema } from './search-atlaskit-utilities-input-schema';
5
+ export const listSearchAtlaskitUtilitiesTool = {
6
+ name: 'atlaskit_search_utilities',
7
+ description: `Search for atlaskit utilities (functions, constants, types) by name, package, category, description, or keywords.
8
+
9
+ WHEN TO USE:
10
+ Use this when you want to find a utility but don't know its exact name or package.`,
11
+ annotations: {
12
+ title: 'Search Atlaskit utilities',
13
+ readOnlyHint: true,
14
+ destructiveHint: false,
15
+ idempotentHint: true,
16
+ openWorldHint: true
17
+ },
18
+ inputSchema: zodToJsonSchema(searchAtlaskitUtilitiesInputSchema)
19
+ };
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ export const searchAtlaskitUtilitiesInputSchema = z.object({
3
+ terms: z.array(z.string()).describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, usageGuidelines). Example: `["debounce", "a11y", "storage"]`.'),
4
+ limit: z.number().default(2).describe('Max matches **per term** (default 2).').optional()
5
+ });
@@ -0,0 +1,81 @@
1
+ /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
+
3
+ import Fuse from 'fuse.js';
4
+ import { cleanQuery, mergeMultiTermFuseResults } from '../../helpers';
5
+ import { atlaskitUtilities } from '../get-atlaskit-utilities/atlaskit-utilities.codegen';
6
+ const buildUtilityResult = result => {
7
+ return {
8
+ name: result.name,
9
+ package: result.package,
10
+ description: result.description,
11
+ usageGuidelines: result.usageGuidelines,
12
+ keywords: result.keywords,
13
+ category: result.category,
14
+ kind: result.kind,
15
+ ...(result.kind === 'function' ? {
16
+ signature: result.signature
17
+ } : {})
18
+ };
19
+ };
20
+ export const searchAtlaskitUtilitiesTool = async ({
21
+ terms,
22
+ limit = 2
23
+ }) => {
24
+ const searchTerms = [...new Set(terms.filter(Boolean).map(cleanQuery))];
25
+ if (!searchTerms.length) {
26
+ return {
27
+ content: [{
28
+ type: 'text',
29
+ text: '[]'
30
+ }]
31
+ };
32
+ }
33
+ const utilities = atlaskitUtilities;
34
+ const fuse = new Fuse(utilities, {
35
+ keys: [{
36
+ name: 'name',
37
+ weight: 5
38
+ }, {
39
+ name: 'package',
40
+ weight: 3
41
+ }, {
42
+ name: 'category',
43
+ weight: 2
44
+ }, {
45
+ name: 'description',
46
+ weight: 2
47
+ }, {
48
+ name: 'keywords',
49
+ weight: 2
50
+ }, {
51
+ name: 'usageGuidelines',
52
+ weight: 2
53
+ }],
54
+ threshold: 0.4,
55
+ distance: 80,
56
+ minMatchCharLength: 3,
57
+ ignoreFieldNorm: true,
58
+ includeScore: true
59
+ });
60
+ const matchedItems = mergeMultiTermFuseResults({
61
+ searchTerms,
62
+ limit,
63
+ search: query => fuse.search(query, {
64
+ limit: limit * searchTerms.length
65
+ })
66
+ });
67
+ if (!matchedItems.length) {
68
+ return {
69
+ content: [{
70
+ type: 'text',
71
+ text: `Error: No Atlaskit utilities found for '${terms.join(', ')}'.`
72
+ }]
73
+ };
74
+ }
75
+ return {
76
+ content: [{
77
+ type: 'text',
78
+ text: JSON.stringify(matchedItems.map(buildUtilityResult))
79
+ }]
80
+ };
81
+ };
File without changes
package/dist/esm/index.js CHANGED
@@ -25,6 +25,10 @@ import { getAllTokensTool } from './tools/get-all-tokens/get-all-tokens-tool';
25
25
  import { listGetAllTokensTool } from './tools/get-all-tokens/list-get-all-tokens-tool';
26
26
  import { getAtlaskitComponentsTool } from './tools/get-atlaskit-components/get-atlaskit-components-tool';
27
27
  import { listGetAtlaskitComponentsTool } from './tools/get-atlaskit-components/list-get-atlaskit-components-tool';
28
+ import { getAtlaskitHooksTool } from './tools/get-atlaskit-hooks/get-atlaskit-hooks-tool';
29
+ import { listGetAtlaskitHooksTool } from './tools/get-atlaskit-hooks/list-get-atlaskit-hooks-tool';
30
+ import { getAtlaskitUtilitiesTool } from './tools/get-atlaskit-utilities/get-atlaskit-utilities-tool';
31
+ import { listGetAtlaskitUtilitiesTool } from './tools/get-atlaskit-utilities/list-get-atlaskit-utilities-tool';
28
32
  import { getGuidelinesInputSchema } from './tools/get-guidelines/get-guidelines-input-schema';
29
33
  import { getGuidelinesTool } from './tools/get-guidelines/get-guidelines-tool';
30
34
  import { listGetGuidelinesTool } from './tools/get-guidelines/list-get-guidelines-tool';
@@ -43,6 +47,12 @@ import { planTool } from './tools/plan/plan-tool';
43
47
  import { listSearchAtlaskitComponentsTool } from './tools/search-atlaskit-components/list-search-atlaskit-components-tool';
44
48
  import { searchAtlaskitComponentsInputSchema } from './tools/search-atlaskit-components/search-atlaskit-components-input-schema';
45
49
  import { searchAtlaskitComponentsTool } from './tools/search-atlaskit-components/search-atlaskit-components-tool';
50
+ import { listSearchAtlaskitHooksTool } from './tools/search-atlaskit-hooks/list-search-atlaskit-hooks-tool';
51
+ import { searchAtlaskitHooksInputSchema } from './tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema';
52
+ import { searchAtlaskitHooksTool } from './tools/search-atlaskit-hooks/search-atlaskit-hooks-tool';
53
+ import { listSearchAtlaskitUtilitiesTool } from './tools/search-atlaskit-utilities/list-search-atlaskit-utilities-tool';
54
+ import { searchAtlaskitUtilitiesInputSchema } from './tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema';
55
+ import { searchAtlaskitUtilitiesTool } from './tools/search-atlaskit-utilities/search-atlaskit-utilities-tool';
46
56
  import { listSearchComponentsTool } from './tools/search-components/list-search-components-tool';
47
57
  import { searchComponentsInputSchema } from './tools/search-components/search-components-input-schema';
48
58
  import { searchComponentsTool } from './tools/search-components/search-components-tool';
@@ -132,7 +142,7 @@ export var getToolRegistry = function getToolRegistry() {
132
142
  handler: migrationGuidesTool,
133
143
  inputSchema: migrationGuidesInputSchema,
134
144
  tool: listMigrationGuidesTool
135
- }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_registry, listI18nConversionTool.name, {
145
+ }), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_registry, listI18nConversionTool.name, {
136
146
  handler: i18nConversionTool,
137
147
  inputSchema: i18nConversionInputSchema,
138
148
  tool: listI18nConversionTool
@@ -160,6 +170,22 @@ export var getToolRegistry = function getToolRegistry() {
160
170
  handler: searchAtlaskitComponentsTool,
161
171
  inputSchema: searchAtlaskitComponentsInputSchema,
162
172
  tool: listSearchAtlaskitComponentsTool
173
+ }), listGetAtlaskitUtilitiesTool.name, {
174
+ handler: getAtlaskitUtilitiesTool,
175
+ inputSchema: null,
176
+ tool: listGetAtlaskitUtilitiesTool
177
+ }), listSearchAtlaskitUtilitiesTool.name, {
178
+ handler: searchAtlaskitUtilitiesTool,
179
+ inputSchema: searchAtlaskitUtilitiesInputSchema,
180
+ tool: listSearchAtlaskitUtilitiesTool
181
+ }), listGetAtlaskitHooksTool.name, {
182
+ handler: getAtlaskitHooksTool,
183
+ inputSchema: null,
184
+ tool: listGetAtlaskitHooksTool
185
+ }), _defineProperty(_registry, listSearchAtlaskitHooksTool.name, {
186
+ handler: searchAtlaskitHooksTool,
187
+ inputSchema: searchAtlaskitHooksInputSchema,
188
+ tool: listSearchAtlaskitHooksTool
163
189
  }));
164
190
  return registry;
165
191
  };