Skip to main content
Glama

Set form theme

formTheme_set

Set, patch, or reset a form's theme for one color mode. Light and dark themes are stored independently — call twice for full coverage. Use load_skill("form-themes") for the preset catalog, full schema, and design guidelines.

Prefer a built-in preset over hand-building hex — pass preset and skip theme:

  • preset: "<id>" → apply a named preset (e.g. "dracula"). The preset's mode must match mode; mismatches are rejected with the valid ids. See load_skill("form-themes") for the catalog.

Otherwise supply theme directly (omit preset):

  • theme: null → reset (merge ignored).

  • theme: <partial> + merge: true (default) → patch existing theme; omitted sections/fields preserved.

  • theme: <full 7-section object> + merge: false → replace entirely.

Pass exactly one of preset or theme. Sections: foundation (page bg/text/font/radius), input, choice (normal + selected), rating, button, question (title/desc/asterisk), feedback (error). Colors hex (#rrggbb).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesColor-mode theme to operate on. Light and dark themes are stored independently.
mergeNoWhen true (default), `theme` is treated as a patch over the existing theme. When false, `theme` replaces entirely and must contain all 7 sections. Ignored when `theme` is null (reset) or when `preset` is used.
themeNoFull theme object (for replace) OR partial (for patch). Pass `null` to reset to default. Sizes are pixels. Use load_skill("form-themes") for design guidelines.
formIdYesThe form ID
presetNoBuilt-in preset id for this mode (e.g. "dracula"). Mutually exclusive with `theme`.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses mutation-specific behavior that annotations cannot convey: light and dark are stored independently requiring two calls, preset/mode mismatch is rejected with valid ids returned, theme:null resets and ignores merge, and merge:false demands a full 7-section object. These are precise operational semantics.

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?

Front-loaded purpose followed by tightly scoped bulleted rules; each bullet covers a distinct dispatch decision (preset, reset, patch, replace) with no redundancy. Length is justified by the number of mutually exclusive modes.

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?

For a 5-parameter mutation tool with no output schema and rich structured annotations, the description covers everything an agent needs: mode independence, exclusivity rules, reset/patch/replace semantics, and a pointer to load_skill for the preset catalog and design guidance.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds genuine meaning: the mutual exclusivity of preset and theme, the default-true behavior of merge, and the semantics of theme:null vs partial vs full. It also enumerates the seven sections and their contents, which the schema only implies structurally.

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 opening sentence names a precise verb set (set/patch/reset), the exact resource (a form's theme), and the scope (one color mode), and distinguishes itself from the sibling formTheme_get by describing mutation rather than retrieval. An agent can act on it without opening the schema.

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 explicit conditional routing: prefer a preset and skip theme, pass exactly one of preset or theme, and use load_skill("form-themes") for the catalog. It does not, however, name when to choose this tool over adjacent tools (e.g. formTheme_get for reading), so it stops short of full alternative routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.