get_dashboard_data
Extract aggregated pipeline run statistics and metrics from summary.json or HTML dashboard files to analyze performance and track results.
Instructions
Extract aggregated data from summary.json or the HTML dashboard, including overall run statistics and metrics.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | No | Path to config.toml file to determine output directory |
Implementation Reference
- src/index.ts:513-535 (handler)Main execution logic for the 'get_dashboard_data' tool. Locates the devpipe config, computes the output directory, reads summary.json, and returns the parsed dashboard data as JSON.case 'get_dashboard_data': { const configPath = args?.config || await findConfigFile(); if (!configPath) { throw new Error('No config.toml file found'); } const config = await parseConfig(configPath); const outputDir = getOutputDir(configPath, config); const summary = await readSummary(outputDir); if (!summary) { throw new Error('No summary.json found. Run devpipe first to generate dashboard data.'); } return { content: [ { type: 'text', text: JSON.stringify(summary, null, 2), }, ], }; }
- src/index.ts:205-217 (registration)Registers the 'get_dashboard_data' tool in the MCP server's tool list, including its name, description, and input schema.{ name: 'get_dashboard_data', description: 'Extract aggregated data from summary.json or the HTML dashboard, including overall run statistics and metrics.', inputSchema: { type: 'object', properties: { config: { type: 'string', description: 'Path to config.toml file to determine output directory', }, }, }, },
- src/index.ts:208-216 (schema)Defines the input schema for the 'get_dashboard_data' tool, accepting an optional config path.inputSchema: { type: 'object', properties: { config: { type: 'string', description: 'Path to config.toml file to determine output directory', }, }, },
- src/utils.ts:105-113 (helper)Helper function that reads and parses the summary.json file from the devpipe output directory, providing the core dashboard data.export async function readSummary(outputDir: string): Promise<SummaryData | null> { try { const summaryPath = join(outputDir, 'summary.json'); const content = await readFile(summaryPath, 'utf-8'); return JSON.parse(content); } catch (error) { return null; } }