Skip to main content
Glama

Get tokens

kaava_get_tokens
Read-only

Look up design tokens from the current design system by path or prefix to get CSS variables and values; omit the path to list token groups.

Instructions

Look up tokens from the current design system. Without a path, returns the list of token groups. With a path prefix ("color", "color.primary", "palette.neutral", "font.size", "space", "radius", "shadow"), returns each token with its CSS variable and value. Semantic colors live under "color"; raw ramps under "palette".

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": "kaava_get_tokens"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoShow only this theme for semantic colors. Default: both.
pathNoToken path or prefix, e.g. "color" or "font.size.lg".
projectRootNoAbsolute path of the project. Defaults to the first workspace root the client exposes, else the server working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds return-shape information the agent would otherwise lack (groups vs. tokens with CSS variable and value), which matters because there is no output schema. It does not disclose behavior for an unknown or misspelled path, nor whether errors or empty results are returned.

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

Conciseness4/5

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

Three tightly packed sentences, front-loaded with the verb and immediately followed by the two-mode behavior that determines how the tool is called. The parenthetical prefix list is long but functions as necessary routing information rather than filler.

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

Completeness4/5

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

For a three-parameter, all-optional, read-only lookup with full schema coverage and no output schema, the description covers the critical unknowns: what the two call shapes return and how to target semantic versus raw tokens. Only the default-resolution behavior of projectRoot and the handling of unmatched paths are unaddressed, and those are secondary for this complexity level.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema by classifying what path values map to ('color' semantic vs 'palette' raw ramps) and by specifying that path may be a prefix or a full token. The mode and projectRoot parameters are left entirely to their schema descriptions.

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?

States a specific verb+resource ('look up tokens from the current design system') and then defines the two operating modes precisely: no path returns the group list, a path prefix returns per-token CSS variable and value. It also names the disjoint namespaces ('color' for semantic, 'palette' for raw ramps), which makes it unmistakable against the mutating siblings such as kaava_create_system and kaava_update_system.

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?

Gives concrete when-branches: omit path to enumerate groups, supply a prefix to expand tokens, with six worked prefix examples. It further guides selection by saying where semantic colors versus raw ramps live, so the agent can pick the right prefix. It stops short of naming an alternative sibling to use for adjacent needs (contrast or audit), so no explicit exclusion rule.

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