chrometools-mcp 2.4.0 → 2.5.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.
@@ -37,6 +37,28 @@ export const HoverSchema = z.object({
37
37
  selector: z.string().describe("CSS selector for element to hover"),
38
38
  });
39
39
 
40
+ export const SelectOptionSchema = z.object({
41
+ selector: z.string().describe("CSS selector for select element"),
42
+ value: z.string().optional().describe("Value of option to select (option's value attribute)"),
43
+ text: z.string().optional().describe("Text content of option to select"),
44
+ index: z.number().min(0).optional().describe("Index of option to select (0-based)"),
45
+ });
46
+
47
+ export const DragSchema = z.object({
48
+ selector: z.string().describe("CSS selector for element to drag"),
49
+ direction: z.enum(['up', 'down', 'left', 'right', 'up-left', 'up-right', 'down-left', 'down-right'])
50
+ .describe("Direction to drag: vertical (up, down), horizontal (left, right), or diagonal (up-left, up-right, down-left, down-right)"),
51
+ distance: z.number().min(1).optional().describe("Distance to drag in pixels (default: 100)"),
52
+ duration: z.number().min(100).optional().describe("Duration of drag operation in milliseconds (default: 500)"),
53
+ });
54
+
55
+ export const ScrollHorizontalSchema = z.object({
56
+ selector: z.string().describe("CSS selector for element to scroll"),
57
+ direction: z.enum(['left', 'right']).describe("Direction to scroll horizontally"),
58
+ amount: z.union([z.number().min(1), z.literal('full')]).describe("Amount to scroll in pixels, or 'full' to scroll to the end"),
59
+ behavior: z.enum(['auto', 'smooth']).optional().describe("Scroll behavior (default: auto)"),
60
+ });
61
+
40
62
  // CSS tools
41
63
  export const GetComputedCssSchema = z.object({
42
64
  selector: z.string().optional().describe("CSS selector (optional, defaults to body)"),
@@ -200,6 +222,14 @@ export const GetFigmaColorPaletteSchema = z.object({
200
222
  fileKey: z.string().describe("Figma file key or full Figma URL")
201
223
  });
202
224
 
225
+ export const ConvertFigmaToCodeSchema = z.object({
226
+ figmaToken: z.string().optional().describe("Figma API token (optional if FIGMA_TOKEN env var is set)"),
227
+ fileKey: z.string().describe("Figma file key (from URL: figma.com/file/FILE_KEY/...)"),
228
+ nodeId: z.string().describe("Figma node ID (frame/component ID, formats: '123:456' or '123-456')"),
229
+ framework: z.enum(['react', 'react-typescript', 'html']).optional().describe("Target framework (default: react)"),
230
+ includeComments: z.boolean().optional().describe("Include descriptive comments in generated code (default: true)")
231
+ });
232
+
203
233
  // Page analysis tools
204
234
  export const SmartFindElementSchema = z.object({
205
235
  description: z.string().describe("Natural language description of element to find (e.g., 'login button', 'email field')"),
@@ -218,6 +248,7 @@ export const SmartFindElementSchema = z.object({
218
248
 
219
249
  export const AnalyzePageSchema = z.object({
220
250
  refresh: z.boolean().optional().describe("Force refresh of cached analysis (default: false)"),
251
+ includeAll: z.boolean().optional().describe("Include all elements on page, not just interactive ones (default: false). Useful for layout work and finding non-interactive elements to style."),
221
252
  });
222
253
 
223
254
  export const GetAllInteractiveElementsSchema = z.object({
@@ -212,6 +212,7 @@ export const SmartFindElementSchema = z.object({
212
212
 
213
213
  export const AnalyzePageSchema = z.object({
214
214
  refresh: z.boolean().optional().describe("Force refresh of cached analysis (default: false)"),
215
+ includeAll: z.boolean().optional().describe("Include all elements on page, not just interactive ones (default: false). Useful for layout work and finding non-interactive elements to style."),
215
216
  });
216
217
 
217
218
  export const GetAllInteractiveElementsSchema = z.object({