Skip to main content
Glama

Inspect the document

inspect_document
Read-onlyIdempotent

Retrieve a FigCraft document's full state as JSON, including layer tree, pages, styles, variables, images, selection, and undo history, for inspection or debugging.

Instructions

The document as JSON: name, path, dirty flag, current page, selection, the layer tree, styles, variables, images, colour profile, the text being edited and the undo history.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNo
allPagesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds a useful preview of the payload (undo history, layer tree, colour profile), but omits the behavioral caveats that matter here — that the full undo history and layer tree can make this a very heavy response, and that output size depends on the depth/allPages controls.

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 front-loaded sentence that leads with what the tool returns and then enumerates the fields. It is a sentence fragment rather than a full clause, but nothing is padded or redundant.

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?

With no output schema, the description correctly carries the return-value burden and does so reasonably. However, for a tool whose output is a whole document tree plus undo history, the omission of any guidance on scoping via depth/allPages and on response size leaves the agent unable to control or anticipate the call's cost.

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

Parameters2/5

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

Schema description coverage is 0%: neither 'depth' (0-64) nor 'allPages' is documented anywhere. The description never mentions them, so an agent cannot infer the default depth, whether sublayers are expanded, or whether only the current page is returned — the two knobs that determine the shape and size of the result are entirely unexplained.

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 names the resource (the document) and enumerates exactly what the JSON contains — name, path, dirty flag, page, selection, layer tree, styles, undo history — so an agent knows precisely what comes back. It does not differentiate from close siblings such as get_metadata, get_node, or get_design_context, which also return document-derived state.

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 statement of when to call this versus get_metadata, get_node, get_design_context, or inspect_ui, all of which overlap in scope. No prerequisites, no note on cost or when a narrower tool is preferable.

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