Skip to main content
Glama

Apply Token Overrides

apply_token_overrides

Apply runtime token overrides to modify UI design tokens without creating full presets. Deep merges partial token objects over active presets for per-client customization like accent colors.

Instructions

Apply runtime token overrides on top of the active preset (deep merged). Overrides are applied in memory only unless persist: true writes them to disk. Useful for per-client accent color changes without creating a full preset.

Args:

  • overrides (object): Partial DesignTokens object (deeply merged over active tokens)

  • persist (boolean): Write overrides to preset/overrides.json on disk (default: false)

Example overrides: { "colors": { "accent": { "primary": "#2563eb" } } }

Returns: Confirmation of applied override paths. Requires active preset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
overridesYesPartial DesignTokens object (deeply merged over active tokens)
persistNoWrite overrides to preset/overrides.json on disk
Behavior4/5

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

Annotations cover basic hints (readOnlyHint=false, destructiveHint=false), but the description adds valuable behavioral context: it explains that overrides are 'applied in memory only unless persist: true', clarifies the merge behavior ('deeply merged'), and mentions the output ('Returns: Confirmation of applied override paths'). This goes beyond what annotations provide without contradiction.

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 well-structured and front-loaded: the first sentence explains the core purpose, followed by key behavioral details, usage guidelines, parameter documentation, an example, and prerequisites. Every sentence adds value without redundancy, making it efficient for an agent to parse.

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 complexity (runtime overrides with persistence options), the description provides complete context: it covers purpose, usage, behavior, parameters, and output. While there is no output schema, the description specifies the return value ('Confirmation of applied override paths'), and annotations fill in safety aspects. This is sufficient for effective agent use.

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%, with both parameters ('overrides' and 'persist') fully documented in the schema. The description repeats this information in the 'Args' section and adds an example, but does not provide additional semantic meaning beyond what the schema already states. Baseline 3 is appropriate given 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 ('apply runtime token overrides'), the resource ('on top of the active preset'), and the mechanism ('deep merged'). It distinguishes from sibling tools like 'load_preset' or 'scaffold_preset' by focusing on runtime modifications rather than preset management or creation.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('Useful for per-client accent color changes without creating a full preset') and provides a clear alternative scenario ('persist: true writes them to disk'). It also specifies a prerequisite ('Requires active preset'), guiding the agent on proper context for invocation.

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