get_variables tool reads all CSS custom properties currently applied to the :root of the canvas iframe and returns them as a flat key–value map. These properties are your design tokens — brand colors, spacing scales, type ramp values, border radii — anything you’ve defined using set_variables or loaded from .designjs.json. Your agent can read this map to understand the design system before making changes, or to export tokens to a TypeScript or JSON file for use in a React project.
Parameters
get_variables takes no parameters. Pass an empty object as arguments.
Response
object
required
A flat
Record<string, string> mapping CSS custom property names (including the leading --) to their current values. For example: { "--brand-primary": "oklch(0.55 0.2 260)", "--spacing-md": "1rem" }.Example
Custom properties are scoped to the canvas iframe
:root. They are not inherited from the host page styles. Only properties explicitly set via set_variables or loaded from .designjs.json appear in the response.