Raw schema
{
"type": "object",
"properties": {
"elements": {
"type": "array",
"items": {
"type": "object",
"properties": {
"element_id": {
"type": "string",
"description": "Optional ID for tracking (e.g. Figma node ID)"
},
"element_type": {
"type": "string",
"enum": [
"heading",
"body",
"caption",
"label",
"button",
"display",
"ui"
],
"description": "Semantic role of the text element"
},
"heading_level": {
"type": "integer",
"minimum": 1,
"maximum": 6,
"description": "Heading level if element_type is heading (1–6)"
},
"font_size": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Font size in px"
},
"font_weight": {
"type": "integer",
"minimum": 100,
"maximum": 900,
"description": "Font weight (100=thin, 400=regular, 700=bold, 900=black)"
},
"line_height": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Line height as a multiplier (e.g. 1.5, not px)"
},
"letter_spacing": {
"type": "number",
"description": "Letter spacing in em (e.g. -0.02 for tight, 0.05 for loose)"
},
"text_transform": {
"type": "string",
"enum": [
"none",
"uppercase",
"lowercase",
"capitalize"
],
"description": "CSS text-transform value"
},
"font_style": {
"type": "string",
"enum": [
"normal",
"italic"
],
"description": "CSS font-style"
},
"content_length": {
"type": "integer",
"minimum": 0,
"description": "Character count of the actual text content"
},
"color_hex": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Text color as hex (e.g. #1a1a1a)"
},
"background_color_hex": {
"type": "string",
"pattern": "^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$",
"description": "Background color as hex (e.g. #ffffff)"
},
"background_type": {
"type": "string",
"enum": [
"solid",
"gradient",
"image",
"pattern"
],
"description": "Background type — non-solid backgrounds require special handling"
},
"context": {
"type": "string",
"description": "Brief description of role in design (e.g. \"hero heading\", \"footer legal copy\")"
}
},
"required": [
"element_type",
"font_size",
"font_weight",
"line_height",
"color_hex",
"background_color_hex"
],
"additionalProperties": false
},
"minItems": 1,
"maxItems": 50,
"description": "Array of typography elements to evaluate"
},
"screen_name": {
"type": "string",
"description": "Name of the screen or component being evaluated"
}
},
"required": [
"elements"
],
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
}