Skip to main content
Glama

get_local_components

Retrieve all local components from a Figma document to enable efficient design access and manipulation for structured workflows.

Instructions

Get all local components from the Figma document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler and registration for the MCP tool 'get_local_components'. This function sends a command to the Figma plugin via sendCommandToFigma('get_local_components'), receives the result, and formats it as MCP content. Error handling returns an error message.
    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) }`, }, ], }; } } );
  • Type definition in CommandParams indicating the tool takes no parameters (empty object).
    get_local_components: Record<string, never>; get_team_components: Record<string, never>;
  • Inclusion in FigmaCommand union type for command validation.
    | "get_local_components" | "create_component_instance"

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/pipethedev/Talk-to-Figma-MCP'

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