Design
Cole um JSON de variáveis Figma / Tokens Studio e exporte para Tailwind, variáveis CSS shadcn, Style Dictionary ou SCSS. Preserva tokens de cor, espaçamento e fonte com inferência de tipo.
Chame esta ferramenta a partir do seu código em três idiomas.
curl -X POST 'https://api.elysiatools.com/pt/api/tools/figma-tokens-export' \
-H 'Content-Type: application/json' \
-d '{"json":"{\n \"color\": {\n \"brand\": {\n \"primary\": { \"$value\": \"#2563eb\", \"$type\": \"color\" },\n \"secondary\": { \"$value\": \"#9333ea\", \"$type\": \"color\" }\n }\n },\n \"spacing\": {\n \"md\": { \"$value\": \"16px\", \"$type\": \"spacing\" }\n }\n}","target":"tailwind","colorFormat":"hex"}'Envie uma requisição POST com suas entradas em JSON. Parâmetros do tipo arquivo exigem upload prévio.
POST https://api.elysiatools.com/pt/api/tools/figma-tokens-export| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
| json | textarea | Sim | Figma variables or Tokens Studio JSON. Accepts $value/$type, value/type, plain nested values, or Figma REST rgba objects. |
| target | select | Não | Which target format to export the tokens to. |
| colorFormat | select | Não | How to re-render color tokens in the output. HSL space-separated is the shadcn convention. |
Resultado HTML
{
"result": "<div>Processed HTML content</div>",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}Adicione esta ferramenta ao seu servidor Model Context Protocol para que agentes de IA possam listá-la e chamá-la.
Adicione este bloco à configuração do seu cliente MCP:
{
"mcpServers": {
"elysiatools-figma-tokens-export": {
"name": "figma-tokens-export",
"description": "Cole um JSON de variáveis Figma / Tokens Studio e exporte para Tailwind, variáveis CSS shadcn, Style Dictionary ou SCSS. Preserva tokens de cor, espaçamento e fonte com inferência de tipo.",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=figma-tokens-export",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}Após conectar ao endpoint SSE, liste as ferramentas expostas:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoque a ferramenta pelo seu id; os argumentos são construídos a partir de seus parâmetros:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "figma-tokens-export",
"arguments": {
"json": "{\n \"color\": {\n \"brand\": {\n \"primary\": { \"$value\": \"#2563eb\", \"$type\": \"color\" },\n \"secondary\": { \"$value\": \"#9333ea\", \"$type\": \"color\" }\n }\n },\n \"spacing\": {\n \"md\": { \"$value\": \"16px\", \"$type\": \"spacing\" }\n }\n}",
"target": "tailwind",
"colorFormat": "hex"
}
}
}Dúvidas ou problemas? Contate [email protected]