Skip to main content
Glama

Refine an AnimatedWebs UI component

refine_component

Applies one requested change to an existing component's HTML with AnimatedWebs AI and returns the complete updated HTML document. Use it to iterate on a generate_component result (or any self-contained HTML component); use generate_component to start from scratch. Output has the same shape as generate_component (HTML text block with a model comment; structuredContent html, model, generationsLeftToday). Uses one daily generation from the same shared allowance (Free 5, Pro 100 per UTC day); a call where no model ran is not counted. Not idempotent. If the generator is busy it returns an error; retry after a minute. Example: {"html":"...","change":"make the cards glass and add a hover tilt","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": {
      "html": "<html>",
      "change": "<change>"
    },
    "name": "refine_component"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesThe current component as a full HTML document, 50 to 60,000 characters; pass the previous output unchanged.
styleNoVisual system to keep: luxury (default), editorial, glass or brutalist. Pass the style the component was generated with.luxury
changeYesOne change, 4 to 800 characters. Example: 'make the cards glass and add a hover tilt'.

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 / change / description
      Previous value: -"One change to make, 4 to 800 characters. Example: 'make the cards glass and add a hover tilt'."New value: +"One change, 4 to 800 characters. Example: 'make the cards glass and add a hover tilt'."
    • changedInput schema / properties / style / description
      Previous value: -"Visual system to keep: luxury, editorial, glass or brutalist. Pass the style used when the component was generated; default luxury."New value: +"Visual system to keep: luxury (default), editorial, glass or brutalist. Pass the style the component was generated with."
    • 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?

Beyond the annotations (which already flag non-read-only, open-world, non-idempotent), the description discloses quota economics: one daily generation from a shared allowance (Free 5 / Pro 100 per UTC day), and that a call where no model ran is not counted. It also describes the return shape and the busy/retry behavior, which the annotations do not provide.

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?

Front-loaded with purpose and the sibling boundary, then constraints, then an example — a sensible order with no filler sentences. It is dense (many semicolon-joined clauses) and slightly longer than strictly necessary, though each clause carries information.

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 an output schema available, the description still summarizes the return shape correctly (HTML block plus structuredContent with model and generationsLeftToday). Quota, non-idempotency, retry-on-busy, and the iterate-vs-generate split cover everything an agent needs before calling.

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%, so the three parameters are already fully documented, and the baseline would be 3. The description adds a concrete three-parameter invocation example showing how html, change, and style are combined, which is modest but real value beyond the schema.

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?

"Applies one requested change to an existing component's HTML ... and returns the complete updated HTML document" gives a specific verb (refine/apply one change), a specific resource (existing component HTML), and explicitly names the sibling boundary against generate_component.

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?

States when to use it (to iterate on a generate_component result or any self-contained HTML component) and names the alternative for the other case ("use generate_component to start from scratch"). It also covers the failure path: busy generator returns an error, retry after a minute.

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.