Skip to main content
Glama

Create CSS custom property

card_builder_create_css_custom_property

Register a typed CSS @property for card styles so styles can reference animatable variables, such as a themeable accent color, by name.

Instructions

Register a new CSS custom property (@property) for use in card styles.

Sends the four fields to card_builder/css_custom_properties/create, which assigns a new id server-side (confirmed in upstream storage.py: every create path generates a fresh uuid4) — repeating this call registers a second, distinct property rather than updating the first.

Use when: defining an animatable/typed CSS variable (e.g. a themeable accent color) that card styles can reference by name. Returns: the created CSS-custom-property dict, including its new id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCSS custom property name, e.g. '--card-accent-color' (with the leading '--').
syntaxYesCSS @property syntax descriptor, e.g. '<color>' or '<length>'.
inheritsNoWhether the property inherits from parent elements, per the CSS @property spec. Defaults to false.
initial_valueYesInitial value matching `syntax`, e.g. '#2196f3' for a <color>.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.25.1
    • addedInput schema / properties / inherits / description
      Added value: +"Whether the property inherits from parent elements, per the CSS @property spec. Defaults to false."
    • addedInput schema / properties / initial_value / description
      Added value: +"Initial value matching `syntax`, e.g. '#2196f3' for a <color>."
    • addedInput schema / properties / name / description
      Added value: +"CSS custom property name, e.g. '--card-accent-color' (with the leading '--')."
    • addedInput schema / properties / syntax / description
      Added value: +"CSS @property syntax descriptor, e.g. '<color>' or '<length>'."
  2. Addedv0.18.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=false, so the description goes further by spelling out the practical consequence of non-idempotency (a repeat call creates a second property) and the server-side id assignment. It doesn't cover auth/permission needs, but the behavioral disclosure is solid beyond the hints.

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?

Purpose is front-loaded and the when-to-use and returns notes are well ordered. The parenthetical citing the upstream storage.py uuid4 implementation is slightly gratuitous detail that adds length without much agent-facing value.

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?

With annotations covering safety and an output schema covering return values, the description supplies the remaining essentials: purpose, when to use it, and the non-idempotent creation behavior. Nothing an agent needs in order to call it correctly is missing.

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 description coverage is 100%, so all four parameters (name, syntax, inherits, initial_value) are already documented in the schema. The description only alludes to 'the four fields' without adding syntax, format, or validation meaning beyond the schema, so the baseline 3 applies.

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 and resource — 'Register a new CSS custom property (@property)' — and names the backing endpoint. It also clarifies it is a create, not an update ('registers a second, distinct property rather than updating the first'), which distinguishes it from the list/delete/update CSS-property siblings.

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?

Gives a concrete when-to-use trigger: 'defining an animatable/typed CSS variable (e.g. a themeable accent color) that card styles can reference by name.' There are no explicit exclusions or named alternative tools, but the non-idempotency note steers usage clearly.

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

Deploy Server

Other Tools