Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

set_font_size

Adjust text size in Figma designs by specifying pixel values for text nodes, enabling precise typography control through the Claude Talk to Figma MCP server.

Instructions

Set the font size of a text node in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the text node to modify
fontSizeYesFont size in pixels

Implementation Reference

  • The complete MCP tool registration for 'set_font_size', including description, Zod input schema, and async handler function that sends the command to Figma and returns success/error messages.
    server.tool(
      "set_font_size",
      "Set the font size of a text node in Figma",
      {
        nodeId: z.string().describe("The ID of the text node to modify"),
        fontSize: z.number().positive().describe("Font size in pixels"),
      },
      async ({ nodeId, fontSize }) => {
        try {
          const result = await sendCommandToFigma("set_font_size", {
            nodeId,
            fontSize
          });
          const typedResult = result as { name: string, fontSize: number };
          return {
            content: [
              {
                type: "text",
                text: `Updated font size of node "${typedResult.name}" to ${typedResult.fontSize}px`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error setting font size: ${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
  • TypeScript type definition for FigmaCommand union including 'set_font_size' used in sendCommandToFigma calls.
    | "set_font_size"
  • Call to registerTextTools which includes the set_font_size tool registration.
    registerTextTools(server);
  • Top-level call to registerTools which chains to text tools registration including set_font_size.
    registerTools(server);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Set' implies a mutation operation, the description doesn't specify whether this requires specific permissions, what happens if the nodeId is invalid, if changes are reversible, or if there are rate limits. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 front-loads the core purpose without unnecessary words. Every part of the sentence ('Set the font size of a text node in Figma') directly contributes to understanding the tool's function, making it optimally concise and well-structured.

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?

Given the tool's moderate complexity (a mutation operation with 2 parameters), no annotations, and no output schema, the description is minimally adequate but incomplete. It states what the tool does but lacks behavioral context, usage guidelines, and output information. The high schema coverage helps, but the description doesn't fully compensate for the missing annotations and output schema.

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 both parameters (nodeId and fontSize) clearly documented in the schema. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain what a 'text node' is or provide context for valid fontSize ranges). With high schema coverage, 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 ('Set') and the target resource ('font size of a text node in Figma'), making the purpose immediately understandable. However, it doesn't explicitly differentiate this tool from similar sibling tools like 'set_font_name', 'set_font_weight', or 'set_text_content', which all modify text properties. The description is specific but lacks 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. It doesn't mention prerequisites (e.g., needing a text node ID), exclusions (e.g., not applicable to non-text nodes), or comparisons to sibling tools like 'set_font_name' or 'set_text_content'. The agent must infer usage from the tool name and schema alone.

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