Skip to main content
Glama

set_text_decoration

Modify the text decoration of a text node in Figma using natural language commands, enabling AI-assisted design customization within the Claude Talk to Figma MCP environment.

Instructions

Set the text decoration of a text node 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

  • Full implementation of the 'set_text_decoration' MCP tool, including registration, input schema (Zod validation), and handler logic that forwards the command to Figma plugin.
    server.tool( "set_text_decoration", "Set the text decoration of a text node in Figma", { nodeId: z.string().describe("The ID of the text node to modify"), textDecoration: z.enum(["NONE", "UNDERLINE", "STRIKETHROUGH"]).describe("Text decoration type"), }, async ({ nodeId, textDecoration }) => { try { const result = await sendCommandToFigma("set_text_decoration", { nodeId, textDecoration }); const typedResult = result as { name: string, textDecoration: string }; return { content: [ { type: "text", text: `Updated text decoration of node "${typedResult.name}" to ${typedResult.textDecoration}` } ] }; } catch (error) { return { content: [ { type: "text", text: `Error setting text decoration: ${error instanceof Error ? error.message : String(error)}` } ] }; } } );
  • Calls registerTextTools which registers the set_text_decoration tool among others.
    registerTextTools(server);
  • Top-level registration call that indirectly registers the set_text_decoration tool.
    registerTools(server);
  • Type definition for FigmaCommand union that includes 'set_text_decoration' for the command sent to Figma.
    | "set_text_decoration"

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