Skip to main content
Glama

figma_set_session_defaults

Idempotent

Set design system session defaults: default text fill color, font family, and enforcement mode. Call once after preload_styles to prevent raw black text and enforce DS compliance in strict or permissive mode.

Instructions

Set session-level defaults for DS compliance. Call once at build start after preload_styles. textFillStyleKey sets the default fill for all text nodes that have no explicit fill — prevents raw #000000 black. Pass the DS text-primary color style key. textFillVariable is the alternative for DSs that use variables instead of color styles (e.g., community libraries). Pass one of textFillStyleKey or textFillVariable — not both. fontFamily sets the default font family for all text nodes (default: "Inter"). Set this if your DS uses a different font (e.g., "Roboto", "SF Pro"). dsMode controls DS enforcement: "strict" (default) requires all visual properties to use DS variables/styles — raw hex, raw px, raw fonts are rejected. "permissive" allows raw fallbacks for component-only DSs without published tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textFillStyleKeyNoDS color style key for text-primary (default text fill). Use for DSs with published color styles.
textFillVariableNoDS variable path for text-primary (e.g., "text/primary"). Use for DSs that use variables instead of color styles (community libraries).
fontFamilyNoDefault font family for text nodes (e.g., "Inter", "Roboto", "SF Pro"). Defaults to "Inter" if not set.
dsModeNoDS enforcement mode. "strict" (default): all fills, strokes, spacing, radius, and typography must use DS variables/styles — raw values are rejected with an error. "permissive": raw fallbacks allowed for DSs without published tokens. Default: "strict".
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false. Description adds behavioral details: prevents raw black, defaults to 'Inter', dsMode enforcement behavior. No contradictions. Could be improved by mentioning side effects or error behavior, but sufficient.

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

Conciseness5/5

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

Well-structured with a clear overall purpose statement followed by parameter-specific explanations. Every sentence adds value, no redundancy, and front-loaded with call action.

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?

Covers all parameters, describes when to call, and explains the tool's role in DS compliance. No output schema exists, but return values are not critical for a side-effect setup tool. The description provides sufficient context for an agent to use it correctly.

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?

Schema coverage is 100%, but description adds crucial context: textFillStyleKey 'prevents raw #000000 black', textFillVariable 'alternative for DSs that use variables', fontFamily 'Set this if your DS uses a different font', dsMode explains strict vs permissive with examples. This goes far beyond the schema descriptions.

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?

Explicitly states 'Set session-level defaults for DS compliance. Call once at build start after preload_styles.' Clearly distinguishes from sibling tools, which are node-level or specific actions, whereas this is a session-level setup.

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?

Provides clear when to call ('once at build start after preload_styles'), and parameter usage guidelines (e.g., 'Pass one of textFillStyleKey or textFillVariable — not both'). Although it does not mention alternatives, the context of a setup tool makes usage straightforward.

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/miapre/mimic-ai'

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