Skip to main content
Glama

Get Design Context

get_design_context
Read-onlyIdempotent

Load design system context from a Figma file before generating UI code so output uses correct tokens, reuses components, and follows established patterns.

Instructions

Load design system context (tokens, components, patterns, rules) from a Figma file.

Call this before generating UI code to ensure the output uses correct design tokens, reuses existing components, and follows established patterns.

Args:

  • figma_file_key (string): The Figma file key

  • task_description (string, optional): Task context for relevance filtering

  • sections (string[], optional): Specific sections to include (default: all)

  • refresh (boolean): Force re-fetch from Figma (default: false)

Returns: Markdown document with design system tokens, components, patterns, and rules.

Examples:

  • "Load full design system" -> get_design_context with just figma_file_key

  • "Get context for a login form" -> get_design_context with task_description: "login form"

  • "Refresh tokens only" -> get_design_context with sections: ["tokens"], refresh: true

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": {
      "figma_file_key": "<figma_file_key>"
    },
    "name": "get_design_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
refreshNoForce cache invalidation and re-fetch from Figma API
sectionsNoSpecific sections to include. Omit to include all sections.
figma_file_keyYesThe Figma file key
task_descriptionNoOptional task context for relevance filtering, e.g. 'build a login form'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds real behavior beyond that: a caching layer with 'Force cache invalidation and re-fetch from Figma API' on refresh, and it states the return is a Markdown document. It stops short of describing cost, latency, or what an empty/incomplete design system returns.

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

Conciseness3/5

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

The structure is well front-loaded — purpose, then when-to-call, then Args/Returns/Examples — but the Args block duplicates the fully described input schema and the Returns line duplicates what a reader learns from the body. The Examples section earns its place; the parameter re-listing does not.

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

Completeness4/5

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

For a four-parameter read-only fetch with no output schema, the definition covers purpose, prerequisite timing, caching behavior, and return format, which is enough to call it correctly. The main residual gap is missing guidance on how this differs from token-extraction siblings.

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 description coverage is 100%, so the Args block largely restates what is already in the schema. The value-add is modest: the worked examples show how the optional parameters combine ('sections: ["tokens"], refresh: true') and clarify that task_description drives relevance filtering, but no semantics beyond the schema are introduced.

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 opening sentence states a specific verb and resource — 'Load design system context (tokens, components, patterns, rules) from a Figma file' — and enumerates the content types covered. It does not explicitly distinguish itself from sibling tools such as extract_tokens or extract_styles, which look superficially similar, so an agent must infer the boundary.

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

Usage Guidelines4/5

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

It gives an explicit trigger condition: 'Call this before generating UI code to ensure the output uses correct design tokens, reuses existing components, and follows established patterns.' That tells the agent when to use it, but there is no when-not guidance and no named alternative for a reader who is unsure whether extract_tokens is the better fit.

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