Skip to main content
Glama

get_document_info

Retrieve comprehensive details about the active Figma document, enabling users to access design data and automate tasks directly through natural language commands.

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' MCP tool. It sends a 'get_document_info' command to the Figma plugin via WebSocket (using sendCommandToFigma helper) and returns the result as formatted text content, with error handling.
    server.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 ({}). This is the primary location where the tool is defined in the MCP server.
    server.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) }`, }, ], }; } } );
  • Input schema for get_document_info tool: empty object {}, indicating no parameters required.
    {},

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