@adobe/design-data-agent-mcp 1.12.0 → 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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `@adobe/design-data-agent-mcp`
2
2
 
3
- MCP server and Claude Code skill for the [Spectrum Design Data](../../packages/design-data/) agent surface. Read tools (`primer`, `resolve_token`, `query_tokens`, `describe_component`, `describe_guideline`, `list_guidelines`) run fully in-process via `@adobe/design-data-wasm` — no CLI binary required for those. Only `authoring_session_step_intent` still invokes the native binary (for NLP suggest ranking, not yet on the wasm surface).
3
+ MCP server and Claude Code skill for the [Spectrum Design Data](../../packages/design-data/) agent surface. Read tools (`primer`, `resolve_token`, `query_tokens`, `suggest_token`, `describe_component`, `describe_guideline`, `list_guidelines`) run fully in-process via `@adobe/design-data-wasm` — no CLI binary required for those. `suggest_token` uses the wasm `suggest` API directly; `authoring_session_step_intent` still invokes the native binary for session-state-aware ranking within an authoring flow.
4
4
 
5
5
  ## Install
6
6
 
@@ -152,6 +152,7 @@ node tools/design-data-agent-mcp/src/index.js
152
152
  | `primer` | Load full token taxonomy, component list, and field definitions |
153
153
  | `resolve_token` | Resolve a token property to its literal value |
154
154
  | `query_tokens` | Filter tokens by expression |
155
+ | `suggest_token` | Suggest tokens matching a natural-language intent |
155
156
  | `describe_component` | Fetch component schema and token bindings |
156
157
  | `describe_guideline` | Fetch guideline documentBlocks content and metadata |
157
158
  | `list_guidelines` | List guideline slugs and metadata, optionally by category |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/design-data-agent-mcp",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "MCP server and Claude Code skill for the design-data agent surface — read tools run in-process via wasm",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
@@ -6,12 +6,12 @@ description: >
6
6
  system, token lookup, spec-conformance, drift detection, or token authoring on custom data.
7
7
  metadata:
8
8
  author: adobe
9
- version: "1.12.0"
9
+ version: "1.13.0"
10
10
  when_to_use: >
11
11
  Trigger on: design system, design tokens, spec-conformant, drift, validate tokens, token
12
12
  authoring, custom dataset, DESIGN_DATA_PATH, design-data validate, design-data diff,
13
13
  design-data write, product-context.json.
14
- allowed-tools: mcp__design-data-agent__primer, mcp__design-data-agent__query_tokens, mcp__design-data-agent__resolve_token, mcp__design-data-agent__describe_component, mcp__design-data-agent__validate_usage, mcp__design-data-agent__diff_datasets, mcp__design-data-agent__write, mcp__design-data-agent__start_authoring_session, mcp__design-data-agent__authoring_session_step_intent, mcp__design-data-agent__authoring_session_step_classification, mcp__design-data-agent__authoring_session_step_values, mcp__design-data-agent__authoring_session_commit, mcp__design-data-agent__authoring_session_cancel, mcp__design-data-agent__authoring_session_get, mcp__design-data-agent__authoring_session_list
14
+ allowed-tools: mcp__design-data-agent__primer, mcp__design-data-agent__query_tokens, mcp__design-data-agent__suggest_token, mcp__design-data-agent__resolve_token, mcp__design-data-agent__describe_component, mcp__design-data-agent__validate_usage, mcp__design-data-agent__diff_datasets, mcp__design-data-agent__write, mcp__design-data-agent__start_authoring_session, mcp__design-data-agent__authoring_session_step_intent, mcp__design-data-agent__authoring_session_step_classification, mcp__design-data-agent__authoring_session_step_values, mcp__design-data-agent__authoring_session_commit, mcp__design-data-agent__authoring_session_cancel, mcp__design-data-agent__authoring_session_get, mcp__design-data-agent__authoring_session_list
15
15
  ---
16
16
 
17
17
  # design-data agent skill
@@ -102,6 +102,15 @@ $schema=https://spectrum.adobe.com/page/design-token/
102
102
 
103
103
  > **Exit codes:** `0` = matches found; empty array = no matches (not an error).
104
104
 
105
+ ### Suggest a token from a description — `suggest_token`
106
+
107
+ Required: `intent` (string) — a natural-language description of the design need,
108
+ such as `"primary CTA button background color"`.
109
+
110
+ Optional: `limit` (number, default `5`) — the maximum number of suggestions to return.
111
+ Results are ranked by confidence using token names, name-object fields, and description
112
+ text. Use this when the user describes what they need rather than knowing a token name.
113
+
105
114
  ***
106
115
 
107
116
  ## Component info — `describe_component`
@@ -163,8 +172,9 @@ Helper tools: `authoring_session_get` (inspect state), `authoring_session_list`
163
172
  `authoring_session_commit` accepts an optional `schema_path` to override the schemas directory
164
173
  for Layer-1 JSON-Schema validation before writing.
165
174
 
166
- > **Note:** `authoring_session_step_intent` (NLP suggestion ranking) still delegates to the
167
- > `design-data` CLI because the NLP `suggest` API is not yet on the wasm surface.
175
+ > **Note:** The standalone `suggest_token` tool calls the wasm `suggest` API directly.
176
+ > `authoring_session_step_intent` still delegates to the `design-data` CLI for
177
+ > session-state-aware ranking within an authoring flow.
168
178
 
169
179
  ***
170
180
 
package/src/tools/read.js CHANGED
@@ -20,8 +20,9 @@
20
20
  * @adobe/design-data-mcp package's `design-data-guideline` tool via the
21
21
  * `@adobe/design-data/guideline` module, rather than duplicated here.
22
22
  *
23
- * Note: authoring_session_step_intent in authoring.js still uses the CLI because
24
- * the NLP suggest ranking is not yet on the wasm surface.
23
+ * suggest_token uses the wasm suggest surface directly. The separate
24
+ * authoring_session_step_intent flow still uses the CLI for session-state-aware
25
+ * ranking within an authoring session.
25
26
  *
26
27
  * Cascade scope (see cascade-bootstrap.js / spectrum-design-data-h890.14): once a
27
28
  * `.design-data.toml` cascade is resolved, primer/resolve_token/query_tokens/
@@ -286,6 +287,36 @@ export function createReadTools() {
286
287
  },
287
288
  },
288
289
 
290
+ {
291
+ name: "suggest_token",
292
+ description:
293
+ "Suggest Spectrum tokens matching a natural-language intent using Jaccard similarity " +
294
+ "scoring over token name segments, name-object fields, and description text. " +
295
+ "Returns matches ranked by confidence with token name, layer, value, and name object. " +
296
+ "Use when the user describes what they need rather than knowing the token name.",
297
+ inputSchema: {
298
+ type: "object",
299
+ required: ["intent"],
300
+ properties: {
301
+ intent: {
302
+ type: "string",
303
+ description:
304
+ 'Natural-language description of the design need, e.g. "primary CTA button background color"',
305
+ },
306
+ limit: {
307
+ type: "number",
308
+ description: "Maximum number of suggestions to return (default: 5)",
309
+ default: 5,
310
+ },
311
+ },
312
+ additionalProperties: false,
313
+ },
314
+ async handler({ intent, limit = 5 }) {
315
+ const ds = await getDataset();
316
+ return ds.suggest(intent, undefined, limit);
317
+ },
318
+ },
319
+
289
320
  {
290
321
  name: "describe_component",
291
322
  description: