Skip to main content
Glama

Low-Code UI MCP Server

This project provides a Python MCP server that inspects runtime data and returns UI instructions compatible with the low-code renderer in C:\Users\gregg\development\low-code\low-code\packages\ui.

The server is designed around the instruction types documented in C:\Users\gregg\development\low-code\low-code\README.md:

  • label

  • list

  • table

  • card

  • accordion

  • carousel

What It Does

The exposed MCP tool, suggest_ui_instructions, accepts a data object and returns:

  • instruction: a renderer-ready UIInstruction or UIInstruction[]

  • analysis: the component decisions made for each field

  • notes: a short explanation of the heuristics used

Example selection behavior:

  • arrays of primitive values become list

  • small arrays of objects become carousel

  • medium arrays of objects become accordion

  • large, flat arrays of objects become table

  • nested objects become card

Related MCP server: MCP UI Glue Code Generator

Install

cd C:\Users\gregg\development\mcp
python -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -e .

Run

cd C:\Users\gregg\development\mcp
.venv\Scripts\Activate.ps1
low-code-ui-mcp

You can also run it directly:

python -m low_code_ui_mcp

Run with HTTP REST transport instead of stdio:

python -m low_code_ui_mcp --transport http --host 127.0.0.1 --port 8000

When running in HTTP mode:

  • health check: GET /health

  • non-blocking suggestion endpoint: POST /api/v1/suggest-ui-instructions

Example request:

Invoke-RestMethod -Method Post -Uri "http://127.0.0.1:8000/api/v1/suggest-ui-instructions" -ContentType "application/json" -Body (@{
  data = @{
    title = "Quarterly Summary"
    highlights = @("Revenue up 12%", "Churn down 3%")
    products = @(
      @{ name = "Alpha"; owner = "Team A"; score = 92 },
      @{ name = "Beta"; owner = "Team B"; score = 88 }
    )
  }
} | ConvertTo-Json -Depth 20)

MCP Tool

suggest_ui_instructions

Parameters:

  • data: the object to analyze

  • carousel_max_items: maximum object-array size that still prefers carousel

  • table_min_items: minimum object-array size that starts preferring table

  • table_max_columns: maximum distinct object keys that still counts as a flat table

  • max_depth: recursion limit for nested instruction generation

Example request payload:

{
  "data": {
    "title": "Quarterly Summary",
    "highlights": ["Revenue up 12%", "Churn down 3%"],
    "products": [
      { "name": "Alpha", "owner": "Team A", "score": 92 },
      { "name": "Beta", "owner": "Team B", "score": 88 }
    ],
    "accounts": [
      { "name": "Acme", "region": "NA", "status": "Active" },
      { "name": "Globex", "region": "EU", "status": "Active" },
      { "name": "Initech", "region": "APAC", "status": "Paused" },
      { "name": "Umbrella", "region": "NA", "status": "Active" },
      { "name": "Soylent", "region": "EU", "status": "Pilot" },
      { "name": "Wonka", "region": "NA", "status": "Active" },
      { "name": "Hooli", "region": "APAC", "status": "Active" },
      { "name": "Stark", "region": "NA", "status": "Active" }
    ]
  }
}

Example response shape:

{
  "instruction": [
    { "type": "label", "field": "title", "label": "Title" },
    { "type": "list", "field": "highlights", "label": "Highlights" },
    {
      "type": "carousel",
      "field": "products",
      "label": "Products",
      "contents": [
        { "type": "label", "field": "name", "label": "Name" },
        { "type": "label", "field": "owner", "label": "Owner" },
        { "type": "label", "field": "score", "label": "Score" }
      ]
    },
    { "type": "table", "field": "accounts", "label": "Accounts" }
  ]
}

Heuristics

  • Primitive fields render as label

  • Arrays of primitives render as list

  • Empty arrays default to list

  • Arrays of objects render as:

    • carousel when item count is small

    • accordion when item count is medium or the objects are more nested

    • table when the array is large and the objects are flat enough for columns

  • Nested objects render as card with child instructions inferred from the nested fields

Available Tools

1 tool
suggest_ui_instructionsC

Suggest @workspace/ui renderer instructions for a JSON-like object.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataYes
carousel_max_itemsNo
table_min_itemsNo
table_max_columnsNo
max_depthNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.3/5.0
Behavior2/5

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

Zero annotations provided, so the description carries full disclosure burden. It fails to clarify whether this is a pure function (likely), what 'instructions' entail (schema? config?), or how the parameters influence UI selection (carousel vs table thresholds). The mention of '@workspace/ui renderer' hints at the domain but doesn't explain behavioral traits.

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

Conciseness2/5

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

While the single sentence is front-loaded, it is inappropriately concise given the tool's complexity (5 parameters, nested objects, output schema). The brevity creates underspecification; the description wastes its opportunity to explain the tuning parameters or output format.

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?

Inadequate for a tool with 5 parameters, 0% schema coverage, and no annotations. The description omits the logic governing UI component selection (when carousel vs table vs other), the nature of the returned instructions, and the purpose of the threshold parameters. Even with an output schema, the input semantics require elaboration.

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

Parameters2/5

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

With 0% schema description coverage, the description must compensate for five undocumented parameters. It only implicitly references the 'data' parameter via 'JSON-like object', completely omitting the four configuration parameters (carousel_max_items, table_min_items, etc.) which clearly control rendering heuristics. Barely above tautology.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the core action ('Suggest') and target ('@workspace/ui renderer instructions'), but 'instructions' remains vague and '@workspace/ui' assumes domain knowledge without explanation. It adequately identifies the input as a 'JSON-like object' but lacks specificity about what the tool actually produces.

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?

No guidance provided on when to use this versus manual UI configuration or other rendering approaches. No mention of prerequisites (e.g., whether the data needs specific structures) or when the suggestions are inappropriate.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.0
    • First observedsuggest_ui_instructions

TDQS

C2.7/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to compare it to. The tool's purpose is clearly defined and stands alone without any confusion.

Naming Consistency5/5

Since there is only a single tool, it inherently maintains consistency with itself. The naming follows a clear verb_noun pattern (suggest_ui_instructions), which is straightforward and predictable.

Tool Count2/5

A single tool is too few for a server named 'Low-Code UI MCP Server', which implies a broader domain of UI-related operations. This minimal set feels thin and inadequate for covering potential needs like creating, updating, or rendering UI components.

Completeness2/5

The tool surface is severely incomplete for a UI-focused server, as it only offers suggestion capabilities without any tools for actual creation, modification, or execution of UI elements. This leaves significant gaps that will likely cause agent failures in handling full UI workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers