docs: fix get_metadata page-enumeration guidance (returns only the active page)#75
Open
jkRaccoon wants to merge 1 commit into
Open
docs: fix get_metadata page-enumeration guidance (returns only the active page)#75jkRaccoon wants to merge 1 commit into
jkRaccoon wants to merge 1 commit into
Conversation
`get_metadata` with no nodeId returns only the currently-active page, not the document's full top-level page list. The response header still reads "Listing the top-level pages of the document", so the claim in this gotcha (and in the tool's own description) is misleading: an agent that trusts it makes a wasted call every time it needs to enumerate pages, then falls back to `use_figma` anyway. Verified 2026-07-10 against a 9-page file — the call returned a single page. Rewrite the section to state the actual behavior and point to `use_figma` + `figma.root.children` as the only reliable way to enumerate pages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
get_metadatawith nonodeIdis documented — both in thisfigma-usegotcha and in the tool's owndescription— as returning the document's full list of top-level pages. In practice it returns only the currently-active page.Reproduction (2026-07-10)
Called
get_metadatawith only afileKey(nonodeId) against a file that has 9 pages. Full response:Only the active page (
COVER) came back; the other 8 pages (login, project, estimate, …) were omitted.figma.root.childrenviause_figmareturns all 9.Why it matters
The tool
descriptionsays:An agent that trusts this makes a call expecting all pages, receives one, and has to fall back to
use_figma+figma.root.childrenanyway — a wasted tool call (and tokens) on every session that needs full-document page enumeration.This PR
Rewrites the gotcha to describe the actual behavior and points to
use_figma+figma.root.childrenas the only reliable enumeration path.Also — server-side fix requested
This PR can only fix the guide doc. The
get_metadatatooldescriptionitself (server-side, not in this repo) carries the same incorrect claim, and the response header ("Listing the top-level pages of the document") is likewise misleading. Please also either:get_metadatawith nonodeIdactually return all top-level pages, ordescriptionand the response header to say it returns only the active page and point touse_figmafor full enumeration.Filing this note here because Issues are disabled on this repo — happy to move it wherever the team prefers.