u-widgets-mcp

v0.7.14
@iyulab/u-widgets-mcp Checked 9 hours ago Published 13 days ago

MCP server for the u-widgets declarative widget system (uw-* internal prefix)

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

help

List available u-widget types. Returns the full catalog when no argument is given, or filters by widget name or category (e.g. "chart", "chart.bar", "display").

ParameterTypeDescription
widgetstringWidget type or category to filter (e.g. "chart.bar", "chart", "display"). Omit for full catalog.

template

Generate a minimal, valid u-widget spec with sample data for a given widget type. Use this as a starting point when creating widgets.

ParameterTypeDescription
widget *stringWidget type (e.g. "metric", "chart.bar", "table", "form").

validate

Validate a u-widget spec against its structure and the catalog: a widget that does not exist is an error; a key no widget reads, an option the widget does not have or of the wrong type are warnings naming what that place takes. Returns errors (fatal) and warnings (non-fatal). Use this to check a spec before rendering.

ParameterTypeDescription
spec *objectThe u-widget spec object to validate, with its "widget" field.

suggest_mapping

Analyze data and suggest the best widget type with auto-inferred mapping. Returns ranked suggestions sorted by confidence. Optionally constrain to a specific widget type.

ParameterTypeDescription
data *The data to analyze — a single object or an array of records.
widgetstringOptional widget type to constrain the suggestion (e.g. "chart.pie"). Must be a known widget type from the catalog.

auto_spec

Generate a complete, ready-to-use u-widget spec from raw data. Picks the best widget type and mapping automatically. One-call convenience for quick visualizations.

ParameterTypeDescription
data *The data to visualize — a single object or an array of records.