Skip to main content
Glama

get_document_info

Retrieve detailed information about the current Figma document to understand its structure and properties for AI-assisted design workflows.

Instructions

Get detailed information about the current Figma document

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The asynchronous handler function that implements the get_document_info MCP tool. It sends a 'get_document_info' command to the Figma plugin via WebSocket, stringifies the result as text content, or returns an 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)}`, }, ], }; } }
  • The server.tool() registration of the get_document_info tool, including name, description, empty input schema {}, and the handler function.
    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)}`, }, ], }; } } );
  • Empty input schema for the get_document_info tool (no parameters required).
    {},
  • Part of FigmaCommand type union, defining 'get_document_info' as a valid command sent to the Figma plugin.
    | "get_document_info"

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/arinspunk/claude-talk-to-figma-mcp'

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