Skip to main content
Glama

get_local_components

Retrieve all local components from a Figma document to manage design elements and enable real-time synchronization between code and design workflows.

Instructions

Get all local components from the Figma document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • This is the registration of the MCP tool 'get_local_components'. It uses an empty input schema and a handler function that forwards the 'get_local_components' command to the Figma plugin via sendCommandToFigma websocket utility and returns the result as a text content block with JSON stringified data. Error handling is included.
    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)}`, }, ], }; } } );

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/agenisea/cc-fig-mcp'

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