Skip to main content
Glama
arinspunk

Claude Talk to Figma MCP

by arinspunk

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"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Get detailed information' implies a read-only operation, it doesn't specify what 'detailed information' includes, whether it requires authentication, if there are rate limits, or what format the information returns. This is inadequate for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that immediately conveys the core purpose without any wasted words. It's appropriately sized for a zero-parameter tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' includes, how the information is structured, or what context is needed (e.g., must a document be open?). Given the complexity of Figma documents and lack of structured output documentation, more detail is warranted.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately focuses on the tool's purpose rather than parameters, earning a high baseline score for this dimension.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get detailed information') and target resource ('about the current Figma document'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_node_info' or 'get_nodes_info', which also retrieve information about document elements.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_node_info' or 'get_nodes_info'. It doesn't mention prerequisites, context requirements, or any explicit when/when-not scenarios, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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