fix: Add missing numberFormats, compareToPreviousPeriod fields to MCP Schemas#2445
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: ad89110 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Greptile SummaryThis PR adds missing display properties (
Confidence Score: 5/5Safe to merge. All added fields map 1-to-1 to existing fields in the external API schemas, so nothing new can be persisted that the underlying storage layer doesn't already support. Every newly exposed MCP field (numberFormat on bar/table/pie/sql tiles; compareToPreviousPeriod and fitYAxisToData on line and SQL tiles) was already declared in the corresponding externalDashboard*ChartConfigSchema in zod.ts, confirmed in the code. The MCP layer simply passes through to those schemas, so there is no persistence path that isn't already exercised. The two new integration tests exercise the full save → get → update → re-get round-trip for all added fields. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[LLM Agent sends tile config] --> B{configType?}
B -- sql --> C[mcpSqlTileSchema\n+ numberFormat\n+ compareToPreviousPeriod\n+ fitYAxisToData]
B -- builder --> D{displayType?}
D -- line --> E[mcpLineTileSchema\n+ numberFormat\n+ compareToPreviousPeriod\n+ fitYAxisToData]
D -- stacked_bar --> F[mcpBarTileSchema\n+ numberFormat]
D -- table --> G[mcpTableTileSchema\n+ numberFormat]
D -- number --> H[mcpNumberTileSchema\nnumberFormat already present]
D -- pie --> I[mcpPieTileSchema\n+ numberFormat]
C --> J[createDashboardBodySchema.safeParse\nexternal API validation]
E & F & G & H & I --> J
J -- line SQL/builder --> K[Persists numberFormat\n+ compareToPreviousPeriod\n+ fitYAxisToData]
J -- non-line displayType --> L[compareToPreviousPeriod /\nfitYAxisToData silently dropped\nby external schema strip mode]
K & L --> M[convertExternalTilesToInternal\nDB save]
Reviews (3): Last reviewed commit: "Merge branch 'main' into drew/add-missin..." | Re-trigger Greptile |
E2E Test Results✅ All tests passed • 201 passed • 3 skipped • 1309s
Tests ran across 4 shards in parallel. |
e61fd0b to
c460528
Compare
Summary
This PR adds a few missing display properties to the MCP schemas, so that the agent can use them, and so that they're not stripped when the agent edits an existing dashboard.
Screenshots or video
The agent can now create and update dashboards leveraging all of these fields:
How to test on Vercel preview
This can be tested locally by connecting to MCP and requesting the agent creates and updates dashboards with these properties.
References