Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

set_font_weight

Adjust text boldness in Figma designs by modifying font weight values from 100 to 900 for specific text elements.

Instructions

Set the font weight of a text node in Figma

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdYesThe ID of the text node to modify
weightYesFont weight (100, 200, 300, 400, 500, 600, 700, 800, 900)

Implementation Reference

  • Registers the 'set_font_weight' MCP tool with Zod input schema (nodeId: string, weight: number) and inline handler that delegates to Figma plugin via sendCommandToFigma, returning success or error message.
    server.tool(
      "set_font_weight",
      "Set the font weight of a text node in Figma",
      {
        nodeId: z.string().describe("The ID of the text node to modify"),
        weight: z.number().describe("Font weight (100, 200, 300, 400, 500, 600, 700, 800, 900)"),
      },
      async ({ nodeId, weight }) => {
        try {
          const result = await sendCommandToFigma("set_font_weight", {
            nodeId,
            weight
          });
          const typedResult = result as { name: string, fontName: { family: string, style: string }, weight: number };
          return {
            content: [
              {
                type: "text",
                text: `Updated font weight of node "${typedResult.name}" to ${typedResult.weight} (${typedResult.fontName.style})`
              }
            ]
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error setting font weight: ${error instanceof Error ? error.message : String(error)}`
              }
            ]
          };
        }
      }
    );
  • Higher-level registration call to registerTextTools(server), which includes the set_font_weight tool among text tools.
    registerTextTools(server);
  • Top-level registration call to registerTools(server), which chains to text-tools registration including set_font_weight.
    registerTools(server);
  • Type definition for FigmaCommand includes 'set_font_weight' as a valid command sent from MCP handler to Figma plugin.
    | "set_font_weight"
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, it doesn't specify whether this operation is reversible, requires specific permissions, or has side effects (e.g., affecting text layout). For a mutation tool with zero annotation coverage, this lack of behavioral detail is a significant gap.

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 target, making it easy to parse. Every part of the sentence earns its place by clearly conveying the essential information.

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 complexity of a mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavioral traits (e.g., error conditions, success responses), usage context, or output expectations. For a tool that modifies Figma nodes, more context is needed to ensure safe and effective use by an agent.

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?

Schema description coverage is 100%, with clear parameter descriptions in the schema (nodeId as 'ID of the text node to modify', weight with numeric values). The description adds no additional parameter semantics beyond what the schema provides, such as explaining valid weight ranges or nodeId sourcing. This meets the baseline for high schema coverage but doesn't enhance understanding.

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 target ('font weight of a text node in Figma'), making the purpose immediately understandable. It distinguishes from siblings like 'set_font_size' or 'set_font_name' by specifying the font weight attribute. However, it doesn't explicitly contrast with all similar tools (e.g., 'set_text_content'), which prevents a perfect score.

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 relationships with sibling tools like 'set_font_size' or 'set_text_content'. Without any usage context, the agent must infer when this tool is appropriate.

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