Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

perf(mcp-host): spell out the pptx chart schema once

marcoteb2d43a99fb943
diff --git a/mcp-host/src/workflow/__tests__/internalTools.schemaBudget.test.ts b/mcp-host/src/workflow/__tests__/internalTools.schemaBudget.test.ts
index e3ef061fe..cad8eaf3a 100644
--- a/mcp-host/src/workflow/__tests__/internalTools.schemaBudget.test.ts
+++ b/mcp-host/src/workflow/__tests__/internalTools.schemaBudget.test.ts
@@ -11,7 +11,7 @@ const BUDGET: Record<string, number> = {
clerum__generate_pdf: 3800,
clerum__generate_docx: 3200,
clerum__generate_xlsx: 5400,
- clerum__generate_pptx: 16600,
+ clerum__generate_pptx: 14000,
clerum__generate_chart: 4300,
clerum__generate_dashboard: 14100,
clerum__list_workflows: 500,
@@ -21,7 +21,7 @@ const BUDGET: Record<string, number> = {
clerum__context_files_read: 550,
}
-const TOTAL_BUDGET = 51000
+const TOTAL_BUDGET = 47500
function size(tool: (typeof INTERNAL_TOOLS)[number]): number {
return JSON.stringify({
diff --git a/mcp-host/src/workflow/internalTools.ts b/mcp-host/src/workflow/internalTools.ts
index 5a43cd945..e5c738dbf 100644
--- a/mcp-host/src/workflow/internalTools.ts
+++ b/mcp-host/src/workflow/internalTools.ts
@@ -1459,20 +1459,17 @@ const PPTX_CHART_SCHEMA = {
}
/**
- * A template chart: slides[].chart without its nested `data` form. The runtime
- * still reads that form; readNativeChart checks its labels and series names,
- * and the chart normalizer its datasets and values.
+ * A template chart. Its fields are those of slides[].chart, which the schema
+ * spells out once: every model request carries the schema, and the deck
+ * builder checks a template chart as it checks a slide's (readNativeChart, then
+ * the chart normalizer), naming the field it cannot use.
*/
function pptxTemplateChart(description: string): Record<string, unknown> {
return {
type: 'object',
- description: `${description} As slides[].chart.`,
+ description: `${description} Same fields as slides[].chart.`,
properties: {
- path: { type: 'string', description: PPTX_PATH_SHORT },
type: { type: 'string', enum: [...NATIVE_CHART_TYPES], description: 'Chart type.' },
- title: { type: 'string', description: 'Slide title.' },
- ...pptxChartSeries(PPTX_SERIES_SHORT),
- caption: { type: 'string', description: 'Note.' },
},
}
}