Skip to main content
Glama

get_local_components

Retrieve all local components from a Figma document to access design elements for automation or integration tasks.

Instructions

Get all local components from the Figma document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The complete handler function and registration for the 'get_local_components' MCP tool. It calls sendCommandToFigma to delegate the logic to the Figma plugin and formats the response as a text content block with JSON stringified result, handling errors appropriately.
    server.tool( "get_local_components", "Get all local components from the Figma document", {}, async () => { try { const result = await sendCommandToFigma("get_local_components"); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting local components: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );
  • Empty input schema for the get_local_components tool (no parameters required).
    {},
  • TypeScript type definition confirming empty parameters (Record<string, never>) for the get_local_components command in FigmaCommandParams.
    get_local_components: Record<string, never>;
  • The get_local_components command is included in the FigmaCommand type union, confirming its registration in the command handling system.
    | "get_local_components" | "create_component_instance" | "get_instance_overrides" | "set_instance_overrides" | "export_node_as_image" | "join" | "set_corner_radius" | "clone_node" | "set_text_content" | "scan_text_nodes" | "set_multiple_text_contents" | "get_annotations" | "set_annotation" | "set_multiple_annotations" | "scan_nodes_by_types" | "set_layout_mode" | "set_padding" | "set_axis_align" | "set_layout_sizing" | "set_item_spacing" | "get_reactions"

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/andreycretsu/cursor-talk-to-figma-mcp-main'

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