Skip to main content
Glama
leethoneid

Figma Spec Compressor

compress_figma_json

Converts raw Figma JSON AST into compact YAML or Markdown specs with Tailwind classes and token metrics, reducing context size for AI agents.

Instructions

Compress raw Figma JSON AST into compact agent-ready YAML or Markdown specification with Tailwind classes and token metrics.

Input Schema

NameRequiredDescriptionDefault
formatNoOutput format: 'yaml' for structured spec, 'markdown' for full prompt instructionsyaml
rawJsonYesRaw Figma JSON AST string from Figma REST API or plugin

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the transformation (raw AST -> compact spec) and that the output carries Tailwind classes and token metrics. It omits behavior an agent would want: whether processing is local vs. networked, what happens on malformed JSON, size limits, and whether the result is written anywhere or just 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?

A single front-loaded sentence with no filler, and the transformation and output shape come first. It is dense with terminology (AST, Tailwind, token metrics) but each noun contributes to identifying the tool.

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

Completeness3/5

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

For a two-parameter, locally-scoped transform with no output schema, the description should say enough about the returned artifact and failure modes; it characterizes the output loosely but says nothing about errors or limits. Adequate to select the tool, thin for predicting its result.

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 an enum on 'format', so the schema already carries parameter meaning; baseline 3 applies. The description adds only that the output includes Tailwind classes and token metrics, not parameter-level guidance beyond what the schema states.

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?

Names a specific verb (compress) and resource (raw Figma JSON AST) and states the output artifacts (compact YAML/Markdown spec with Tailwind classes and token metrics). It separates itself from the sibling only implicitly, via the 'JSON' input type rather than by naming compress_figma_url, so it stops short of a 5.

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

Usage Guidelines3/5

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

The input type ('raw Figma JSON AST') implies when to reach for this over compress_figma_url, but there is no explicit statement of when to use it, when not to, or prerequisites. Usage is inferred rather than guided.

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

Deploy Server

Other Tools