From 4bd795335b1ee6df534e39ab7b8f35dddbce8106 Mon Sep 17 00:00:00 2001 From: Dakota Younger Date: Thu, 4 Jun 2026 08:17:18 -0700 Subject: [PATCH] feat(style_tool): allow update_style by style_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add optional style_id to update_style; make style_name optional when style_id is set. Require at least one via zod refine so agents can target base utilities without combo name resolution. Evidence: goboon site 67357e5b3470f7b3ed6b8017 — name-based update hits isComboClass: true shells for base utility IDs from query_styles. Co-authored-by: Cursor --- src/tools/deStyle.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/tools/deStyle.ts b/src/tools/deStyle.ts index d76aa02..ff09abe 100644 --- a/src/tools/deStyle.ts +++ b/src/tools/deStyle.ts @@ -86,8 +86,15 @@ export function registerDEStyleTools(server: McpServer, rpc: RPCType) { .describe("Get all styles"), update_style: z .object({ + style_id: z + .string() + .optional() + .describe( + "Exact style ID. When set, bypasses name/combo resolution.", + ), style_name: z .string() + .optional() .describe("The name of the style to update"), breakpoint_id: z .enum([ @@ -153,6 +160,15 @@ export function registerDEStyleTools(server: McpServer, rpc: RPCType) { "The parent style names to update the style for (for combo class)", ), }) + .refine( + (d) => + Boolean(d.style_id?.trim()) || Boolean(d.style_name?.trim()), + { + message: + "update_style requires style_id or style_name (exactly one targeting strategy).", + path: ["style_id"], + }, + ) .optional() .describe("Update a style"), remove_style: z