Skip to main content
Glama

Get Layout

get_layout

Extract a Figma frame as a compact layout tree with flexbox properties, text fonts, hex colors, and pixel sizes to build a matching web page.

Instructions

One frame as a compact layout tree: auto layout as flexbox (direction, gap, padding, justify, align), text with its font, colours as hex, sizes in px. Build the page from this.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "file_url": "<file_url>",
      "frame_id": "<frame_id>"
    },
    "name": "get_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_urlYes
frame_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. Calling it 'compact' usefully hints the tree is normalized/possibly lossy rather than a full fidelity dump, but it says nothing about read-only safety, permissions, failure modes when a frame is missing, or any size/depth limits.

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?

Three tight sentences that front-load what is returned and its units, then close with a usage cue. The closing 'Build the page from this' is slightly vague but earns its place as the only usage signal present.

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?

An output schema exists, so return values need not be spelled out, and the description correctly focuses on the result shape. For a two-parameter tool with no annotations, however, the total absence of parameter guidance leaves a real gap before an agent can call it confidently.

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?

Both required parameters (file_url, frame_id) have 0% schema description coverage, and the description never mentions them. It gives no hint about the expected URL form or that frame_id likely comes from list_frames, so the meaning gap is left entirely unfilled.

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 states a specific resource and result: 'One frame as a compact layout tree', then details the contents (flexbox auto layout, text with font, hex colours, px sizes). That contrasts implicitly with image-rendering siblings like render_frame, but no sibling is named, so differentiation is inferred rather than explicit.

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

Usage Guidelines3/5

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

'Build the page from this' only implies the design-to-code use case; there is no statement of when to prefer this over list_frames, render_frame, or get_tokens, and no prerequisites or exclusions are given.

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