Text & Fonts
Tools for modifying text content, properties, and fonts
3 tools in this domain.
set_text_content
Section titled “set_text_content” edit
Set text content on text nodes. Batch: pass multiple items to replace text in multiple nodes at once.
| Parameter | Type | Required | Description |
|---|---|---|---|
items | object[] | ✓ | Array of {nodeId, text} |
↳ nodeId | string | ✓ | Text node ID |
↳ text | string | ✓ | New text content |
depth | number | ✗ | Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited. |
JSON Schema
{
"type": "object",
"properties": {
"items": {
"description": "Array of {nodeId, text}",
"type": "array",
"items": {
"type": "object",
"properties": {
"nodeId": {
"type": "string",
"description": "Text node ID"
},
"text": {
"type": "string",
"description": "New text content"
}
},
"required": [
"nodeId",
"text"
]
}
},
"depth": {
"description": "Response detail: omit for id+name only. 0=properties + child stubs. N=recurse N levels. -1=unlimited.",
"type": "number"
}
},
"required": [
"items"
]
} Response reference only — not included in tool definitions
| Field | Type | Description |
|---|---|---|
results | ("ok" | error)[] | Per-item results. |
↳ error | string | Error message for this item |
warnings | string[] | Deduplicated warnings hoisted from individual results |
Example response
{
"results": [
"ok",
"ok"
]
} Response JSON Schema
{
"type": "object",
"properties": {
"results": {
"type": "array",
"description": "Per-item results.",
"items": {
"oneOf": [
{
"type": "string",
"const": "ok"
},
{
"title": "error",
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Error message for this item"
}
},
"required": [
"error"
]
}
]
}
},
"warnings": {
"type": "array",
"description": "Deduplicated warnings hoisted from individual results",
"items": {
"type": "string"
}
}
},
"required": [
"results"
]
} scan_text_nodes
Section titled “scan_text_nodes”Scan all text nodes within a node tree. Batch: pass multiple items.
| Parameter | Type | Required | Description |
|---|---|---|---|
items | object[] | ✓ | Array of {nodeId} |
↳ nodeId | string | ✓ | Node ID |
↳ limit | number | ✗ | Max text nodes to return (default: 50) |
↳ includePath | boolean | ✗ | Include ancestor path strings (default: true). Set false to reduce payload. |
↳ includeGeometry | boolean | ✗ | Include absoluteX/absoluteY/width/height (default: true). Set false to reduce payload. |
JSON Schema
{
"type": "object",
"properties": {
"items": {
"description": "Array of {nodeId}",
"type": "array",
"items": {
"type": "object",
"properties": {
"nodeId": {
"type": "string",
"description": "Node ID"
},
"limit": {
"description": "Max text nodes to return (default: 50)",
"type": "number"
},
"includePath": {
"description": "Include ancestor path strings (default: true). Set false to reduce payload.",
"type": "boolean"
},
"includeGeometry": {
"description": "Include absoluteX/absoluteY/width/height (default: true). Set false to reduce payload.",
"type": "boolean"
}
},
"required": [
"nodeId"
]
}
}
},
"required": [
"items"
]
} Response reference only — not included in tool definitions
| Field | Type | Description |
|---|---|---|
results | (success | error)[] | Per-item results. |
↳ nodeId | string | |
↳ count | number | Total text nodes found |
↳ truncated | boolean | Whether results were truncated |
↳ textNodes | object[] | |
↳ id | string | |
↳ name | string | |
↳ characters | string | Text content |
↳ fontSize | number | |
↳ fontFamily | string | |
↳ fontStyle | string | |
↳ absoluteX | number | |
↳ absoluteY | number | |
↳ width | number | |
↳ height | number | |
↳ path | string | Ancestor path string |
↳ pathIds | string | |
↳ depth | number | |
↳ error | string | Error message for this item |
warnings | string[] | Deduplicated warnings hoisted from individual results |
Example response
{
"results": [
{
"nodeId": "1:2",
"count": 2,
"truncated": false,
"textNodes": [
{
"id": "1:5",
"name": "Label",
"characters": "Submit",
"fontSize": 14,
"fontFamily": "Inter",
"fontStyle": "Medium",
"path": "Card > Button > Label",
"depth": 2
}
]
}
]
} Response JSON Schema
{
"type": "object",
"properties": {
"results": {
"type": "array",
"description": "Per-item results.",
"items": {
"oneOf": [
{
"title": "success",
"type": "object",
"properties": {
"nodeId": {
"type": "string"
},
"count": {
"type": "number",
"description": "Total text nodes found"
},
"truncated": {
"type": "boolean",
"description": "Whether results were truncated"
},
"textNodes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"characters": {
"type": "string",
"description": "Text content"
},
"fontSize": {
"type": "number"
},
"fontFamily": {
"type": "string"
},
"fontStyle": {
"type": "string"
},
"absoluteX": {
"type": "number"
},
"absoluteY": {
"type": "number"
},
"width": {
"type": "number"
},
"height": {
"type": "number"
},
"path": {
"type": "string",
"description": "Ancestor path string"
},
"pathIds": {
"type": "string"
},
"depth": {
"type": "number"
}
}
}
}
}
},
{
"title": "error",
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Error message for this item"
}
},
"required": [
"error"
]
}
]
}
},
"warnings": {
"type": "array",
"description": "Deduplicated warnings hoisted from individual results",
"items": {
"type": "string"
}
}
},
"required": [
"results"
]
} get_available_fonts
Section titled “get_available_fonts”Get available fonts in Figma. Optionally filter by query string.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | ✗ | Filter fonts by name (case-insensitive). Omit to list all fonts. |
JSON Schema
{
"type": "object",
"properties": {
"query": {
"description": "Filter fonts by name (case-insensitive). Omit to list all fonts.",
"type": "string"
}
}
} Response reference only — not included in tool definitions
| Field | Type | Description |
|---|---|---|
count | number | |
fonts | object[] | |
↳ family | string | |
↳ styles | string[] |
Example response
{
"count": 2,
"fonts": [
{
"family": "Inter",
"styles": [
"Regular",
"Medium",
"Bold"
]
},
{
"family": "Roboto",
"styles": [
"Regular",
"Bold"
]
}
]
} Response JSON Schema
{
"type": "object",
"properties": {
"count": {
"type": "number"
},
"fonts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"family": {
"type": "string"
},
"styles": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
},
"required": [
"count",
"fonts"
]
}