Skip to main content
Glama

generate_preview

Render Tailwind-styled HTML as a visual component preview with configurable size, dark mode, and responsive breakpoints to inspect layout and styling.

Instructions

Generate visual preview of Tailwind components

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>"
    },
    "name": "generate_preview"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlYesHTML code to preview
widthNoPreview width in pixels
heightNoPreview height in pixels
darkModeNoGenerate dark mode preview
responsiveNoGenerate responsive breakpoint previews

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. While 'Generate visual preview' implies a read-only operation that creates output, it doesn't disclose important behavioral aspects like whether this is a computationally intensive operation, whether there are rate limits, what format the preview output takes (image, HTML, etc.), or whether authentication is required.

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

Conciseness5/5

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

The description is extremely concise at just 6 words, front-loading the essential information with zero wasted words. Every word earns its place by specifying what's being generated (visual preview) and what it applies to (Tailwind components).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters and no output schema, the description is inadequate. It doesn't explain what the output looks like (image URL, base64 data, HTML snippet), doesn't mention performance characteristics, and provides no examples of typical use cases. With no annotations to supplement the description, this leaves significant gaps for an agent trying to use the tool effectively.

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?

With 100% schema description coverage, the input schema already documents all 5 parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema - it doesn't explain how the HTML should be structured, what 'responsive breakpoint previews' actually means, or provide examples of typical usage patterns.

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 description clearly states the verb ('Generate') and resource ('visual preview of Tailwind components'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like 'analyze_design' or 'generate_component' that might also involve visual aspects of Tailwind components.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'analyze_design', 'generate_component', and 'suggest_improvements' that might overlap in visual component contexts, there's no indication of when this specific preview generation tool is appropriate versus those other tools.

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