Skip to content

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

TypeScript

fix(mcp-host): name the shape a PPTX slide takes a chart image in

marcotebc331bdb4c41f
diff --git a/mcp-host/src/workflow/__tests__/internalTools.charts.delivery.test.ts b/mcp-host/src/workflow/__tests__/internalTools.charts.delivery.test.ts
index 6dbcf7f65..8b74b0031 100644
--- a/mcp-host/src/workflow/__tests__/internalTools.charts.delivery.test.ts
+++ b/mcp-host/src/workflow/__tests__/internalTools.charts.delivery.test.ts
@@ -150,6 +150,18 @@ describe('chaining a chart into a document', () => {
})
})
+describe('chaining a chart into a deck', () => {
+ it('names the shape a PPTX slide chart takes, and a deck built that way is accepted', async () => {
+ const result = (await chart().execute(yearly, outputDir)) as InternalToolResult
+ expect(result.content).toContain("chart: { path: 'revenue.png' }")
+ const { result: deck } = await workflowRouter().callTool('clerum__generate_pptx', {
+ filename: 'deck.pptx',
+ slides: [{ layout: 'title-chart', title: 'Revenue', chart: { path: 'revenue.png' } }],
+ })
+ expect(deck.isError, JSON.stringify(deck.content)).toBe(false)
+ })
+})
+
describe('chart names', () => {
it('replaces a file of the same name, which later steps embed by that name', async () => {
const router = workflowRouter()
diff --git a/mcp-host/src/workflow/internalTools.ts b/mcp-host/src/workflow/internalTools.ts
index cffa56062..023f816f8 100644
--- a/mcp-host/src/workflow/internalTools.ts
+++ b/mcp-host/src/workflow/internalTools.ts
@@ -1250,7 +1250,8 @@ const generateChart: InternalToolDefinition = {
`${chartTypeRaw}, ${themedDatasets.length} series). To embed it, pass ` +
`images: [{ path: '${target.filename}' }] to the PDF or DOCX generator, ` +
`sheets[].images: [{ path: '${target.filename}' }] to the XLSX generator, or ` +
- `path '${target.filename}' as a PPTX slide image or chart.`
+ `image: { path: '${target.filename}' } or chart: { path: '${target.filename}' } ` +
+ 'on a PPTX slide.'
return artifactResult(target, 'png', { summary, warnings })
} catch (err) {
if (err instanceof ChartDataError) return { success: false, error: err.message }