Skip to main content
Glama

Generate component style alternatives

generate_component_styles
Read-only

[Admin] JobMojito's model proposes a few clearly different looks for one block type, from the block's content (sent as block) and the brand's CSS variables. Returns name, description and CSS ready for save_component_style. Nothing is stored; a look is kept only once save_component_style saves it. get_component_style_guide gives the selectors and variables for writing a style by hand. At most 30 requests an hour per person.

Every argument in full, with examples: get_tool_reference.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "portal": "<portal>",
      "block_type": "<block_type>"
    },
    "name": "generate_component_styles"
  }
}

Input Schema

NameRequiredDescriptionDefault
blockNoThe block as it is in page content (its title, text, items, layout), so the looks fit what it holds.
countNoHow many looks, 1 to 4. Default 3.
portalYes`interview` (career and interview portal) or `consumer` (coaching portal).
brand_idNoA sub-brand; leave it out for the main brand.
base_lookNoA look to build on: its `name`, `description` and `css` as an earlier answer gave them.
llm_modelNoYour model id, e.g. "claude-opus-4-8"; "unknown" if unsure. For analytics.
block_typeYesThe kind of block to design for.
instructionNoWhat the person wants, in their words.
merchant_idNoOptional company. Admins and sub-merchant operators only; other callers always use their token's company.
earlier_looksNoLooks this session has already shown (their `name` and `description` from earlier answers).
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.
earlier_instructionsNoA later round of the same session: what the person asked before, oldest first. The endpoint keeps nothing between calls, so send them every time.

Output Schema

NameRequiredDescriptionDefault
warningsYes
block_typeYes
alternativesYes
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / base_look
      Added value: +{
      +  "description": "A look to build on: its `name`, `description` and `css` as an earlier answer gave them.",
      +  "properties": {
      +    "css": {
      +      "maxLength": 50000,
      +      "minLength": 1,
      +      "type": "string"
      +    },
      +    "description": {
      +      "maxLength": 300,
      +      "type": "string"
      +    },
      +    "name": {
      +      "maxLength": 80,
      +      "minLength": 1,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "css"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / earlier_instructions
      Added value: +{
      +  "description": "A later round of the same session: what the person asked before, oldest first. The endpoint keeps nothing between calls, so send them every time.",
      +  "items": {
      +    "maxLength": 500,
      +    "type": "string"
      +  },
      +  "maxItems": 8,
      +  "type": "array"
      +}
    • addedInput schema / properties / earlier_looks
      Added value: +{
      +  "description": "Looks this session has already shown (their `name` and `description` from earlier answers).",
      +  "items": {
      +    "properties": {
      +      "description": {
      +        "maxLength": 300,
      +        "type": "string"
      +      },
      +      "name": {
      +        "maxLength": 80,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 16,
      +  "type": "array"
      +}
  2. Changed9 schema fields changed
    • removedInput schema / properties / block_type / example
      Removed value: -"hero"
    • changedInput schema / properties / brand_id / description
      Previous value: -"A sub-brand; leave it out for the main brand. Its CSS variables shape the looks."New value: +"A sub-brand; leave it out for the main brand."
    • removedInput schema / properties / instruction / example
      Removed value: -"Darker, with more space around the title"
    • addedInput schema / properties / llm_model
      Added value: +{
      +  "description": "Your model id, e.g. \"claude-opus-4-8\"; \"unknown\" if unsure. For analytics.",
      +  "type": "string"
      +}
    • removedInput schema / properties / portal / example
      Removed value: -"interview"
    • removedOutput schema / properties / alternatives / items / properties / class / example
      Removed value: -"jm-style-dark-band"
    • removedOutput schema / properties / alternatives / items / properties / css / description
      Removed value: -"Ready for save_component_style: every selector on .jm-site and the style class."
    • removedOutput schema / properties / alternatives / items / properties / name / description
      Removed value: -"A name no style of this block has yet."
    • removedOutput schema / properties / alternatives / items / properties / name / example
      Removed value: -"Dark band"
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, but the description adds two facts they don't carry: nothing is persisted until save_component_style runs, and the rate limit is 30 requests per hour per person. That rate limit in particular is operationally important and unavailable anywhere in structured fields. It stops short of explaining failure modes or what happens when the budget is exhausted, so it is strong rather than exhaustive.

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 core purpose is front-loaded after a compact '[Admin]' marker, and the sibling routing is bundled into two terse clauses rather than separate paragraphs. The trailing pointer to get_tool_reference for 'every argument in full' is useful but slightly boilerplate; the body otherwise has no wasted sentences.

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 12-parameter tool with nested objects and enums, the description covers purpose, candidates for alternatives, persistence semantics, and rate limiting, while an output schema covers the return shape. The pointer to get_tool_reference and get_component_style_guide fills the remaining gap on argument detail and CSS authoring. It is complete enough to call correctly without reading further docs.

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% and the parameter descriptions are detailed, including nested objects and enums, so the schema does the heavy lifting. The description only adds that block content is passed as `block` and that styles derive from brand CSS variables, which is marginal over the existing field docs. Baseline 3 is appropriate.

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 a specific verb and resource – generating a few distinct style alternatives for one block type – and immediately scopes the inputs (block content plus the brand's CSS variables). It also distinguishes itself from save_component_style (stores) and get_component_style_guide (hand-written CSS), so the agent can tell the three apart 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?

Alternatives are named with the condition that selects them: use save_component_style to persist a generated look, and get_component_style_guide when writing selectors and variables by hand. The '[Admin]' prefix further signals the audience. Nothing about when to reach for this tool is left 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.