Skip to main content
Glama
mastergo-design

MasterGo Magic MCP

Official

mcp__getDesignSections

Fetch design sections overview or per-section DSL from MasterGo. Use without index to list sections with bounding boxes; use with sectionIndex to get detailed DSL for code generation.

Instructions

[PRIMARY] This is the main tool for all designs. Operates in TWO modes:

Mode 1 — Get layout overview (sectionIndex NOT provided): Returns the list of all sections with id, name, type, nodeCount, and a page-absolute bounding box (x, y, width, height) for each section, plus totalSections and totalNodes. Also returns rootMetadata (root layer width/height/name/type/fill) when available. Use this FIRST to understand the design scope. The per-section bbox tells you exactly where each section sits inside the root container — use it for absolute positioning when generating code. Example: { "fileId": "123", "layerId": "456:789" }

Mode 2 — Get section DSL (sectionIndex provided): Returns the full DSL for ONE specific section.

  • PATH nodes have their svgHtml stripped. After fetching ALL sections, call mcp__getDesignSvgs to retrieve them.

IMPORTANT workflow:

  1. First call WITHOUT sectionIndex to get the section list with node counts.

  2. Then call WITH sectionIndex=0, sectionIndex=1, ... up to totalSections-1.

  3. You MUST fetch ALL sections. Do NOT skip any section index.

  4. CRITICAL: Fetch sections in BATCHES of 3-5 at a time. Do NOT request all sections simultaneously — too many concurrent requests will cause timeouts. Send 3-5 sectionIndex calls, wait for all results, then send the next batch.

  5. After fetching all sections, call mcp__getDesignSvgs to get SVG icons.

  6. Generate the complete HTML with all SVG data.

DO NOT call mcp__getDsl after completing this workflow — all data is already provided. If this tool returns an error (e.g. old server), fall back to mcp__getDsl.

You can provide either:

  1. fileId and layerId directly, or

  2. a short link (like https://{domain}/goto/LhGgBAK)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileIdNoMasterGo design file ID. Required if shortLink is not provided.
formatNoOutput format for design data. Defaults to json. - json — default; useful when piping output into tools that expect JSON. - yaml — fewer tokens than JSON for typical designs. - tree — experimental compact format. Structural keys (id, name, type) are encoded positionally on each node line, and style values stay deduplicated in a globalVars block. Designs with heavy style reuse see the largest token savings.
layerIdNoRoot layer ID of the design. Required if shortLink is not provided.
shortLinkNoShort link (like https://{domain}/goto/LhGgBAK).
sectionIndexNo0-based section index. If omitted, returns the section list only. If provided, returns full DSL for that specific section.
sourceLayerIdNoSource layer ID from URL parameter source_layer_id. When provided, use this instead of layerId for all queries.
Behavior5/5

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

With no annotations provided, the description fully carries the burden. It discloses behavior such as two modes, stripping svgHtml from PATH nodes, batching requirements, timeout risks, and error handling. No contradictions or omissions are present.

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?

The description is well-structured with clear section headers, bullet points, and examples. It is verbose but every sentence adds value. Minor redundancy (e.g., repeated emphasis on batching) could be trimmed, but overall efficient for the information density.

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

Completeness5/5

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

Given the complexity (6 parameters, multi-step workflow, no output schema), the description covers all necessary context: input modes, workflow, batching, fallback, and format options. It leaves no ambiguity about how to use the tool effectively.

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

Parameters5/5

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

Despite 100% schema coverage, the description adds significant meaning beyond the schema. It explains the effect of omitting/providing sectionIndex, the meaning of each format option (json, yaml, tree), and provides usage examples. This greatly aids an agent in using parameters correctly.

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

Purpose5/5

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

The description clearly states it is the main tool for designs and distinguishes two modes (layout overview vs section DSL). It differentiates from siblings by explicitly mentioning fallback to mcp__getDsl and directing to mcp__getDesignSvgs for SVGs, avoiding confusion.

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

Usage Guidelines5/5

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

The description provides explicit, step-by-step usage guidelines: first call without sectionIndex, then fetch all sections in batches of 3-5, and not to call mcp__getDsl after. It also specifies when to fall back to mcp__getDsl on error, giving clear context for when to use this tool versus alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mastergo-design/mastergo-magic-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server