Skip to main content
Glama

load_font_async

Load fonts asynchronously in Figma to enhance design workflows, enabling faster integration and smoother performance for AI-assisted design tasks.

Instructions

Load a font asynchronously in Figma

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": {}, "type": "object" }

Implementation Reference

  • MCP server tool registration for 'load_font_async', including input schema (family: string, style?: string) and proxy handler that sends command to Figma plugin.
    server.tool( "load_font_async", "Load a font asynchronously in Figma", { family: z.string().describe("Font family name"), style: z.string().optional().describe("Font style (e.g., 'Regular', 'Bold', 'Italic')"), }, async ({ family, style }) => { try { const result = await sendCommandToFigma("load_font_async", { family, style: style || "Regular" }); const typedResult = result as { success: boolean, family: string, style: string, message: string }; return { content: [ { type: "text", text: typedResult.message || `Loaded font ${family} ${style || "Regular"}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error loading font: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
  • Figma plugin handler for the 'load_font_async' command: loads the specified font using figma.loadFontAsync and returns success/error response.
    async function loadFontAsyncWrapper(params) { const { family, style = "Regular" } = params || {}; if (!family) { throw new Error("Missing font family"); } try { await figma.loadFontAsync({ family, style }); return { success: true, family: family, style: style, message: `Successfully loaded ${family} ${style}` }; } catch (error) { throw new Error(`Error loading font: ${error.message}`); } }
  • Calls registerTextTools(server) which registers the load_font_async tool among other text tools.
    registerTextTools(server);
  • Includes 'load_font_async' in the FigmaCommand type union for TypeScript typing of commands sent to the plugin.
    | "load_font_async"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/arinspunk/claude-talk-to-figma-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server