get_document_info
Retrieve detailed information about the current Figma document, including design specifications and structure, for programmatic access and analysis.
Instructions
Get detailed information about the current Figma document
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/talk_to_figma_mcp/server.ts:95-122 (registration)Registers the 'get_document_info' MCP tool. The handler forwards the request to the Figma plugin via sendCommandToFigma and formats the response as text content containing JSON stringified result.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) }`, }, ], }; } } );
- src/talk_to_figma_mcp/server.ts:99-122 (handler)Handler function for get_document_info tool: sends 'get_document_info' command to Figma plugin, returns JSON stringified result as text content, or error message.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) }`, }, ], }; } } );
- Empty input schema for get_document_info tool (no parameters required).{},