Skip to main content
Glama

Update theme

update_theme
Destructive

Update theme variables (colors, typography, spacing) and publish them to the live site.

Merge semantics (RFC 7396 JSON Merge Patch):

  • Fields you send override the server's values.

  • Fields you omit are preserved unchanged.

  • To explicitly clear a field, send it as null.

  • Arrays (spacing, accentScale, grayScale) are REPLACED wholesale: send the full array you want.

Publishing: by default the merged theme is published immediately (live site restyles, page caches purge). Pass publish=false to only stage a draft the user can review and publish from the theme editor. If the theme editor already holds an unpublished draft, the change is layered on that draft, so publishing also publishes it. With publish=false the result's draftVariables is what was saved and variables is what the site still renders.

Call get_theme first to see the current values. Every color value must be a CSS color (a hex value, rgb(), hsl(), oklch() or color(), a CSS color name, or var(--name)); a change with any other color is refused before anything is saved.

Supports appearance, radius, scaling, font (defaultFontFamily, headingFontFamily), color (accent, background, gray, accentScale, grayScale, accentSurface, accentContrast), spacing (array), fontSize, fontWeight, lineHeight, headingLineHeight, letterSpacing, container, icon (style: regular, thin, light, bold, fill or duotone; the style the editor's icon picker, suggestions and new sections use for new icons; existing icons keep theirs and nothing on the live site changes).

Input Schema

NameRequiredDescriptionDefault
publishNoPublish after saving so the change is live on the site (default true). false stages a draft only.
themeIdYesThe theme ID
projectIdYesThe project ID
variablesYesTheme variables to update. Send only the fields you want to change; omitted fields are preserved. Pass nested objects like { color: { accent: '#FF5C00' } } to update specific tokens without affecting others.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations flag destructive=true and openWorld=true, and the description goes well beyond them: merge patch semantics, null-to-clear, wholesale array replacement, immediate cache purge on publish, draft layering, and pre-save color validation refusal. This also contextualizes the destructive hint by explaining that omitted fields are preserved.

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?

Front-loaded one-line purpose followed by labeled sections for merge semantics and publishing; well organized. Slightly dense, and the long list of supported variable tokens largely restates schema fields, but the structure keeps it usable.

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?

No output schema exists, yet the description explains what draftVariables and variables contain in the result, and covers validation, publishing side effects, and draft interaction. Complete enough for correct invocation of a complex nested mutation.

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%, so the baseline is 3, but the description adds real meaning: RFC 7396 merge behavior, null-clearing, arrays replaced not merged, publish semantics, valid color formats, and the icon style enum's effect on editor pickers vs existing icons. This is substantially more than the schema conveys.

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?

States a specific verb (update) and resource (theme variables: colors, typography, spacing) plus the key side effect (publish to live site). The sibling get_theme is explicitly named as the read counterpart, so an agent can route without opening a 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?

Explicitly instructs 'Call get_theme first to see the current values,' and defines the publish=true vs publish=false branch with the consequence of each. Exclusions and alternatives are stated rather than implied.

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.