Input Parameters
| Field | Type | Required / Default | Description & Constraints |
|---|---|---|---|
title |
string |
Optional | Optional executive card header title. (maxLength: 160) |
subtitle |
string |
Optional | Optional card subtitle or reporting period. (maxLength: 200) |
footnote |
string |
Optional | Optional footer attribution note. (maxLength: 200) |
palette |
string |
Default: "corporate" |
Accessible executive color palette ('corporate', 'slate', 'emerald', or 'dark'). (enum: corporate | slate | emerald | dark) |
columns |
integer |
Optional | Grid column count (1-3). Defaults automatically from tile count. (min: 1, max: 3) |
width |
integer |
Optional | SVG width in pixels (defaults to 400/680/940 for 1/2/3 columns). (min: 320, max: 2400) |
metrics |
array |
Required | 1 to 6 executive KPI tiles to render. (minItems: 1, maxItems: 6) |
REST Example (curl)
curl -X POST "https://chart-viz.apikeg.com/v1/render-kpi-card" \
-H "Content-Type: application/json" \
-d '{
"title": "November SaaS Flash Report",
"subtitle": "Consolidated Actuals vs. Prior Month",
"palette": "corporate",
"metrics": [
{
"label": "Ending ARR",
"value": 14800000,
"format": "currency",
"currencySymbol": "$",
"unitSuffix": "",
"deltaPercent": 14.2,
"deltaPeriod": "MoM",
"sparkline": [
11200000,
12100000,
12950000,
13800000,
14800000
],
"subtext": "Plan: $14.2M"
},
{
"label": "Net Dollar Retention",
"value": 118.4,
"format": "percent",
"currencySymbol": "$",
"unitSuffix": "",
"deltaPercent": 2.1,
"deltaPeriod": "QoQ",
"sparkline": [
114,
115.2,
116.3,
118.4
]
},
{
"label": "Logo Churn",
"value": 1.8,
"format": "percent",
"currencySymbol": "$",
"unitSuffix": "",
"deltaPercent": -0.6,
"deltaPeriod": "MoM",
"invertSentiment": true,
"sparkline": [
2.9,
2.5,
2.4,
1.8
]
}
]
}'
MCP tools/call Payload
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "render_kpi_card",
"arguments": {
"title": "November SaaS Flash Report",
"subtitle": "Consolidated Actuals vs. Prior Month",
"palette": "corporate",
"metrics": [
{
"label": "Ending ARR",
"value": 14800000,
"format": "currency",
"currencySymbol": "$",
"unitSuffix": "",
"deltaPercent": 14.2,
"deltaPeriod": "MoM",
"sparkline": [
11200000,
12100000,
12950000,
13800000,
14800000
],
"subtext": "Plan: $14.2M"
},
{
"label": "Net Dollar Retention",
"value": 118.4,
"format": "percent",
"currencySymbol": "$",
"unitSuffix": "",
"deltaPercent": 2.1,
"deltaPeriod": "QoQ",
"sparkline": [
114,
115.2,
116.3,
118.4
]
},
{
"label": "Logo Churn",
"value": 1.8,
"format": "percent",
"currencySymbol": "$",
"unitSuffix": "",
"deltaPercent": -0.6,
"deltaPeriod": "MoM",
"invertSentiment": true,
"sparkline": [
2.9,
2.5,
2.4,
1.8
]
}
]
}
}
}