Skip to main content
Glama

sb_theme

Read or update a site's color palette, type scale, presets, responsive breakpoints, and locale so one token change repaints every page.

Instructions

The site's palette and type scale — the layer every element's style preset resolves from, so one token repaints every page at once. Call it with nothing to read what the site actually has. colors and text_styles PATCH the saved document: what you do not name is kept, and so does presets (a preset's own literal outranks the text style). A mobile/tablet/laptop object writes that breakpoint. locale sets the site's language (settings.locale, what is served from) — site-wide, every other setting kept.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sb_theme"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorsNoToken id -> CSS colour, e.g. { "heading": "#2E2A3B", "primary": "#E8557A" }
localeNoSite language tag, e.g. "vi" or "en"
dry_runNo
presetsNoPreset id -> declarations, e.g. { "heading-default": { "fontFamily": "Inter" } }
site_idNo
text_stylesNoSlug -> declarations, e.g. { "heading-3": { "fontSize": "20px", "mobile": { "fontSize": "18px" } } }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.98.3
    • addedInput schema / properties / presets
      Added value: +{
      +  "additionalProperties": {
      +    "additionalProperties": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "additionalProperties": {
      +            "type": "string"
      +          },
      +          "type": "object"
      +        }
      +      ]
      +    },
      +    "type": "object"
      +  },
      +  "description": "Preset id -> declarations, e.g. { \"heading-default\": { \"fontFamily\": \"Inter\" } }",
      +  "type": "object"
      +}
    • addedInput schema / properties / text_styles / additionalProperties / additionalProperties / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": {
      +      "type": "string"
      +    },
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / text_styles / additionalProperties / additionalProperties / type
      Removed value: -"string"
    • changedInput schema / properties / text_styles / description
      Previous value: -"Text style slug -> base declarations, e.g. { \"h1\": { \"fontSize\": \"48px\" } }"New value: +"Slug -> declarations, e.g. { \"heading-3\": { \"fontSize\": \"20px\", \"mobile\": { \"fontSize\": \"18px\" } } }"
  2. Changed1 schema field changedv0.69.0
    • addedInput schema / properties / locale
      Added value: +{
      +  "description": "Site language tag, e.g. \"vi\" or \"en\"",
      +  "type": "string"
      +}
  3. Addedv0.32.0

TDQS

A3.6/5.0
Behavior4/5

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

It discloses important mutation semantics beyond the annotations: PATCH behavior, preservation of unnamed values, preset precedence over text styles, breakpoint-specific writes, and site-wide locale scope. It does not explain the dry_run flag or return behavior, which are meaningful gaps for a mutation tool.

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 description is compact and front-loads the core concept before explaining field behavior. Some phrasing is awkward and compressed, such as the presets clause and the breakpoint sentence, which slightly reduces immediate clarity.

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

Completeness3/5

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

Given the nested object schema, no output schema, and only minimal annotations, the description covers the main mutation semantics well. But it omits dry_run, site_id context, and any indication of what a read returns, leaving the definition only partially complete for an agent to invoke confidently.

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?

The description adds useful meaning for colors, text_styles, presets, locale, and breakpoint objects, including merge and precedence behavior. With 67% schema description coverage, it still leaves site_id and dry_run undocumented in both schema and description, which matters for correct invocation.

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 description clearly identifies the resource as the site's palette and type scale, and explains its role as the layer that element style presets resolve from. It does not explicitly differentiate from sibling tools such as sb_set or sb_traits_for, so it stops short of a 5.

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

Usage Guidelines3/5

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

It says to call the tool with no arguments to read the current theme, and explains that colors/text_styles/presets PATCH the saved document. However, it gives no explicit guidance on when to use this tool versus alternatives, nor any when-not conditions.

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