get_tokens
Extract design tokens (colors, spacing, typography) from a Paper file, filter by type or name pattern, and export as JSON, CSS, or Tailwind theme.
Instructions
List the file's design tokens (colors, spacing, typography, etc).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_tokens"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| types | No | Filter by design token type(s). Omit to include all types. | |
| fileId | No | Optional. The Paper file ID this call should act on. Pass it to reliably target a specific file when several are open at once (e.g. multiple agents from the same session working in parallel). Omit to use the most recently opened file in the session. | |
| format | No | Output format. "json" (default) returns structured tokens. "css" returns a vanilla `:root { ... }` stylesheet. "tailwind" returns a Tailwind v4 `@theme { ... }` block with namespaced variables. | |
| namePattern | No | Glob pattern matched against the full CSS variable name (case-insensitive). Use "*" as a wildcard. Examples: "--color-primary", "--color-*", "*-500", "*brand*". Omit to skip name filtering. |