Skip to main content
Glama

get_document_info

Retrieve detailed information about the current Figma document to understand design structure and components for automation tasks.

Instructions

Get detailed information about the current Figma document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'get_document_info' tool. It sends a 'get_document_info' command to the Figma plugin via WebSocket (using sendCommandToFigma helper), stringifies the result as text content, and handles errors appropriately. This also serves as the tool registration via McpServer.tool().
    "get_document_info", "Get detailed information about the current Figma document", {}, async () => { try { const result = await sendCommandToFigma("get_document_info"); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting document info: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );
  • Registration of the 'get_document_info' tool using McpServer.tool(), with empty input schema ({}), description, and inline handler.
    "get_document_info", "Get detailed information about the current Figma document", {}, async () => { try { const result = await sendCommandToFigma("get_document_info"); return { content: [ { type: "text", text: JSON.stringify(result) } ] }; } catch (error) { return { content: [ { type: "text", text: `Error getting document info: ${error instanceof Error ? error.message : String(error) }`, }, ], }; } } );
  • Input schema for 'get_document_info' tool: empty object ({}), indicating no parameters required.
    async () => {

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