Skip to main content
Glama

get_document

Lists all pages and top-level nodes of the current or specified Figma file, so you can inspect document structure before reading, building, or editing designs.

Instructions

List pages and the top-level nodes of the current (or given) page.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoTarget file (fileKey, id or name). Defaults to the most recently active file.
pageIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full burden. It implies a read operation and hints at a fallback to the 'current' page, but says nothing about read-only safety, permissions, depth of the node tree returned, pagination, or what happens if file/pageId are omitted or invalid.

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

Conciseness4/5

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

A single short sentence with the scope stated up front and no filler. It loses a point because the parenthetical '(or given)' and the compound 'pages and top-level nodes' make it slightly harder to parse than it needs to be.

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?

This is a simple read tool with two optional parameters and no output schema, so the description is the only place to explain what comes back. It never clarifies return shape, whether the node list is flat or nested, or limits on size — leaving the core ambiguity of the tool unresolved.

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

Parameters3/5

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

Schema coverage is 50%: file is documented in the schema, while pageId has no description there. The phrase 'current (or given) page' partially compensates by implying pageId defaults to the active page, but it adds no format, type, or identifier guidance for that parameter.

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

Purpose3/5

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

The description names a resource (pages and top-level nodes) and a verb (list), but the phrasing 'List pages and the top-level nodes of the current (or given) page' is ambiguous about whether pages or nodes are the primary return, and it does nothing to distinguish the tool from siblings like get_layout_tree, get_node, or get_components.

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 call this versus the many sibling retrieval tools, and no mention of when the default (most recently active file/current page) behaves differently from explicit arguments. The agent must infer usage from the name alone.

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