Skip to main content
Glama

Generate an AnimatedWebs UI component

generate_component

Writes one new UI component from a text description with AnimatedWebs AI and returns a complete self-contained HTML document (Tailwind CDN, inline JS). Use it when no library component fits; search_catalog (kind components) first to reuse one, and refine_component to change a result. The text block is the HTML preceded by an HTML comment naming the model and the generations left; structuredContent has html, model and generationsLeftToday. Each successful call uses one daily generation (Free 5, Pro 100 per UTC day, shared with refine_component and the tools site); a call where no model ran is not counted. Not idempotent: each call gives different output. If the generator is busy it returns an error; retry after a minute. Example: {"prompt":"a pricing section with three plans and a yearly toggle","style":"glass"}.

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": {
      "prompt": "<prompt>"
    },
    "name": "generate_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
styleNoVisual system: luxury (dark, gold accent, serif; default), editorial (warm light page, oxblood accent), glass (navy-black, frosted layers, violet accent) or brutalist (black and white, signal red, hard borders).luxury
promptYesWhat to build, 8 to 1200 characters: content, layout and motion. Example: 'a pricing section with three plans and a yearly toggle'.

Output Schema

NameRequiredDescriptionDefault
htmlYesComplete self-contained HTML document (Tailwind CDN, inline JS)
modelYesModel that wrote it
generationsLeftTodayYesGenerations left for this account today (UTC)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / prompt / description
      Previous value: -"What to build, 8 to 1200 characters. Name the content, layout and motion. Example: 'a pricing section with three plans and a yearly toggle'."New value: +"What to build, 8 to 1200 characters: content, layout and motion. Example: 'a pricing section with three plans and a yearly toggle'."
    • changedInput schema / properties / style / description
      Previous value: -"Visual system: luxury (dark, gold accent, serif), editorial (warm light page, oxblood accent), glass (navy-black, frosted layers, violet accent) or brutalist (black and white, signal red, hard borders). Default luxury."New value: +"Visual system: luxury (dark, gold accent, serif; default), editorial (warm light page, oxblood accent), glass (navy-black, frosted layers, violet accent) or brutalist (black and white, signal red, hard borders)."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "generationsLeftToday": {
      +      "description": "Generations left for this account today (UTC)",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "html": {
      +      "description": "Complete self-contained HTML document (Tailwind CDN, inline JS)",
      +      "type": "string"
      +    },
      +    "model": {
      +      "description": "Model that wrote it",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "html",
      +    "model",
      +    "generationsLeftToday"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations by disclosing quota economics (Free 5 / Pro 100 per UTC day, shared with refine_component and the tools site, and that calls where no model ran are not counted), the response shape (HTML plus a leading model/quota comment, structuredContent with html, model, generationsLeftToday), and a failure mode with recovery advice (busy error, retry after a minute). The "not idempotent" statement reinforces rather than contradicts idempotentHint=false.

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 remaining sentences are ordered logically: usage, return value, cost, side effects, failure handling, example. Nothing is filler, though the quota sentence is densely parenthetical and could be split for faster scanning.

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?

For a generative, costly, non-idempotent tool, the description covers everything an agent needs: when to prefer alternatives, what it costs, what comes back, what happens on failure, and a worked example. Return values are also covered by an output schema and structuredContent mention, so nothing material is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the enum values are already fully described, so most of the burden is met structurally. The description still adds value with a concrete invocation example covering both prompt and style, showing how the parameters combine in practice; it does not add anything about the 8–1200 character bounds beyond what the schema states.

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?

Opens with a specific verb and resource: "Writes one new UI component from a text description with AnimatedWebs AI and returns a complete self-contained HTML document (Tailwind CDN, inline JS)." It names the output artifact explicitly and, in the next sentence, contrasts itself with search_catalog and refine_component, so an agent can separate it from siblings 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?

Gives an explicit selection rule ("Use it when no library component fits"), a prerequisite alternative ("search_catalog (kind components) first to reuse one"), and the post-hoc alternative ("refine_component to change a result"). This is a complete when/when-not/alternatives map rather than an implied one.

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.