Skip to main content
Glama

Generate Tokens

generate_tokens
Read-onlyIdempotent

Export design tokens from active UI presets to CSS, JavaScript, JSON, or Tailwind formats for consistent styling across projects.

Instructions

Export the active preset's design tokens in various formats for use in your project.

Args:

  • format ('css'|'js'|'json'|'tailwind'): Output format (default: 'css')

    • css: :root { --color-surface: ...; } CSS custom properties

    • js: TypeScript const export for use with style objects

    • json: Raw token JSON

    • tailwind: theme.extend config for tailwind.config.js

  • include_comments (boolean): Add section headers in output (default: true)

Returns: Token file content as a string. Requires active preset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format for token exportcss
include_commentsNoAdd section headers in output
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate this is a read-only, non-destructive, idempotent operation, but the description adds valuable context: it specifies that the output is 'Token file content as a string' and mentions the dependency on an active preset. This goes beyond annotations by clarifying the return type and prerequisite condition, though it doesn't detail rate limits or auth needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence, followed by structured parameter details and return information. Every sentence adds value: the first explains the tool's function, the Args section clarifies parameters, and the Returns/Requires lines provide essential context without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, rich annotations (covering safety and behavior), and full parameter documentation in the schema, the description is complete. It explains the purpose, parameters, return value, and prerequisite, leaving no gaps for the agent to understand how to invoke it correctly, even without an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema fully documents both parameters. The description adds minimal value by listing format options with brief examples (e.g., 'css: :root { --color-surface: ...; }'), but doesn't provide additional syntax or usage details beyond what's in the schema. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Export'), the resource ('active preset's design tokens'), and the purpose ('for use in your project'). It distinguishes from siblings like 'generate_color_palette' or 'generate_component' by focusing on token export rather than generation or manipulation of design elements.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states 'Requires active preset' as a prerequisite, providing clear context for when to use this tool. However, it does not specify when to choose this over alternatives like 'list_presets' or 'load_preset' for preset management, or differentiate from other export/formatting tools if they existed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ncsound919/OG-Glass'

If you have feedback or need assistance with the MCP directory API, please join our Discord server