Skip to content

Node Inspection

Tools for reading node data, searching, and exporting

5 tools in this domain.

Get detailed information about one or more nodes. Always pass an array of IDs. Use `fields` to select only the properties you need (reduces context size).

ParameterTypeRequiredDescription
nodeIdsstring[]Array of node IDs. Example: ["1:2","1:3"]
depthnumberChild recursion depth (default: unlimited). 0=stubs only.
fieldsstring[]Whitelist of property names to include. Example: ["absoluteBoundingBox","layoutMode","fills"]. Omit to return all properties.
JSON Schema
{
  "type": "object",
  "properties": {
    "nodeIds": {
      "description": "Array of node IDs. Example: [\"1:2\",\"1:3\"]",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "depth": {
      "description": "Child recursion depth (default: unlimited). 0=stubs only.",
      "type": "number"
    },
    "fields": {
      "description": "Whitelist of property names to include. Example: [\"absoluteBoundingBox\",\"layoutMode\",\"fills\"]. Omit to return all properties.",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "nodeIds"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
resultsobject[]Serialized node trees
_truncatedbooleanTrue when node budget exceeded
_noticestringHuman-readable truncation notice
Example response
{
  "results": [
    {
      "id": "1:2",
      "name": "Button",
      "type": "COMPONENT",
      "width": 120,
      "height": 40
    }
  ]
}
Response JSON Schema
{
  "type": "object",
  "description": "Serialized node tree(s). Shape depends on depth parameter.",
  "properties": {
    "results": {
      "type": "array",
      "description": "Serialized node trees",
      "items": {
        "type": "object"
      }
    },
    "_truncated": {
      "type": "boolean",
      "description": "True when node budget exceeded"
    },
    "_notice": {
      "type": "string",
      "description": "Human-readable truncation notice"
    }
  },
  "required": [
    "results"
  ]
}

Search nodes on the current page by name and/or type. Use set_current_page first to search other pages. Paginated (default 50).

ParameterTypeRequiredDescription
querystringName search (case-insensitive substring). Omit to match all names.
typesstring[]Filter by types. Example: ["FRAME","TEXT"]. Omit to match all types.
scopeNodeIdstringNode ID to search within (defaults to current page)
caseSensitivebooleanCase-sensitive name match (default false)
limitnumberMax results (default 50)
offsetnumberSkip N results for pagination (default 0)
JSON Schema
{
  "type": "object",
  "properties": {
    "query": {
      "description": "Name search (case-insensitive substring). Omit to match all names.",
      "type": "string"
    },
    "types": {
      "description": "Filter by types. Example: [\"FRAME\",\"TEXT\"]. Omit to match all types.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "scopeNodeId": {
      "description": "Node ID to search within (defaults to current page)",
      "type": "string"
    },
    "caseSensitive": {
      "description": "Case-sensitive name match (default false)",
      "type": "boolean"
    },
    "limit": {
      "description": "Max results (default 50)",
      "type": "number"
    },
    "offset": {
      "description": "Skip N results for pagination (default 0)",
      "type": "number"
    }
  }
}

Response reference only — not included in tool definitions

FieldTypeDescription
totalCountnumberTotal matching nodes
returnednumberNumber returned in this page
offsetnumber
limitnumber
resultsobject[]
idstring
namestring
typestring
parentIdstring
parentNamestring
boundsobject
xnumber
ynumber
widthnumber
heightnumber
Example response
{
  "totalCount": 3,
  "returned": 3,
  "offset": 0,
  "limit": 100,
  "results": [
    {
      "id": "1:2",
      "name": "Header",
      "type": "FRAME",
      "parentId": "0:1",
      "parentName": "Page 1"
    }
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "totalCount": {
      "type": "number",
      "description": "Total matching nodes"
    },
    "returned": {
      "type": "number",
      "description": "Number returned in this page"
    },
    "offset": {
      "type": "number"
    },
    "limit": {
      "type": "number"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          },
          "parentName": {
            "type": "string"
          },
          "bounds": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              }
            }
          }
        }
      }
    }
  },
  "required": [
    "totalCount",
    "returned",
    "offset",
    "limit",
    "results"
  ]
}

Export a node as an image from Figma

ParameterTypeRequiredDescription
nodeIdstringThe node ID to export
format"PNG" | "JPG" | "SVG" | "PDF"Export format (default: PNG)
scalenumberExport scale (default: 1)
JSON Schema
{
  "type": "object",
  "properties": {
    "nodeId": {
      "type": "string",
      "description": "The node ID to export"
    },
    "format": {
      "description": "Export format (default: PNG)",
      "type": "string",
      "enum": [
        "PNG",
        "JPG",
        "SVG",
        "PDF"
      ]
    },
    "scale": {
      "description": "Export scale (default: 1)",
      "type": "number",
      "exclusiveMinimum": 0
    }
  },
  "required": [
    "nodeId"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
mimeTypestring
imageDatastringBase64-encoded image data
Example response
{
  "nodeId": "1:2",
  "format": "PNG",
  "scale": 2,
  "mimeType": "image/png",
  "imageData": "iVBORw0KGgo..."
}
Response JSON Schema
{
  "type": "object",
  "description": "Returned as MCP image content (not JSON)",
  "properties": {
    "mimeType": {
      "type": "string"
    },
    "imageData": {
      "type": "string",
      "description": "Base64-encoded image data"
    }
  },
  "required": [
    "mimeType",
    "imageData"
  ]
}

Get the current selection. Without depth, returns stubs (id/name/type). With depth, returns full serialized node trees.

ParameterTypeRequiredDescription
depthnumberChild recursion depth. Omit for stubs only, 0=selected nodes' properties, -1=unlimited.
JSON Schema
{
  "type": "object",
  "properties": {
    "depth": {
      "description": "Child recursion depth. Omit for stubs only, 0=selected nodes' properties, -1=unlimited.",
      "type": "number"
    }
  }
}

Response reference only — not included in tool definitions

FieldTypeDescription
selectionCountnumber
selectionobject[]
idstring
namestring
typestring
_truncatedboolean
_noticestring
Example response
{
  "selectionCount": 1,
  "selection": [
    {
      "id": "1:2",
      "name": "Button",
      "type": "COMPONENT"
    }
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "selectionCount": {
      "type": "number"
    },
    "selection": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "Stubs (no depth) or full serialized nodes (with depth)",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      }
    },
    "_truncated": {
      "type": "boolean"
    },
    "_notice": {
      "type": "string"
    }
  },
  "required": [
    "selectionCount",
    "selection"
  ]
}

Set selection to nodes and scroll viewport to show them. Also works as focus (single node).

ParameterTypeRequiredDescription
nodeIdsstring[]Array of node IDs to select. Example: ["1:2","1:3"]
JSON Schema
{
  "type": "object",
  "properties": {
    "nodeIds": {
      "description": "Array of node IDs to select. Example: [\"1:2\",\"1:3\"]",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "nodeIds"
  ]
}

Response reference only — not included in tool definitions

FieldTypeDescription
countnumberNumber of nodes selected
selectedNodesobject[]
namestring
idstring
notFoundIdsstring[]IDs that could not be found
Example response
{
  "count": 2,
  "selectedNodes": [
    {
      "name": "Button",
      "id": "1:2"
    },
    {
      "name": "Card",
      "id": "3:4"
    }
  ]
}
Response JSON Schema
{
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Number of nodes selected"
    },
    "selectedNodes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      }
    },
    "notFoundIds": {
      "type": "array",
      "description": "IDs that could not be found",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "count",
    "selectedNodes"
  ]
}