182 lines
5.7 KiB
JSON
182 lines
5.7 KiB
JSON
[
|
|
{
|
|
"name": "render_metrics",
|
|
"description": "Render a metric card dashboard showing KPIs, stats, and numerical summaries.",
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Title displayed at the top of the dashboard"
|
|
},
|
|
"metrics": {
|
|
"type": "array",
|
|
"description": "Array of metric objects to display as cards",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"label": { "type": "string", "description": "Metric name" },
|
|
"value": { "type": "string", "description": "Metric value" },
|
|
"change": { "type": "string", "description": "Change indicator, e.g. '+12.5%'" },
|
|
"change_type": { "type": "string", "enum": ["up", "down", "neutral"], "description": "Direction of change" }
|
|
},
|
|
"required": ["label", "value"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["title", "metrics"]
|
|
},
|
|
"_meta": {
|
|
"ui": {
|
|
"resourceUri": "ui://data-dashboard/metrics"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "render_chart",
|
|
"description": "Render a single ECharts chart. Supports line, bar, pie, radar, scatter, and gauge chart types.",
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Chart title"
|
|
},
|
|
"chart_type": {
|
|
"type": "string",
|
|
"enum": ["line", "bar", "pie", "radar", "scatter", "gauge"],
|
|
"description": "Type of chart to render"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"description": "Chart data object",
|
|
"properties": {
|
|
"categories": {
|
|
"type": "array",
|
|
"items": { "type": "string" },
|
|
"description": "X-axis labels (for line, bar, radar)"
|
|
},
|
|
"series": {
|
|
"type": "array",
|
|
"description": "Array of data series",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string", "description": "Series name" },
|
|
"data": { "type": "array", "description": "Data values" }
|
|
},
|
|
"required": ["name", "data"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["series"]
|
|
},
|
|
"width": {
|
|
"type": "string",
|
|
"description": "CSS width. Default: '100%'",
|
|
"default": "100%"
|
|
},
|
|
"height": {
|
|
"type": "string",
|
|
"description": "CSS height. Default: '400px'",
|
|
"default": "400px"
|
|
},
|
|
"stacked": {
|
|
"type": "boolean",
|
|
"description": "Stack series (line/bar). Default: false",
|
|
"default": false
|
|
},
|
|
"smooth": {
|
|
"type": "boolean",
|
|
"description": "Smooth curves (line). Default: false",
|
|
"default": false
|
|
},
|
|
"show_label": {
|
|
"type": "boolean",
|
|
"description": "Show data labels. Default: false",
|
|
"default": false
|
|
},
|
|
"theme": {
|
|
"type": "string",
|
|
"enum": ["light", "dark"],
|
|
"description": "Color theme. Default: 'light'",
|
|
"default": "light"
|
|
}
|
|
},
|
|
"required": ["title", "chart_type", "data"]
|
|
},
|
|
"_meta": {
|
|
"ui": {
|
|
"resourceUri": "ui://data-dashboard/chart"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "render_multi_chart",
|
|
"description": "Render multiple ECharts charts in a grid layout. Use for comprehensive overviews and business reports.",
|
|
"inputSchema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string",
|
|
"description": "Overall dashboard title"
|
|
},
|
|
"charts": {
|
|
"type": "array",
|
|
"description": "Array of chart objects",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string", "description": "Chart title" },
|
|
"chart_type": { "type": "string", "enum": ["line", "bar", "pie", "radar", "scatter", "gauge"], "description": "Type of chart" },
|
|
"data": {
|
|
"type": "object",
|
|
"description": "Chart data",
|
|
"properties": {
|
|
"categories": { "type": "array", "items": { "type": "string" } },
|
|
"series": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": { "type": "string" },
|
|
"data": { "type": "array" }
|
|
},
|
|
"required": ["name", "data"]
|
|
}
|
|
}
|
|
},
|
|
"required": ["series"]
|
|
},
|
|
"height": { "type": "string", "default": "350px" },
|
|
"stacked": { "type": "boolean", "default": false },
|
|
"smooth": { "type": "boolean", "default": false },
|
|
"show_label": { "type": "boolean", "default": false }
|
|
},
|
|
"required": ["title", "chart_type", "data"]
|
|
}
|
|
},
|
|
"columns": {
|
|
"type": "integer",
|
|
"description": "Grid columns (1-4). Default: 2",
|
|
"default": 2,
|
|
"minimum": 1,
|
|
"maximum": 4
|
|
},
|
|
"theme": {
|
|
"type": "string",
|
|
"enum": ["light", "dark"],
|
|
"description": "Color theme. Default: 'light'",
|
|
"default": "light"
|
|
}
|
|
},
|
|
"required": ["title", "charts"]
|
|
},
|
|
"_meta": {
|
|
"ui": {
|
|
"resourceUri": "ui://data-dashboard/multi-chart"
|
|
}
|
|
}
|
|
}
|
|
]
|