@atlaskit/ads-mcp 1.12.16 → 1.13.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 (61) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cjs/helpers/search-terms-schema.js +11 -0
  3. package/dist/cjs/helpers/validation.js +1 -1
  4. package/dist/cjs/tools/get-all-components/components.codegen.js +2 -2
  5. package/dist/cjs/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
  6. package/dist/cjs/tools/get-guidelines/get-guidelines-input-schema.js +2 -1
  7. package/dist/cjs/tools/get-lint-rules/get-lint-rules-input-schema.js +2 -1
  8. package/dist/cjs/tools/plan/list-plan-tool.js +1 -1
  9. package/dist/cjs/tools/plan/plan-input-schema.js +5 -4
  10. package/dist/cjs/tools/plan/plan-tool.js +27 -13
  11. package/dist/cjs/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +2 -1
  12. package/dist/cjs/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +2 -1
  13. package/dist/cjs/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +2 -1
  14. package/dist/cjs/tools/search-components/search-components-input-schema.js +2 -1
  15. package/dist/cjs/tools/search-icons/search-icons-input-schema.js +2 -1
  16. package/dist/cjs/tools/search-tokens/search-tokens-input-schema.js +2 -1
  17. package/dist/es2019/helpers/search-terms-schema.js +3 -0
  18. package/dist/es2019/helpers/validation.js +1 -1
  19. package/dist/es2019/tools/get-all-components/components.codegen.js +2 -2
  20. package/dist/es2019/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
  21. package/dist/es2019/tools/get-guidelines/get-guidelines-input-schema.js +2 -1
  22. package/dist/es2019/tools/get-lint-rules/get-lint-rules-input-schema.js +2 -1
  23. package/dist/es2019/tools/plan/list-plan-tool.js +1 -1
  24. package/dist/es2019/tools/plan/plan-input-schema.js +5 -4
  25. package/dist/es2019/tools/plan/plan-tool.js +21 -13
  26. package/dist/es2019/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +2 -1
  27. package/dist/es2019/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +2 -1
  28. package/dist/es2019/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +2 -1
  29. package/dist/es2019/tools/search-components/search-components-input-schema.js +2 -1
  30. package/dist/es2019/tools/search-icons/search-icons-input-schema.js +2 -1
  31. package/dist/es2019/tools/search-tokens/search-tokens-input-schema.js +2 -1
  32. package/dist/esm/helpers/search-terms-schema.js +5 -0
  33. package/dist/esm/helpers/validation.js +1 -1
  34. package/dist/esm/tools/get-all-components/components.codegen.js +2 -2
  35. package/dist/esm/tools/get-atlaskit-components/atlaskit-components.codegen.js +2 -2
  36. package/dist/esm/tools/get-guidelines/get-guidelines-input-schema.js +2 -1
  37. package/dist/esm/tools/get-lint-rules/get-lint-rules-input-schema.js +2 -1
  38. package/dist/esm/tools/plan/list-plan-tool.js +1 -1
  39. package/dist/esm/tools/plan/plan-input-schema.js +5 -4
  40. package/dist/esm/tools/plan/plan-tool.js +27 -13
  41. package/dist/esm/tools/search-atlaskit-components/search-atlaskit-components-input-schema.js +2 -1
  42. package/dist/esm/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.js +2 -1
  43. package/dist/esm/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.js +2 -1
  44. package/dist/esm/tools/search-components/search-components-input-schema.js +2 -1
  45. package/dist/esm/tools/search-icons/search-icons-input-schema.js +2 -1
  46. package/dist/esm/tools/search-tokens/search-tokens-input-schema.js +2 -1
  47. package/dist/types/helpers/search-terms-schema.d.ts +5 -0
  48. package/dist/types/helpers/validation.d.ts +2 -2
  49. package/dist/types/tools/get-all-components/components.codegen.d.ts +1 -1
  50. package/dist/types/tools/get-atlaskit-components/atlaskit-components.codegen.d.ts +1 -1
  51. package/dist/types/tools/get-guidelines/get-guidelines-input-schema.d.ts +2 -1
  52. package/dist/types/tools/get-lint-rules/get-lint-rules-input-schema.d.ts +2 -1
  53. package/dist/types/tools/plan/plan-input-schema.d.ts +10 -18
  54. package/dist/types/tools/plan/plan-tool.d.ts +2 -2
  55. package/dist/types/tools/search-atlaskit-components/search-atlaskit-components-input-schema.d.ts +3 -2
  56. package/dist/types/tools/search-atlaskit-hooks/search-atlaskit-hooks-input-schema.d.ts +3 -2
  57. package/dist/types/tools/search-atlaskit-utilities/search-atlaskit-utilities-input-schema.d.ts +3 -2
  58. package/dist/types/tools/search-components/search-components-input-schema.d.ts +3 -2
  59. package/dist/types/tools/search-icons/search-icons-input-schema.d.ts +3 -2
  60. package/dist/types/tools/search-tokens/search-tokens-input-schema.d.ts +3 -2
  61. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export var getGuidelinesInputSchema = z.object({
3
- terms: z.array(z.string()).default([]).describe('Search terms matched against guideline keywords and body (fuzzy). Examples: `["empty state", "voice tone"]`, `["color tokens", "spacing"]`, `["elevation", "grid"]`. Omit or use an empty array to return **all** guidelines as Markdown.').optional(),
4
+ terms: searchTermsSchema.default([]).describe('Search terms matched against guideline keywords and body (fuzzy). Examples: `["empty state", "voice tone"]`, `["color tokens", "spacing"]`, `["elevation", "grid"]`. Omit or use an empty array to return **all** guidelines as Markdown.').optional(),
4
5
  limit: z.number().default(1).describe('Max matches **per term** when `terms` is non-empty (default 1). Ignored when returning all guidelines.').optional()
5
6
  });
