Skip to main content
Glama

Resolve a token

resolve_token
Read-onlyIdempotent

Get a token's final value for a brand and mode, including its alias chain, to explain a value or check dark mode.

Instructions

Get the final value of one token for a given brand and mode, with the alias chain that produced it (for example color.fg.default -> color.neutral.900). Accepts a dot path, a CSS custom property or var(). Use it to explain a value or to check what a token becomes in dark mode.

Input Schema

NameRequiredDescriptionDefault
modeYesColor mode, for example light or dark
pathYesToken reference: dot path (color.fg.default), custom property (--color-fg-default) or var(--color-fg-default)
brandYesBrand name, for example aurora or nord

Output Schema

NameRequiredDescriptionDefault
modeYes
pathYesDot path, for example color.fg.default
typeYes
brandYes
layerYescore = primitive values, semantic = intent-based tokens that alias core tokens
valueYesResolved value, serialized for CSS
cssVarYesCSS custom property name, for example --color-fg-default
sourceYesSource file, relative to the tokens directory
rawValueYesThe $value exactly as authored (literal or {alias})
aliasChainYesPaths followed to resolve the value, nearest first. Empty for literal values
deprecatedYesfalse, true, or a message naming the replacement (DTCG $deprecated)
descriptionNo
replacementNoToken to use instead, when this one is deprecated

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, idempotentHint, and openWorldHint=false, so safety and side-effect behavior are covered. The description adds meaningful context beyond annotations by disclosing that the result includes the alias chain that produced the final value, which helps an agent understand the return shape without relying solely on the output schema.

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?

Two sentences, front-loaded with the core action and scoped by brand and mode, with a compact inline example. No wasted text.

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?

Inputs are fully described in the schema, an output schema exists, and the description explains the resolution result including the alias chain. An agent has enough to call and interpret the tool correctly.

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?

Schema description coverage is 100%, and the schema already documents accepted token reference forms (dot path, custom property, var()) and example brand/mode values. The description largely repeats what the schema states, adding only the dark-mode use case, so baseline 3 is appropriate.

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 and resource: 'Get the final value of one token for a given brand and mode, with the alias chain.' The example (color.fg.default -> color.neutral.900) makes the output concrete and clearly distinguishes it from sibling search_tokens or find_token_for_value.

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 clear contexts for use: 'to explain a value' and 'to check what a token becomes in dark mode.' It does not explicitly name alternatives or exclusions, but the stated scenarios are sufficient to guide selection among siblings for most cases.

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