Skip to main content
Glama

set_font_weight

Adjust text boldness in Figma by specifying font weight values from 100 to 900 for precise typography control.

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

  • Full MCP tool registration block for 'set_font_weight', including Zod input schema, description, and async handler function that sends the command to Figma via sendCommandToFigma and returns success/error text response.
    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)}`
              }
            ]
          };
        }
      }
    );
  • Invocation of registerTextTools(server), which registers the set_font_weight tool among other text tools.
    registerTextTools(server);
  • 'set_font_weight' included in FigmaCommand type union for type-safe command strings.
    | "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. It states the action ('Set') but does not describe behavioral traits such as whether this operation requires specific permissions, if changes are reversible, potential side effects (e.g., affecting text layout), or error conditions. This is a significant gap for a mutation tool with zero annotation coverage.

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 appropriately sized and front-loaded, making it easy to understand quickly with zero waste.

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 that this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral aspects (e.g., permissions, reversibility), usage context, and what the tool returns or how errors are handled. The high schema coverage helps with parameters, but overall completeness is inadequate for a tool that modifies resources.

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 input schema has 100% description coverage, with clear documentation for both parameters ('nodeId' and 'weight'), including allowed values for 'weight'. The description does not add any meaningful semantics beyond what the schema provides, such as explaining parameter interactions or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

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 verb ('Set') and resource ('font weight of a text node in Figma'), making the purpose specific and understandable. However, it does not explicitly distinguish this tool from similar siblings like 'set_font_name' or 'set_font_size', which also modify text node properties in Figma, so it 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 does not mention prerequisites (e.g., needing a valid text node ID), exclusions (e.g., not applicable to non-text nodes), or comparisons to other font-related tools in the sibling list, leaving usage context unclear.

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/agenisea/cc-fig-mcp'

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