> Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

---
title: "manageTextStyle"
sidebarTitle: "manageTextStyle"
description: "Creates or updates a text style in the project. The style path must start with \"/\" and can include folder structure (e.g., \"/Typography/Headings/H1\"). The display name will be automatically derived fr"
tag: "TOOL"
tagColor: "purple"
gridGap: 30
---

<Aside full>
  <RequestExample>
    ```json lines=false
    {
      "method": "tools/call",
      "params": {
        "name": "manageTextStyle",
        "arguments": {
          "type": "create",
          "stylePath": "string",
          "properties": {
            "tag": "h1",
            "fontSize": "string",
            "lineHeight": "string",
            "letterSpacing": "string",
            "paragraphSpacing": 0,
            "transform": "none",
            "alignment": "left",
            "decoration": "none",
            "balance": true,
            "color": "string",
            "font": "string",
            "boldFont": "string",
            "italicFont": "string",
            "boldItalicFont": "string",
            "decorationColor": "string",
            "decorationThickness": "string",
            "decorationStyle": "solid",
            "decorationSkipInk": "auto",
            "decorationOffset": "string"
          }
        }
      }
    }
    ```
  </RequestExample>
</Aside>

<MCPTool {...{"name":"manageTextStyle","description":"Creates or updates a text style in the project.\n\nThe style path must start with \"/\" and can include folder structure (e.g., \"/Typography/Headings/H1\").\nThe display name will be automatically derived from the last segment of the path.\nFor example, \"/Typography/Headings/H1\" will create a style named \"H1\" in the \"Typography/Headings\" folder.\n\n- When type is \"create\": Creates a new text style. Will fail if style already exists.\n- When type is \"update\": Updates an existing text style. Will fail if style doesn't exist.\n    Note: Updating a text style will update all nodes that use it in the project.\n    If you only want to update a single node, create a new text style and update the XML to reference its new path instead.\n\nAfter creating, you can reference this style in XML nodes using inlineTextStyle=\"/path/to/style\".","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["create","update"],"description":"Operation type: \"create\" to make a new style, \"update\" to modify an existing style"},"stylePath":{"type":"string","description":"The path of the text style. Must start with /. The name is derived from the last path segment."},"properties":{"type":"object","properties":{"tag":{"description":"HTML tag associated with the text style","type":"string","enum":["h1","h2","h3","h4","h5","h6","p"]},"fontSize":{"description":"Font size with units (e.g., \"16px\", \"1.5rem\")","type":"string"},"lineHeight":{"description":"Line height with units (e.g., \"24px\", \"1.5em\", \"150%\")","type":"string"},"letterSpacing":{"description":"Letter spacing with units (e.g., \"0px\", \"0.05em\")","type":"string"},"paragraphSpacing":{"description":"Space between paragraphs in pixels","type":"number"},"transform":{"description":"Text transformation","type":"string","enum":["none","uppercase","lowercase","capitalize"]},"alignment":{"description":"Text alignment","type":"string","enum":["left","center","right","justify"]},"decoration":{"description":"Text decoration","type":"string","enum":["none","underline","line-through"]},"balance":{"description":"Enable balanced text wrapping for better legibility","type":"boolean"},"color":{"description":"Color as hex, rgba, or color style path (e.g., \"#FF0000\", \"rgb(255, 0, 0)\", \"/Primary\")","type":"string"},"font":{"description":"Font selector (e.g., \"GF;Inter-600\")","type":"string"},"boldFont":{"description":"Bold variant font selector or null to remove","anyOf":[{"type":"string"},{"type":"null"}]},"italicFont":{"description":"Italic variant font selector or null to remove","anyOf":[{"type":"string"},{"type":"null"}]},"boldItalicFont":{"description":"Bold italic variant font selector or null to remove","anyOf":[{"type":"string"},{"type":"null"}]},"decorationColor":{"description":"Decoration color as hex, rgba, or color style path","type":"string"},"decorationThickness":{"description":"Decoration thickness (e.g., \"auto\", \"2px\", \"0.1em\")","type":"string"},"decorationStyle":{"description":"Text decoration style","type":"string","enum":["solid","double","dotted","dashed","wavy"]},"decorationSkipInk":{"description":"Text decoration skip ink behavior","type":"string","enum":["auto","none","all"]},"decorationOffset":{"description":"Decoration offset (e.g., \"auto\", \"2px\", \"0.1em\")","type":"string"}},"additionalProperties":false,"description":"Properties for the text style. For update, only specified properties will be changed."}},"required":["type","stylePath","properties"],"additionalProperties":false},"annotations":{"idempotentHint":true}}} />
