Skip to main content
Glama
This server has been deprecated

Rebranded to ComposeLint AI. Repository has been moved to TechsOneAi/ComposeLintAI.

add_token

Destructive

Converts a hardcoded value at a specified file and line into a named design token, with options to force creation and choose a preferred token file.

Instructions

Convert a hardcoded value to a design token.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file": "<file>",
      "line": "<line>",
      "value": "<value>",
      "token_name": "<token_name>",
      "token_type": "<token_type>"
    },
    "name": "add_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYes
lineYes
valueYes
token_nameYes
token_typeYes
force_createNo
preferred_token_fileNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. First observedv0.1.0

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and non-idempotent, so the write/irreversibility profile is covered. The description adds that existing hardcoded values are replaced with a token reference, which implies source-file edits but says nothing about backups, rollback availability, or the effect of force_create and preferred_token_file.

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

Conciseness3/5

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

A single front-loaded sentence with no wasted words, but it is under-specified rather than concise; the brevity leaves real gaps for a seven-parameter mutation tool.

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

Completeness2/5

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

This is a destructive, non-idempotent mutation with seven undocumented parameters, and the output schema does not excuse the missing behavioral and parameter detail. The definition does not give an agent enough to invoke it correctly without trial and error.

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

Parameters2/5

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

Schema coverage is 0% across seven parameters, so the description carries the full burden and fails: file, line, token_type, force_create, and preferred_token_file are never explained. Only 'value' is loosely implied by the phrase 'hardcoded value'.

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

Purpose4/5

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

States a specific verb (convert) and resource (hardcoded value → design token), which is clear enough to understand the operation. It does not differentiate from siblings like set_token or suggest_token_split, so an agent must guess which token-mutation tool applies.

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

Usage Guidelines2/5

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

No guidance on when to use this versus set_token, list_tokens, or the rollback tools, and no prerequisites such as whether the target token file must exist or what happens if the token already exists. The agent is left to infer usage entirely from the name.

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