@vint.tri/report_gen_mcp 1.0.17 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -17,13 +17,13 @@ A powerful CLI tool for generating HTML reports with embedded charts, designed t
17
17
  ### Global Installation (Recommended)
18
18
 
19
19
  ```bash
20
- npm install -g @vint.tri/report_gen_mcp@1.0.15
20
+ npm install -g @vint.tri/report_gen_mcp@1.0.18
21
21
  ```
22
22
 
23
23
  ### Direct Execution with npx
24
24
 
25
25
  ```bash
26
- npx @vint.tri/report_gen_mcp@1.0.15
26
+ npx @vint.tri/report_gen_mcp@1.0.18
27
27
  ```
28
28
 
29
29
  ## Usage
@@ -64,7 +64,7 @@ To use this tool with Claude Desktop, add the following configuration to your Cl
64
64
  "tags": [],
65
65
  "command": "npx",
66
66
  "args": [
67
- "@vint.tri/report_gen_mcp@1.0.15"
67
+ "@vint.tri/report_gen_mcp@1.0.18"
68
68
  ]
69
69
  }
70
70
  }
@@ -350,8 +350,9 @@ npm test
350
350
  ### Methods
351
351
 
352
352
  1. `generate-report`: Creates an HTML report with embedded charts
353
- 2. `health`: Checks if the tool is running correctly
354
- 3. `mcp:list-tools`: Returns available tools (used by Claude Desktop)
353
+ 2. `get-report-url`: Returns a clickable URL for a generated report file
354
+ 3. `health`: Checks if the tool is running correctly
355
+ 4. `mcp:list-tools`: Returns available tools (used by Claude Desktop)
355
356
 
356
357
  ### Method Details
357
358
 
@@ -363,6 +364,7 @@ npm test
363
364
  - `type` (string): Chart type ("bar", "line", or "pie")
364
365
  - `config` (object): Chart.js configuration object
365
366
  - `outputFile` (string, optional): Output HTML file path (defaults to "report.html")
367
+ - `tempDirectory` (string, optional): Temporary directory for file storage (defaults to current working directory if not specified)
366
368
 
367
369
  **Response:**
368
370
  ```json
@@ -373,6 +375,23 @@ npm test
373
375
  }
374
376
  ```
375
377
 
378
+ #### get-report-url
379
+
380
+ **Description:** Get a clickable URL for a generated report file
381
+
382
+ **Parameters:**
383
+ - `filePath` (string): Full path to the report file
384
+
385
+ **Response:**
386
+ ```json
387
+ {
388
+ "success": true,
389
+ "fileUrl": "file:///absolute/path/to/report.html",
390
+ "message": "Click the URL to open the report",
391
+ "filePath": "/absolute/path/to/report.html"
392
+ }
393
+ ```
394
+
376
395
  #### health
377
396
 
378
397
  **Response:**
package/dist/index.js CHANGED
@@ -9,6 +9,7 @@ const commander_1 = require("commander");
9
9
  const reportGenerator_1 = require("./utils/reportGenerator");
10
10
  const path_1 = __importDefault(require("path"));
11
11
  const fs_extra_1 = __importDefault(require("fs-extra"));
12
+ const os_1 = __importDefault(require("os"));
12
13
  const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
13
14
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
14
15
  const zod_1 = require("zod");
@@ -57,7 +58,7 @@ if (process.argv.length === 2) {
57
58
  // No command specified, run in stdio mode using MCP SDK
58
59
  const mcpServer = new mcp_js_1.McpServer({
59
60
  name: "report_gen_mcp",
60
- version: "1.0.17",
61
+ version: "1.0.18",
61
62
  }, {
62
63
  // Disable health check to prevent automatic calls
63
64
  capabilities: {
@@ -86,10 +87,10 @@ if (process.argv.length === 2) {
86
87
  }),
87
88
  })).describe("Chart configurations mapped by ID"),
88
89
  outputFile: zod_1.z.string().optional().describe("Output HTML file path"),
89
- tempDirectory: zod_1.z.string().optional().describe("Temporary directory for file storage (defaults to current working directory if not specified)"),
90
+ tempDirectory: zod_1.z.string().optional().describe("Temporary directory for file storage (defaults to system temporary directory if not specified)"),
90
91
  },
91
92
  }, async (params) => {
92
- const { document, charts, outputFile = 'report.html', tempDirectory = process.cwd() } = params;
93
+ const { document, charts, outputFile = 'report.html', tempDirectory = os_1.default.tmpdir() } = params;
93
94
  const outputPath = path_1.default.resolve(tempDirectory, outputFile);
94
95
  try {
95
96
  const result = await (0, reportGenerator_1.generateReport)(document, charts, outputPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vint.tri/report_gen_mcp",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "CLI tool for generating HTML reports with embedded charts",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/index.ts CHANGED
@@ -5,6 +5,7 @@ import { program } from 'commander';
5
5
  import { generateReport } from './utils/reportGenerator';
6
6
  import path from 'path';
7
7
  import fs from 'fs-extra';
8
+ import os from 'os';
8
9
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
9
10
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
10
11
  import { z } from 'zod';
@@ -61,7 +62,7 @@ if (process.argv.length === 2) {
61
62
  // No command specified, run in stdio mode using MCP SDK
62
63
  const mcpServer = new McpServer({
63
64
  name: "report_gen_mcp",
64
- version: "1.0.17",
65
+ version: "1.0.18",
65
66
  }, {
66
67
  // Disable health check to prevent automatic calls
67
68
  capabilities: {
@@ -91,10 +92,10 @@ if (process.argv.length === 2) {
91
92
  }),
92
93
  })).describe("Chart configurations mapped by ID"),
93
94
  outputFile: z.string().optional().describe("Output HTML file path"),
94
- tempDirectory: z.string().optional().describe("Temporary directory for file storage (defaults to current working directory if not specified)"),
95
+ tempDirectory: z.string().optional().describe("Temporary directory for file storage (defaults to system temporary directory if not specified)"),
95
96
  },
96
97
  }, async (params: any) => {
97
- const { document, charts, outputFile = 'report.html', tempDirectory = process.cwd() } = params;
98
+ const { document, charts, outputFile = 'report.html', tempDirectory = os.tmpdir() } = params;
98
99
  const outputPath = path.resolve(tempDirectory, outputFile);
99
100
 
100
101
  try {