Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

load_font_async

Load fonts asynchronously in Figma to ensure text elements display correctly with specified font families and styles during design workflows.

Instructions

Load a font asynchronously in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
familyYesFont family name
styleNoFont style (e.g., 'Regular', 'Bold', 'Italic')

Implementation Reference

  • Registration of the 'load_font_async' MCP tool including name, description, input schema, and handler function.
    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)}`
              }
            ]
          };
        }
      }
    );
  • The handler function that executes the load_font_async tool logic by sending a command to the Figma plugin via websocket and formatting the response.
    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)}`
            }
          ]
        };
      }
  • Input schema validation for the load_font_async tool using Zod, defining 'family' (required string) and 'style' (optional string).
    {
      family: z.string().describe("Font family name"),
      style: z.string().optional().describe("Font style (e.g., 'Regular', 'Bold', 'Italic')"),
    },
  • Higher-level registration that calls registerTextTools(server), which includes load_font_async.
    export function registerTools(server: McpServer): void {
      // Register all tool categories
      registerDocumentTools(server);
      registerCreationTools(server);
      registerModificationTools(server);
      registerTextTools(server);
      registerComponentTools(server);
    }
  • Top-level MCP server setup that registers all tools, indirectly registering load_font_async.
    registerTools(server);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'asynchronously', which hints at non-blocking behavior, but fails to explain what this means in practice (e.g., whether it returns a promise, how errors are handled, or if it requires specific permissions). For a tool with no annotation coverage, this leaves significant gaps in understanding its operational traits.

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?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and context, making it easy to parse quickly, which is ideal for conciseness.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely involves asynchronous operations in a design environment. It doesn't cover return values, error conditions, or integration with other font-related tools, leaving the agent with insufficient context for effective use.

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?

The schema description coverage is 100%, with clear descriptions for both parameters ('family' and 'style'). The description adds no additional meaning beyond what the schema provides, such as examples of valid font families or style combinations. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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?

The description clearly states the action ('Load a font asynchronously') and the target resource ('in Figma'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'set_font_name' or 'set_font_weight', which might be related font operations, so it doesn't achieve the highest score for sibling differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There are no explicit instructions on prerequisites, timing, or comparisons to sibling tools like 'set_font_name', leaving the agent to infer usage context without assistance.

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

Install Server

Other Tools

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