Skip to main content
Glama
ericlewis

widget-studio

by ericlewis

Generate a widget

generate_widget
Read-only

Create a rich inline UI widget from a natural-language prompt. Specify the widget type, data, and layout to generate a ready-to-display widget.

Instructions

Generate a rich inline UI widget from a natural-language prompt using the Widget Studio designer. This is the primary way to create widgets. Prompt recipe: name the widget kind ('a weather card', 'a leaderboard', 'a boarding pass'), enumerate ALL real data it should show (every number, name, and label — the generator renders exactly what you give it and invents placeholders for what you omit), and add layout/style hints when you care ('use the Table component', 'with a bar chart', 'dark-themed', 'compact'). For static widgets add 'display only, no buttons' — otherwise the generator may invent buttons with made-up action types. Takes 20-60 seconds. To iterate, call again with a refined prompt that restates everything plus the changes (the service is stateless); for tiny tweaks, edit the returned widget JSON and use display_widget instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesNatural-language description of the widget, including the data it should show.
Behavior5/5

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

The description discloses many behavioral traits beyond the annotations: it takes 20-60 seconds, the service is stateless, it renders exactly what you provide and invents placeholders for omissions, and it may invent buttons with made-up action types unless 'display only' is specified. These notes enrich the openWorldHint annotation and add practical expectations.

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 compact yet dense, with every sentence earning its place. It starts with the core purpose, then a prompt recipe, critical caveat about buttons, timing, and iteration guidance. It is well-structured and front-loaded, with no filler.

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 tool with one parameter and no output schema, the description covers all necessary context: the purpose, how to craft input, timing, statelessness, iteration behavior, and when to prefer display_widget. It is sufficiently complete for an agent to select and invoke the tool correctly.

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

Parameters5/5

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

Though the schema fully covers the single 'prompt' parameter, the description adds extensive guidance on how to compose the prompt: naming the widget kind, enumerating all real data, adding layout hints, and the 'display only' flag for static widgets. This goes far beyond the schema's one-line description.

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 opens with a specific verb and resource: 'Generate a rich inline UI widget from a natural-language prompt using the Widget Studio designer.' It also positions this as 'the primary way to create widgets,' distinguishing it from the sibling tools, especially display_widget which is explicitly mentioned for tweaks.

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?

The description provides explicit when-to-use guidance and contrasts with alternatives: 'This is the primary way to create widgets,' and 'for tiny tweaks, edit the returned widget JSON and use display_widget instead.' It also gives conditional advice for static widgets and iteration, making the usage context crystal clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ericlewis/widget-studio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server