Skip to main content
Glama

load_ui_guidelines

Load design guidelines for generating visual widgets like charts, diagrams, and mockups to ensure consistent, high-quality visualizations before creating your first widget.

Instructions

Load detailed design guidelines for generating visual widgets. Call this before generating your first widget in a conversation. Available modules: interactive, chart, mockup, art, diagram.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modulesYesWhich guideline modules to load. interactive = HTML controls/forms, chart = Chart.js, mockup = UI mockups, art = SVG illustrations, diagram = flowcharts/timelines/hierarchies.

Implementation Reference

  • The MCP tool handler for 'load_ui_guidelines' which calls the getGuidelines helper to return design specifications.
    server.tool(
      "load_ui_guidelines",
      `Load detailed design guidelines for generating visual widgets. Call this before generating your first widget in a conversation. Available modules: ${AVAILABLE_MODULES.join(", ")}.`,
      {
        modules: z
          .array(z.enum(["interactive", "chart", "mockup", "art", "diagram"]))
          .describe(
            "Which guideline modules to load. interactive = HTML controls/forms, chart = Chart.js, mockup = UI mockups, art = SVG illustrations, diagram = flowcharts/timelines/hierarchies."
          ),
      },
      async ({ modules }) => ({
        content: [{ type: "text", text: getGuidelines(modules) }],
      })
    );
  • The getGuidelines helper function that assembles and deduplicates design guideline sections based on requested module names.
    export function getGuidelines(moduleNames: string[]): string {
      const seen = new Set<string>();
      const parts: string[] = [];
      for (const mod of moduleNames) {
        const key = mod.toLowerCase().trim();
        const sections = MODULE_SECTIONS[key];
        if (!sections) continue;
        for (const section of sections) {
          if (!seen.has(section)) {
            seen.add(section);
            parts.push(section);
          }
        }
      }
      if (parts.length === 0) {
        return `No guidelines found. Available modules: ${AVAILABLE_MODULES.join(', ')}`;
      }
      return parts.join('\n\n\n');
    }
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It mentions that the tool loads guidelines, implying a read-only operation, but doesn't disclose behavioral traits like whether it caches data, requires authentication, has rate limits, or what happens on repeated calls. The description adds some context (prerequisite timing) but lacks comprehensive behavioral details for a tool with no annotations.

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 concise and well-structured: two sentences that efficiently convey purpose, usage timing, and available modules. Every sentence adds value without redundancy, making it easy to scan and understand quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (1 parameter, no output schema, no annotations), the description is somewhat complete but has gaps. It covers purpose and usage timing but lacks details on output format, error handling, or behavioral traits. Without annotations or output schema, more context would be helpful for an agent to use it 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?

The schema description coverage is 100%, with the 'modules' parameter fully documented in the schema (including enum values and descriptions). The description adds minimal value beyond the schema by listing the available modules, but doesn't provide additional semantics like usage examples or constraints. This meets the baseline for high schema coverage.

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 tool's purpose: 'Load detailed design guidelines for generating visual widgets.' It specifies the verb ('Load') and resource ('detailed design guidelines'), and mentions the target use case ('generating visual widgets'). However, since there are no sibling tools, it doesn't need to differentiate from alternatives, so it doesn't reach the highest score.

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?

The description provides clear usage guidance: 'Call this before generating your first widget in a conversation.' This indicates when to use the tool (as a prerequisite step). It also lists available modules, which helps users understand scope. However, it doesn't explicitly state when not to use it or compare to alternatives, and with no sibling tools, this is less critical.

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/op7418/Generative-UI-MCP'

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