@@ -1,8 +1,9 @@
1
1
  /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
2
 
3
3
  import { z } from 'zod';
4
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
4
5
  export var getLintRulesInputSchema = z.object({
5
- terms: z.array(z.string()).default([]).describe('Search terms matched against rule name, description, and docs body (fuzzy unless \`exactName\` is true). Example: `["icon-label", "xcss", "design token"]`. Omit or empty: return **all** rules as JSON.').optional(),
6
+ terms: searchTermsSchema.default([]).describe('Search terms matched against rule name, description, and docs body (fuzzy unless \`exactName\` is true). Example: `["icon-label", "xcss", "design token"]`. Omit or empty: return **all** rules as JSON.').optional(),
6
7
  limit: z.number().default(1).describe('Max matches **per term** when searching (default 1). Not used when returning all rules.').optional(),
7
8
  exactName: z.boolean().default(false).describe('If true, resolve each term by **exact** ESLint rule name (case-insensitive). If false, fuzzy search across name, description, and content.').optional()
8
9
  });
@@ -4,7 +4,7 @@ import { zodToJsonSchema } from '../../helpers/zod-to-json-schema';
4
4
  import { planInputSchema } from './plan-input-schema';
5
5
  export var listPlanTool = {
6
6
  name: 'ads_plan',
7
- description: "Runs **ads_search_tokens**, **ads_search_icons**, **ads_search_components**, and optionally **atlaskit_search_components** in one call and returns a single JSON payload (each section only if that list was non-empty). Use this as the default way to discover ADS **tokens**, **icons**, and **components** for a UI task. Component results preserve optional `designSource.figmaUrl`; for Figma work, follow the canonical-source and property-verification guidance in `ads_search_components`.\n\nWHEN TO USE:\n**Implementing or iterating on a UI**\u2014new screen, feature, or polish\u2014and you need candidate **token** names, **icon** imports, and **ADS component** packages/props in one pass. Also use when exploring ADS building blocks before you write code.\n\nADS-FIRST ROUTING:\nUse `components` for canonical ADS components. Use `atlaskitComponents` only as explicit fallback research for public `@atlaskit/*` packages outside the ADS catalog, or after ADS component search has no useful match. This tool does not auto-populate `atlaskitComponents` from `components`.\n\nAt least one of `tokens`, `icons`, `components`, or `atlaskitComponents` must contain search terms (use `[]` for lists you do not need).\n\nPrefer supplying **multiple** terms per non-empty array when you know them\u2014broader queries improve recall. Some queries return no rows where metadata is thin; try alternate wording.\n\nThis is equivalent to calling the individual search tools; there are no extra merge semantics beyond concatenating results.\n\nExample request:\n```json\n{\n\t\"tokens\": [\"spacing\", \"inverted text\", \"background primary\", \"animation\"],\n\t\"icons\": [\"search\", \"folder\", \"user\"],\n\t\"components\": [\"button\", \"input\", \"select\", \"heading\"],\n\t\"atlaskitComponents\": [\"editor-core\", \"onboarding\", \"page-layout\"]\n}\n```\n\nExample token usage:\n```tsx\nimport { token } from '@atlaskit/tokens';\nconst styles = css({ color: token('color.text'), padding: token('space.100') });\n```\n\nExample icon usage:\n```tsx\nimport AddIcon from '@atlaskit/icon/core/add';\n<AddIcon label=\"Add work item\" size=\"small\" />\n```",
7
+ description: "Runs **ads_search_tokens**, **ads_search_icons**, **ads_search_components**, and optionally **atlaskit_search_components** in one call and returns a single JSON payload (each section only if that list was non-empty). Use this as the default way to discover ADS **tokens**, **icons**, and **components** for a UI task. Component results preserve optional `designSource.figmaUrl`; for Figma work, follow the canonical-source and property-verification guidance in `ads_search_components`.\n\nWHEN TO USE:\n**Implementing or iterating on a UI**\u2014new screen, feature, or polish\u2014and you need candidate **token** names, **icon** imports, and **ADS component** packages/props in one pass. Also use when exploring ADS building blocks before you write code.\n\nADS-FIRST ROUTING:\nUse `components` for canonical ADS components. Use `atlaskitComponents` only as explicit fallback research for public `@atlaskit/*` packages outside the ADS catalog, or after ADS component search has no useful match. This tool does not auto-populate `atlaskitComponents` from `components`.\n\nEach of `tokens`, `icons`, `components`, and `atlaskitComponents` accepts a search term or an array of terms. A string is treated as one search term, equivalent to a one-item array. Omit unused fields or use `[]`; omitted fields default to empty arrays. At least one field must contain a nonblank search term. Categories containing only blank terms are skipped.\n\nPrefer supplying **multiple** terms per non-empty array when you know them\u2014broader queries improve recall. Some queries return no rows where metadata is thin; try alternate wording.\n\nThis is equivalent to calling the individual search tools; there are no extra merge semantics beyond concatenating results.\n\nExample request:\n```json\n{\n\t\"tokens\": [\"spacing\", \"inverted text\", \"background primary\", \"animation\"],\n\t\"icons\": [\"search\", \"folder\", \"user\"],\n\t\"components\": [\"button\", \"input\", \"select\", \"heading\"],\n\t\"atlaskitComponents\": [\"editor-core\", \"onboarding\", \"page-layout\"]\n}\n```\n\nExample token usage:\n```tsx\nimport { token } from '@atlaskit/tokens';\nconst styles = css({ color: token('color.text'), padding: token('space.100') });\n```\n\nExample icon usage:\n```tsx\nimport AddIcon from '@atlaskit/icon/core/add';\n<AddIcon label=\"Add work item\" size=\"small\" />\n```",
8
8
  annotations: {
9
9
  title: 'Search ADS tokens, icons, and components to plan what to build',
10
10
  readOnlyHint: true,
@@ -1,10 +1,11 @@
1
1
  /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
2
 
3
3
  import { z } from 'zod';
4
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
4
5
  export var planInputSchema = z.object({
5
- tokens: z.array(z.string()).describe('Search terms for ADS design tokens (fuzzy by default). Use `[]` if you only need icons or components. Prefer **at least two** terms per non-empty list when you know what you need.'),
6
- icons: z.array(z.string()).describe('Search terms for ADS icons. Use `[]` if you only need tokens or components. Prefer **at least two** terms per non-empty list when known.'),
7
- components: z.array(z.string()).describe('Search terms for canonical ADS components. Use `[]` if you only need tokens, icons, or explicit Atlaskit fallback research. Prefer **at least two** terms per non-empty list when known.'),
8
- atlaskitComponents: z.array(z.string()).describe('Search terms for public `@atlaskit/*` components outside the ADS catalog. Use only as explicit fallback research when ADS component search is not enough; this is not auto-populated from `components`. Use `[]` if you only need canonical ADS components. Prefer **at least two** terms per non-empty list when known.'),
6
+ tokens: searchTermsSchema.default([]).describe('A search term or array of terms for ADS design tokens (fuzzy by default). Omit or use `[]` if you only need icons or components. Prefer **at least two** terms per non-empty list when you know what you need.'),
7
+ icons: searchTermsSchema.default([]).describe('A search term or array of terms for ADS icons. Omit or use `[]` if you only need tokens or components. Prefer **at least two** terms per non-empty list when known.'),
8
+ components: searchTermsSchema.default([]).describe('A search term or array of terms for canonical ADS components. Omit or use `[]` if you only need tokens, icons, or explicit Atlaskit fallback research. Prefer **at least two** terms per non-empty list when known.'),
9
+ atlaskitComponents: searchTermsSchema.default([]).describe('A search term or array of terms for public `@atlaskit/*` components outside the ADS catalog. Use only as explicit fallback research when ADS component search is not enough; this is not auto-populated from `components`. Omit or use `[]` if you only need canonical ADS components. Prefer **at least two** terms per non-empty list when known.'),
9
10
  limit: z.number().default(2).describe('Max matches **per term** for each non-empty list (default 2). Same limit applies to tokens, icons, ADS components, and explicit Atlaskit component fallback searches.').optional()
10
11
  });
@@ -5,21 +5,35 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
6
  /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
7
7
 
8
+ import { validateToolArguments } from '../../helpers/validation';
8
9
  import { searchAtlaskitComponentsTool } from '../search-atlaskit-components/search-atlaskit-components-tool';
9
10
  import { searchComponentsTool } from '../search-components/search-components-tool';
10
11
  import { searchIconsTool } from '../search-icons/search-icons-tool';
11
12
  import { searchTokensTool } from '../search-tokens/search-tokens-tool';
13
+ import { planInputSchema } from './plan-input-schema';
14
+ var hasSearchTerms = function hasSearchTerms(terms) {
15
+ return terms.some(function (term) {
16
+ return term.trim().length > 0;
17
+ });
18
+ };
12
19
  export var planTool = /*#__PURE__*/function () {
13
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref) {
14
- var tokens_search, icons_search, components_search, atlaskit_components_search, limit, results, searchPromises, getResultCount, consolidatedResult;
20
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(args) {
21
+ var validation, _validation$data, tokens_search, icons_search, components_search, atlaskit_components_search, limit, results, searchPromises, getResultCount, consolidatedResult;
15
22
  return _regeneratorRuntime.wrap(function (_context) {
16
23
  while (1) switch (_context.prev = _context.next) {
17
24
  case 0:
18
- tokens_search = _ref.tokens, icons_search = _ref.icons, components_search = _ref.components, atlaskit_components_search = _ref.atlaskitComponents, limit = _ref.limit;
19
- if (!(!(tokens_search !== null && tokens_search !== void 0 && tokens_search.length) && !(icons_search !== null && icons_search !== void 0 && icons_search.length) && !(components_search !== null && components_search !== void 0 && components_search.length) && !(atlaskit_components_search !== null && atlaskit_components_search !== void 0 && atlaskit_components_search.length))) {
25
+ validation = validateToolArguments(planInputSchema, args);
26
+ if (validation.success) {
20
27
  _context.next = 1;
21
28
  break;
22
29
  }
30
+ return _context.abrupt("return", validation.error);
31
+ case 1:
32
+ _validation$data = validation.data, tokens_search = _validation$data.tokens, icons_search = _validation$data.icons, components_search = _validation$data.components, atlaskit_components_search = _validation$data.atlaskitComponents, limit = _validation$data.limit; // Require at least one category with a nonblank search term.
33
+ if (!(!hasSearchTerms(tokens_search) && !hasSearchTerms(icons_search) && !hasSearchTerms(components_search) && !hasSearchTerms(atlaskit_components_search))) {
34
+ _context.next = 2;
35
+ break;
36
+ }
23
37
  return _context.abrupt("return", {
24
38
  isError: true,
25
39
  content: [{
@@ -27,10 +41,10 @@ export var planTool = /*#__PURE__*/function () {
27
41
  text: 'Error: At least one search type (tokens, icons, components, or atlaskitComponents) must be provided with search terms'
28
42
  }]
29
43
  });
30
- case 1:
44
+ case 2:
31
45
  results = {}; // Execute searches in parallel
32
46
  searchPromises = [];
33
- if (tokens_search !== null && tokens_search !== void 0 && tokens_search.length) {
47
+ if (hasSearchTerms(tokens_search)) {
34
48
  searchPromises.push(searchTokensTool({
35
49
  terms: tokens_search,
36
50
  limit: limit
@@ -38,7 +52,7 @@ export var planTool = /*#__PURE__*/function () {
38
52
  results.tokens = result;
39
53
  }));
40
54
  }
41
- if (icons_search !== null && icons_search !== void 0 && icons_search.length) {
55
+ if (hasSearchTerms(icons_search)) {
42
56
  searchPromises.push(searchIconsTool({
43
57
  terms: icons_search,
44
58
  limit: limit
@@ -46,7 +60,7 @@ export var planTool = /*#__PURE__*/function () {
46
60
  results.icons = result;
47
61
  }));
48
62
  }
49
- if (components_search !== null && components_search !== void 0 && components_search.length) {
63
+ if (hasSearchTerms(components_search)) {
50
64
  searchPromises.push(searchComponentsTool({
51
65
  terms: components_search,
52
66
  limit: limit
@@ -54,7 +68,7 @@ export var planTool = /*#__PURE__*/function () {
54
68
  results.components = result;
55
69
  }));
56
70
  }
57
- if (atlaskit_components_search !== null && atlaskit_components_search !== void 0 && atlaskit_components_search.length) {
71
+ if (hasSearchTerms(atlaskit_components_search)) {
58
72
  searchPromises.push(searchAtlaskitComponentsTool({
59
73
  terms: atlaskit_components_search,
60
74
  limit: limit
@@ -64,9 +78,9 @@ export var planTool = /*#__PURE__*/function () {
64
78
  }
65
79
 
66
80
  // Wait for all searches to complete
67
- _context.next = 2;
81
+ _context.next = 3;
68
82
  return Promise.all(searchPromises);
69
- case 2:
83
+ case 3:
70
84
  // Helper function to safely count results
71
85
  getResultCount = function getResultCount(result) {
72
86
  var _result$content;
@@ -107,13 +121,13 @@ export var planTool = /*#__PURE__*/function () {
107
121
  text: JSON.stringify(consolidatedResult, null, 2)
108
122
  }]
109
123
  });
110
- case 3:
124
+ case 4:
111
125
  case "end":
112
126
  return _context.stop();
113
127
  }
114
128
  }, _callee);
115
129
  }));
116
130
  return function planTool(_x) {
117
- return _ref2.apply(this, arguments);
131
+ return _ref.apply(this, arguments);
118
132
  };
119
133
  }();
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export var searchAtlaskitComponentsInputSchema = z.object({
3
- terms: z.array(z.string()).describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, examples). Example: `["button", "modal", "select"]`.'),
4
+ terms: searchTermsSchema.describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, examples). Example: `["button", "modal", "select"]`.'),
4
5
  limit: z.number().default(2).describe('Max matches **per term** (default 2).').optional()
5
6
  });
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export var searchAtlaskitHooksInputSchema = z.object({
3
- terms: z.array(z.string()).describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, usageGuidelines). Example: `["analytics", "storage", "layering"]`.'),
4
+ terms: searchTermsSchema.describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, usageGuidelines). Example: `["analytics", "storage", "layering"]`.'),
4
5
  limit: z.number().default(2).describe('Max matches **per term** (default 2).').optional()
5
6
  });
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export var 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
+ terms: searchTermsSchema.describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, usageGuidelines). Example: `["debounce", "a11y", "storage"]`.'),
4
5
  limit: z.number().default(2).describe('Max matches **per term** (default 2).').optional()
5
6
  });
@@ -1,7 +1,8 @@
1
1
  /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
2
 
3
3
  import { z } from 'zod';
4
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
4
5
  export var searchComponentsInputSchema = z.object({
5
- terms: z.array(z.string()).describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, examples). Example: `["button", "modal", "select"]`.'),
6
+ terms: searchTermsSchema.describe('Required: one or more search terms (fuzzy over name, package, category, description, keywords, examples). Example: `["button", "modal", "select"]`.'),
6
7
  limit: z.number().default(2).describe('Max matches **per term** (default 2).').optional()
7
8
  });
@@ -1,7 +1,8 @@
1
1
  /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
2
 
3
3
  import { z } from 'zod';
4
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
4
5
  export var searchIconsInputSchema = z.object({
5
- terms: z.array(z.string()).describe('Required: one or more terms; fuzzy match on icon **componentName**, **iconName**, **keywords**, **categorization**, **type**, and **usage**. Example: `["search", "folder", "user"]`.'),
6
+ terms: searchTermsSchema.describe('Required: one or more terms; fuzzy match on icon **componentName**, **iconName**, **keywords**, **categorization**, **type**, and **usage**. Example: `["search", "folder", "user"]`.'),
6
7
  limit: z.number().default(2).describe('Max matches **per term** (default 2).').optional()
7
8
  });
@@ -1,8 +1,9 @@
1
1
  /* eslint-disable-next-line import/extensions -- MCP SDK requires .js extensions for ESM imports */
2
2
 
3
3
  import { z } from 'zod';
4
+ import { searchTermsSchema } from '../../helpers/search-terms-schema';
4
5
  export var searchTokensInputSchema = z.object({
5
- terms: z.array(z.string()).describe('Required: one or more terms; fuzzy match on token **name**, **description**, **exampleValue**, **usageGuidelines.usage**, and **usageGuidelines.cssProperties**. Example: `["spacing", "color.text", "background"]`.'),
6
+ terms: searchTermsSchema.describe('Required: one or more terms; fuzzy match on token **name**, **description**, **exampleValue**, **usageGuidelines.usage**, and **usageGuidelines.cssProperties**. Example: `["spacing", "color.text", "background"]`.'),
6
7
  limit: z.number().default(2).describe('Max matches **per term** (default 2).').optional(),
7
8
  includeMetadata: z.boolean().default(false).describe('Include the token description and usage guidelines in each result (default false).').optional()
8
9
  });
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ type SearchTermsInputSchema = z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, 'many'>]>;
3
+ export type SearchTermsSchema = z.ZodEffects<SearchTermsInputSchema, string[], string | string[]>;
4
+ export declare const searchTermsSchema: SearchTermsSchema;
5
+ export {};
@@ -21,6 +21,6 @@ export type ValidationResult<T> = {
21
21
  *
22
22
  * @param schema - The Zod schema to validate against
23
23
  * @param args - The arguments to validate
24
- * @returns { success: true; data: T } if validation succeeds, { success: false; error: ValidationErrorResult } if validation fails
24
+ * @returns { success: true; data: Output } if validation succeeds, { success: false; error: ValidationErrorResult } if validation fails
25
25
  */
26
- export declare function validateToolArguments<T>(schema: z.ZodSchema<T>, args: unknown): ValidationResult<T>;
26
+ export declare function validateToolArguments<Output, Input>(schema: z.ZodType<Output, z.ZodTypeDef, Input>, args: unknown): ValidationResult<Output>;
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Structured content components from design-system *.docs.tsx files
5
5
  *
6
- * @codegen <<SignedSource::e20728ba78f65b45d326fe94f88cecf2>>
6
+ * @codegen <<SignedSource::174685ee28cdfe6acf7017c610e6eef6>>
7
7
  * @codegenCommand afm workspace @af/ads-ai-tooling codegen
8
8
  */
9
9
  import type { ComponentMcpPayload } from './types';
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Structured content components from *.docs.tsx files outside of design-system
5
5
  *
6
- * @codegen <<SignedSource::8b4db5aa7bfffb68304498e55d7b521b>>
6
+ * @codegen <<SignedSource::b874dd1321b4a7fb8ee0c830865cfeaf>>
7
7
  * @codegenCommand afm workspace @af/ads-ai-tooling codegen
8
8
  */
9
9
  import type { ComponentMcpPayload } from '../get-all-components/types';
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const getGuidelinesInputSchema: z.ZodObject<{
3
- terms: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, 'many'>>>;
4
+ terms: z.ZodOptional<z.ZodDefault<SearchTermsSchema>>;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  }>;
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const getLintRulesInputSchema: z.ZodObject<{
3
- terms: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, 'many'>>>;
4
+ terms: z.ZodOptional<z.ZodDefault<SearchTermsSchema>>;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  exactName: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
6
7
  }>;
@@ -1,20 +1,12 @@
1
1
  import { z } from 'zod';
2
- export declare const planInputSchema: z.ZodObject<{
3
- tokens: z.ZodArray<z.ZodString, 'many'>;
4
- icons: z.ZodArray<z.ZodString, 'many'>;
5
- components: z.ZodArray<z.ZodString, 'many'>;
6
- atlaskitComponents: z.ZodArray<z.ZodString, 'many'>;
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
3
+ type SearchTerms = z.ZodDefault<SearchTermsSchema>;
4
+ type PlanInputShape = {
5
+ tokens: SearchTerms;
6
+ icons: SearchTerms;
7
+ components: SearchTerms;
8
+ atlaskitComponents: SearchTerms;
7
9
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
8
- }, 'strip', z.ZodTypeAny, {
9
- tokens: string[];
10
- icons: string[];
11
- components: string[];
12
- atlaskitComponents: string[];
13
- limit?: number | undefined;
14
- }, {
15
- tokens: string[];
16
- icons: string[];
17
- components: string[];
18
- atlaskitComponents: string[];
19
- limit?: number | undefined;
20
- }>;
10
+ };
11
+ export declare const planInputSchema: z.ZodObject<PlanInputShape>;
12
+ export {};
@@ -1,6 +1,6 @@
1
1
  import type { z } from 'zod';
2
- import type { planInputSchema } from './plan-input-schema';
3
- export declare const planTool: ({ tokens: tokens_search, icons: icons_search, components: components_search, atlaskitComponents: atlaskit_components_search, limit, }: z.infer<typeof planInputSchema>) => Promise<{
2
+ import { planInputSchema } from './plan-input-schema';
3
+ export declare const planTool: (args: z.input<typeof planInputSchema>) => Promise<{
4
4
  isError: boolean;
5
5
  content: {
6
6
  type: string;
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const searchAtlaskitComponentsInputSchema: z.ZodObject<{
3
- terms: z.ZodArray<z.ZodString, 'many'>;
4
+ terms: SearchTermsSchema;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  }, 'strip', z.ZodTypeAny, {
6
7
  terms: string[];
7
8
  limit?: number | undefined;
8
9
  }, {
9
- terms: string[];
10
+ terms: string | string[];
10
11
  limit?: number | undefined;
11
12
  }>;
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const searchAtlaskitHooksInputSchema: z.ZodObject<{
3
- terms: z.ZodArray<z.ZodString, 'many'>;
4
+ terms: SearchTermsSchema;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  }, 'strip', z.ZodTypeAny, {
6
7
  terms: string[];
7
8
  limit?: number | undefined;
8
9
  }, {
9
- terms: string[];
10
+ terms: string | string[];
10
11
  limit?: number | undefined;
11
12
  }>;
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const searchAtlaskitUtilitiesInputSchema: z.ZodObject<{
3
- terms: z.ZodArray<z.ZodString, 'many'>;
4
+ terms: SearchTermsSchema;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  }, 'strip', z.ZodTypeAny, {
6
7
  terms: string[];
7
8
  limit?: number | undefined;
8
9
  }, {
9
- terms: string[];
10
+ terms: string | string[];
10
11
  limit?: number | undefined;
11
12
  }>;
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const searchComponentsInputSchema: z.ZodObject<{
3
- terms: z.ZodArray<z.ZodString, 'many'>;
4
+ terms: SearchTermsSchema;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  }, 'strip', z.ZodTypeAny, {
6
7
  terms: string[];
7
8
  limit?: number | undefined;
8
9
  }, {
9
- terms: string[];
10
+ terms: string | string[];
10
11
  limit?: number | undefined;
11
12
  }>;
@@ -1,11 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const searchIconsInputSchema: z.ZodObject<{
3
- terms: z.ZodArray<z.ZodString, 'many'>;
4
+ terms: SearchTermsSchema;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  }, 'strip', z.ZodTypeAny, {
6
7
  terms: string[];
7
8
  limit?: number | undefined;
8
9
  }, {
9
- terms: string[];
10
+ terms: string | string[];
10
11
  limit?: number | undefined;
11
12
  }>;
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
+ import { type SearchTermsSchema } from '../../helpers/search-terms-schema';
2
3
  export declare const searchTokensInputSchema: z.ZodObject<{
3
- terms: z.ZodArray<z.ZodString, 'many'>;
4
+ terms: SearchTermsSchema;
4
5
  limit: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
5
6
  includeMetadata: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
6
7
  }, 'strip', z.ZodTypeAny, {
@@ -8,7 +9,7 @@ export declare const searchTokensInputSchema: z.ZodObject<{
8
9
  limit?: number | undefined;
9
10
  includeMetadata?: boolean | undefined;
10
11
  }, {
11
- terms: string[];
12
+ terms: string | string[];
12
13
  limit?: number | undefined;
13
14
  includeMetadata?: boolean | undefined;
14
15
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/ads-mcp",
3
- "version": "1.12.16",
3
+ "version": "1.13.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",
@@ -42,6 +42,6 @@
42
42
  "@atlassiansox/analytics-node-client": "^4.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@atlassian/feature-flags-test-utils": "^1.3.0"
45
+ "@atlassian/feature-flags-test-utils": "^2.0.0"
46
46
  }
47
47
  }