GovTribe

Show stats display MCP tool

Minimal: {"stats":[{"label":"Awards","value":3}]}. Render KPI summary cards. Presentation IDs and stat keys default; titles, descriptions, diffs, sparklines and formatting overrides are optional. Currency requires an explicit currency code; percent requires an explicit fraction/unit basis. A diff.value is percentage change in percent units, for example 12.4 means +12.4%.

Examples

Use stats displays for compact KPI cards. Use Show_Chart when the user needs trends, grouped comparisons, or leaderboards.

Minimal working example

{
  "tool": "Show_Stats_Display",
  "arguments": {
    "stats": [
      {
        "label": "Awards",
        "value": 3
      }
    ]
  }
}

The presentation id and each stat key are generated when omitted or null. Each stat needs only label and value. Titles, descriptions, locale, differences, sparklines and formatting overrides are optional. A diff.value is a percentage change in percent units: 12.4 renders as +12.4%. These defaults keep the existing KPI card appearance.

For numeric values, omitted or null formatting uses plain numbers. For currency, explicitly set kind: "currency" and a currency code such as currency: "USD". For percentages, explicitly set kind: "percent" and basis: "fraction" for 0.37, or basis: "unit" for 37. Missing currency codes and percentage bases produce validation errors with a corrected example. Precision and compact notation remain optional.

Show a capture pipeline KPI summary

{
  "tool": "Show_Stats_Display",
  "arguments": {
    "id": "capture-pipeline-summary",
    "title": "Capture pipeline summary",
    "description": "Current qualified pipeline for the selected market.",
    "locale": "en-US",
    "stats": [
      {
        "key": "pipeline-value",
        "label": "Pipeline value",
        "value": 42500000,
        "format": {
          "kind": "currency",
          "currency": "USD",
          "compact": true
        },
        "diff": {
          "value": 12.4,
          "decimals": 1,
          "label": "vs last quarter"
        }
      },
      {
        "key": "active-pursuits",
        "label": "Active pursuits",
        "value": 18,
        "format": {
          "kind": "number",
          "decimals": 0
        }
      },
      {
        "key": "avg-pwin",
        "label": "Average PWIN",
        "value": 0.37,
        "format": {
          "kind": "percent",
          "basis": "fraction",
          "decimals": 0
        }
      }
    ]
  }
}

Payload patterns

Each stat needs a visible label and raw value. The presentation key is optional and defaults from the stat position. Use strict format, diff, and sparkline objects when needed.

Show KPI cards with sparklines

{
  "tool": "Show_Stats_Display",
  "arguments": {
    "id": "market-kpis",
    "stats": [
      {
        "key": "new-opportunities",
        "label": "New opportunities",
        "value": 31,
        "format": {
          "kind": "number",
          "decimals": 0
        },
        "sparkline": {
          "data": [
            21,
            24,
            27,
            31
          ],
          "color": "#125475"
        }
      }
    ]
  }
}