Skip to main content
Glama

Upload a theme

upload_theme
Destructive

Uploads your own theme stylesheet (a custom theme, level 3) and returns its theme_id, the check results and warnings with fixes. Use it on any of your decks with theme "custom:<theme_id>" in create_deck or edit_deck, then preview to see it. Only broken or unsafe CSS is refused (selectors outside [data-theme="custom"], @import, outside url()s, !important, position:fixed, scripts); contract gaps, contrast and sizes are warnings. Send theme_id with a stylesheet to update it, theme_id alone to read it, nothing to list your themes, delete: true to remove one, start_from ("paper", "field", …) alone for one of our themes' stylesheet to start from, from_url (a company's website or a PDF link) for a ready stylesheet in that brand's colours, fonts and logo.

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": "upload_theme"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoA name for the theme, for your own reference.
deleteNotrue deletes theme_id. Decks using it show on Paper.
from_urlNoA company's website, or a PDF on a public https link (brand guidelines, a report). Alone (or with start_from, default paper), it reads the brand's colours, fonts and logo, with no AI, and returns them with a ready stylesheet: start_from's theme with those values written in. The logo, if one is found, is stored as an image and already in the stylesheet. Check it, then send the stylesheet back with a name. Nothing else is saved.
theme_idNoReplace this theme (every deck using it changes too). Alone, it returns the theme and its stylesheet.
start_fromNoOne of our eight themes (paper, haze, stage, field, brief, studio, classroom, brand). Alone, it returns that theme's whole stylesheet, already written for [data-theme="custom"], with every token set: change its values and rules, then send it back as stylesheet. Nothing is saved.
stylesheetNoThe theme's CSS, written to the theme contract (get_guide topic "levels", Custom themes): every selector starts with [data-theme="custom"]; the root block sets the tokens. Up to 100 KB.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true; the description earns credit by specifying what is and isn't refused (broken/unsafe CSS refused vs. contract gaps, contrast and sizes treated as warnings), that updating a theme_id silently changes every deck using it, that from_url uses no AI and persists only the logo, and the 100 KB limit. It gives no detail on the shape of the returned check results/warnings or on idempotency/rollback after a destructive delete, so it goes beyond annotations without fully covering behavior.

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

Conciseness3/5

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

The first sentence is well front-loaded with purpose and return values, and every subsequent clause carries real information. However, the second sentence is a single sprawling run-on packing six modes and a parenthetical refusal list; splitting it into a short mode list would make the same content far easier for an agent to parse.

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 six-optional-parameter, multi-mode tool with no output schema, the definition covers the important ground: what is returned (theme_id, checks, warnings with fixes), how each parameter combination behaves, what is persisted versus transient, and the safety envelope. The remaining gap is the error/report format an agent must interpret from the returned checks.

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?

Schema coverage is 100% and the per-parameter descriptions are already unusually rich (from_url, start_from and stylesheet are documented in depth in the schema itself), so the baseline is 3. The description's main added value is the cross-parameter mode dispatch table, which no single schema field conveys, but it largely restates the same per-parameter text rather than adding syntax or format detail.

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 opening sentence states a specific verb and resource ("Uploads your own theme stylesheet ... returns its theme_id, the check results and warnings") and explicitly routes downstream use to create_deck/edit_deck with "custom:<theme_id>", which an agent can distinguish from siblings without opening a schema. It loses a point because the tool is actually a multiplexer (upload/update/read/list/delete/start_from/from_url) while the title says only "Upload a theme", so the stated purpose undersells the surface.

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?

The description gives concrete mode-selection rules: theme_id+stylesheet to update, theme_id alone to read, nothing to list, delete: true to remove, start_from alone to bootstrap, from_url for a brand-derived stylesheet. It also names the follow-on tools (create_deck, edit_deck, preview) that consume the result. What it lacks is a when-not-to-use statement or a pointer to a sibling (e.g. get_guide) for reading theme contracts instead of calling this tool.

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.