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. Presets work on every plan; a custom theme needs the Pro plan:

  • 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

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. Changed9 schema fields changed
    • addedInput schema / properties / formId / minLength
      Added value: +1
    • changedInput schema / properties / theme / properties / button / properties / radius / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / theme / properties / choice / properties / borderWidth / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / theme / properties / choice / properties / radius / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / theme / properties / foundation / properties / fontSize / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / theme / properties / foundation / properties / radius / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / theme / properties / input / properties / borderWidth / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / theme / properties / input / properties / radius / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / theme / properties / rating / properties / size / type
      Previous value: -"number"New value: +"integer"
  2. 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 (which only say non-readOnly, non-destructive), the description discloses plan gating (presets on every plan, custom theme needs Pro), that light/dark themes are stored independently, that preset/mode mismatches are rejected with valid ids, and that omitted fields are preserved on merge. This is substantial behavioral context the annotations do not carry.

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 opening sentence is well front-loaded and the bullet structure maps cleanly to the three invocation modes. There is mild redundancy in repeating the load_skill("form-themes") pointer twice, and the section list is a long trailing sentence, but overall it is dense rather than padded.

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 5-parameter mutation tool with no output schema and deep nested objects, the description covers the decision space thoroughly and defers the preset catalog to load_skill. The only gap is that it never says what the tool returns or how success/failure is reported.

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 coverage is 100%, so baseline is 3, but the description adds real semantics: mutual exclusivity of preset and theme, mode-matching for presets, reset semantics of theme:null, and the seven section names (foundation, input, choice, rating, button, question, feedback) with their purpose. It stops short of explaining every leaf field, but the schema already covers those.

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 states specific verbs (set, patch, reset) applied to a named resource (a form's theme) and immediately scopes it to one color mode. An agent can distinguish it from the formTheme_get sibling without opening any schema.

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?

It gives explicit when-to-use guidance: prefer preset over hand-built hex, custom theme requires Pro, call twice for light+dark coverage, pass exactly one of preset/theme. It also explains the three theme invocation shapes (null reset, partial patch, full replace), leaving nothing to inference.

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.