Skip to main content
Glama
krusch-frontend-mcp

krusch-frontend-mcp

by kruschdev

generate_css_variables_from_figma

Read-onlyIdempotent

Parse Figma JSON token exports and return a CSS string with a :root block defining custom properties for each token, so you can use real CSS variables instead of RAG ingestion.

Instructions

Parses Figma JSON token exports and returns a CSS string with a :root block defining CSS custom properties (variables) for each token. Use this to generate actual CSS rather than ingesting into the RAG.

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": {
      "tokensJsonStr": "<tokensJsonStr>"
    },
    "name": "generate_css_variables_from_figma"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokensJsonStrYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety and purity are covered. The description adds the useful fact that the return value is a CSS string containing a :root block (valuable since there is no output schema), but says nothing about malformed JSON handling, unsupported token types, or the variable-naming convention applied.

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, zero filler, with the input-to-output behavior front-loaded and the usage discriminator second. Every sentence earns its place.

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 single-parameter, side-effect-free transformation with annotations covering the safety profile, the description is nearly sufficient: what goes in, what comes out, and when to prefer it. The remaining gap is the expected shape of the input JSON, which matters given the 0% schema coverage.

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 coverage is 0% for the single parameter, so the description carries the burden. "Parses Figma JSON token exports" does signal that the input is a serialized Figma token export, but it never clarifies whether tokensJsonStr is a stringified object versus a file path, nor what token structure is expected, leaving the most failure-prone detail undocumented.

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 pair: parses Figma JSON token exports and returns a CSS string with a :root block of custom properties. The output shape is named concretely, so an agent knows exactly what it gets back and can distinguish this from the RAG-ingestion path.

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?

"Use this to generate actual CSS rather than ingesting into the RAG" gives a clear when-to-use plus the contrasting path, which implies the sibling ingest tool. It stops short of naming the alternative tool or stating exclusions (e.g., unsupported token types), so it is clear context without full routing rules.

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