Emit tokens
kaava_emitWrites the design system out to your project as CSS variables, Tailwind v4 theme, SCSS, TypeScript, W3C tokens, DESIGN.md, or a preview, and remembers the chosen targets for regeneration.
Instructions
Write the design system out for the project stack. Targets: "css" (custom properties, works with any framework), "tailwind" (Tailwind v4 @theme), "scss", "ts" (typed token object for React/Vue/Svelte/React Native), "dtcg" (W3C design tokens JSON for Figma/Style Dictionary), "design-md" (DESIGN.md in the open DESIGN.md format: tokens as YAML front matter plus usage rules, for agents and people), "preview" (self-contained preview.html showing the system in use, for the user to open in a browser). The choice is remembered, so later kaava_update_system calls regenerate the same files.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"targets": "<targets>"
},
"name": "kaava_emit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Return the content that would be written instead of writing files. | |
| outDir | No | Directory relative to the project root. Default: the directory used last time, else "kaava". | |
| targets | Yes | Which outputs to write. | |
| overwrite | No | Replace existing files in outDir that Kaava did not generate. Without this, such files are left untouched and the call fails. | |
| projectRoot | No | Absolute path of the project. Defaults to the first workspace root the client exposes, else the server working directory. |