metricui
v0.2.0React dashboard components — API lookup, code generation, and prop validation for AI tools.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_components
List all MetricUI components, optionally filtered by category
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category |
search_components
Search MetricUI components by use case description. Returns ranked results.
| Parameter | Type | Description |
|---|---|---|
query * | string | Natural language, e.g. 'show revenue over time' or 'pie chart' |
get_component_api
Get the full API reference for a specific MetricUI component — all props, types, defaults, examples
| Parameter | Type | Description |
|---|---|---|
component * | string | Component name, e.g. 'KpiCard', 'AreaChart', 'DataTable' |
get_component_example
Returns a complete, working code example for a MetricUI component with the requested features enabled. The example uses realistic sample data and has every relevant prop annotated. You adapt the values/labels to your specific use case — the structure and props are correct as-is.
| Parameter | Type | Description |
|---|---|---|
component * | string | Component name: KpiCard, AreaChart, BarChart, DonutChart, LineChart, DataTable, StatGroup, Sparkline, Badge |
features | array | Features to include in the example: comparison, sparkline, goal, conditions, dense, animation, stacked, grouped, horizontal, footer, pagination, etc. |
generate_dashboard
Generate a COMPLETE, production-quality MetricUI dashboard with theme presets, MetricGrid auto-layout, DashboardHeader with live status, FilterProvider + PeriodSelector, advanced KpiCards (conditions, goals, sparkline overlays), charts with reference lines and threshold bands, data-driven Callout alerts, and rich DataTable. Returns a full page.tsx file ready to use.
| Parameter | Type | Description |
|---|---|---|
description * | string | Dashboard description: 'SaaS metrics with MRR, churn, user growth, revenue breakdown, and top customers table' |
metrics | array | Specific metrics/sections to include |
style | string | Layout density |
theme | string | Theme preset (default: indigo) |
variant | string |
generate_data_shape
Generate the TypeScript interface for a component's required data shape
| Parameter | Type | Description |
|---|---|---|
component * | string | Component name |
series | array | Series/field names to include |
generate_table_columns
Generate DataTable column definitions from a list of fields
| Parameter | Type | Description |
|---|---|---|
fields * | array | Field definitions |
generate_provider_config
Generate MetricProvider configuration JSX with only the fields you need
| Parameter | Type | Description |
|---|---|---|
animate | boolean | |
currency | string | |
dense | boolean | |
locale | string | |
nullDisplay | string | |
variant | string |
validate_props
Validate a MetricUI component's prop configuration — catches unknown props, type mismatches, deprecated usage, and common mistakes
| Parameter | Type | Description |
|---|---|---|
component * | string | |
props * | object | Props to validate as key-value pairs |
suggest_format
Suggest the right format configuration for a value type
| Parameter | Type | Description |
|---|---|---|
valueType * | string | What kind of value: revenue, percentage, time, count, etc. |
sampleValue | number | A sample value to show formatted output |
get_setup_guide
Get complete setup instructions for MetricUI — install commands, peer dependencies, provider setup, CSS imports, and framework-specific configuration for Next.js, Vite, or CRA.
| Parameter | Type | Description |
|---|---|---|
framework | string | Target framework (default: nextjs) |
init_project
Initialize a project for MetricUI — generates CLAUDE.md content with usage instructions so AI tools always use MetricUI components. Run this once per project.
search_docs
Search all MetricUI documentation — components, props, types, patterns, format examples, and guides. Returns ranked results with snippets. Use this when a user asks conceptual questions like 'how do I set up dark mode?' or 'what format should I use for currency?'
| Parameter | Type | Description |
|---|---|---|
query * | string | Natural language query, e.g. 'how to format currency', 'dark mode setup', 'table pagination', 'sparkline' |
limit | number | Max results to return (default 5) |
type | string | Filter results by content type |