Skip to main content
Glama

Sketch a screen

sketch_ui

Render a UI sketch built from the company's own components in the warm Lab: story_source is a Storybook CSF story (TypeScript) that imports components from the repo (component_catalog lists them) and composes the screen. It renders at each width × theme (375 and 1440, light and dark by default) and comes back with a PNG and an HTML page per view, console errors, and which components it used or made new. Unless save: false, it is saved to the company's Knowledge as a clickable page mockup (with content.sketch) and the result has its app_url. It spends Lab time, so you confirm in a dialog first.

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": {
      "repo": "<repo>",
      "title": "<title>",
      "story_source": "<story_source>"
    },
    "name": "sketch_ui"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesthe repo whose components it uses: full name (owner/repo) or id
saveNosave it as a page mockup in Knowledge (true by default)
titleYeswhat the sketch shows, e.g. "Plans dialog after a launch"
themesNolight, dark or both (both by default)
widthsNoviewport widths: 375, 768, 1024, 1280, 1440 (375 and 1440 by default)
companyNothe company id (list_companies); not needed when you have one company, asked for otherwise
variantsNothe story's exports to render, when it has several (Default when left out)
interactiveNoa clickable HTML build of the story (true by default); false keeps a static snapshot
story_sourceYesthe story: CSF that imports the repo's components and renders the screen

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the render matrix (each width × theme), the concrete outputs (PNG plus an HTML page per view, console errors, components used or newly created), and the side effect of persisting a clickable `page` mockup in Knowledge with `content.sketch` and an `app_url`. It also names the cost model ("spends Lab time") and the confirmation dialog, which is exactly the context annotations cannot carry. Nothing here contradicts readOnlyHint=false or destructiveHint=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?

The description is dense but front-loaded: purpose first, then return shape, then persistence side effect, then cost/confirmation warning. It wastes some space repeating defaults already stated in the schema (widths, themes, save), but every other sentence carries real information for an agent deciding whether to call.

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 9-parameter, mutation-adjacent tool with an output schema, the description covers what the agent must supply, what comes back, what is persisted, and what the cost gate is. Given that the output schema handles return-value structure, nothing material is left unexplained.

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%, so defaults for `widths`, `themes`, `interactive`, and `save` are already documented in the schema. The description mostly restates those defaults ("375 and 1440, light and dark by default") but adds genuinely new framing for `story_source` (TypeScript CSF importing repo components) and connects it to `component_catalog`. That is a modest lift over the schema, matching the baseline 3.

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+resource ("Render a UI sketch built from the company's own components") and immediately qualifies the key input, `story_source`, as a CSF/TypeScript story that composes repo components. An agent can distinguish this from `component_catalog` (which it explicitly names as the component listing) and from generic artifact tools without opening the schema.

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

Usage Guidelines4/5

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

Usage context is clear: you need a repo, a title, and a CSF story that imports the repo's components, and `component_catalog` is named as the way to discover those components. It also warns that the call spends Lab time and triggers a confirmation dialog. What is missing is any explicit statement of when NOT to use it (e.g., instead of a static artifact or a real app build).

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.

Resources