Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)
                  }`,
              },
            ],
          };
        }
      }
    );
  • 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).
    {},

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.0.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observed

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Get' implies a read operation, but the description does not state whether there are side effects, authentication requirements, or any details about what 'detailed information' includes or how it is returned.

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, concise sentence with no filler. It front-loads the action and resource clearly, earning its place without redundancy.

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

Completeness3/5

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

For a parameterless tool, the description is minimally adequate, but it leaves the agent without a clear sense of what 'detailed information' means or what the output will contain. With no output schema and no annotations, more specificity about the returned content would make it complete.

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, so the schema already fully covers this dimension. The description adds no parameter semantics, but none are needed for a parameterless tool; the baseline of 4 is appropriate.

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 verb 'get' and the resource 'current Figma document,' which identifies the tool's function. However, 'detailed information' is vague and does not specify what is included, and it doesn't explicitly distinguish itself from sibling tools like get_node_info or read_my_design.

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?

There is no guidance on when to use this tool versus alternatives such as get_selection, get_node_info, or read_my_design. The description gives a general purpose but no context, exclusions, or selection criteria, leaving the agent to infer usage.

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