@vint.tri/report_gen_mcp 1.0.18 → 1.0.19
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 +3 -3
- package/dist/index.js +15 -2
- package/package.json +1 -1
- package/src/index.ts +14 -2
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.
|
|
20
|
+
npm install -g @vint.tri/report_gen_mcp@1.0.19
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### Direct Execution with npx
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
npx @vint.tri/report_gen_mcp@1.0.
|
|
26
|
+
npx @vint.tri/report_gen_mcp@1.0.19
|
|
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.
|
|
67
|
+
"@vint.tri/report_gen_mcp@1.0.19"
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
}
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ if (process.argv.length === 2) {
|
|
|
58
58
|
// No command specified, run in stdio mode using MCP SDK
|
|
59
59
|
const mcpServer = new mcp_js_1.McpServer({
|
|
60
60
|
name: "report_gen_mcp",
|
|
61
|
-
version: "1.0.
|
|
61
|
+
version: "1.0.19",
|
|
62
62
|
}, {
|
|
63
63
|
// Disable health check to prevent automatic calls
|
|
64
64
|
capabilities: {
|
|
@@ -90,7 +90,20 @@ if (process.argv.length === 2) {
|
|
|
90
90
|
tempDirectory: zod_1.z.string().optional().describe("Temporary directory for file storage (defaults to system temporary directory if not specified)"),
|
|
91
91
|
},
|
|
92
92
|
}, async (params) => {
|
|
93
|
-
|
|
93
|
+
// Handle case where arguments might be sent as a JSON string by Claude desktop
|
|
94
|
+
let processedParams = params;
|
|
95
|
+
if (typeof params.arguments === 'string') {
|
|
96
|
+
try {
|
|
97
|
+
processedParams = JSON.parse(params.arguments);
|
|
98
|
+
}
|
|
99
|
+
catch (parseError) {
|
|
100
|
+
throw new Error('Invalid JSON string in arguments');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (params.arguments && typeof params.arguments === 'object') {
|
|
104
|
+
processedParams = params.arguments;
|
|
105
|
+
}
|
|
106
|
+
const { document, charts, outputFile = 'report.html', tempDirectory = os_1.default.tmpdir() } = processedParams;
|
|
94
107
|
const outputPath = path_1.default.resolve(tempDirectory, outputFile);
|
|
95
108
|
try {
|
|
96
109
|
const result = await (0, reportGenerator_1.generateReport)(document, charts, outputPath);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -62,7 +62,7 @@ if (process.argv.length === 2) {
|
|
|
62
62
|
// No command specified, run in stdio mode using MCP SDK
|
|
63
63
|
const mcpServer = new McpServer({
|
|
64
64
|
name: "report_gen_mcp",
|
|
65
|
-
version: "1.0.
|
|
65
|
+
version: "1.0.19",
|
|
66
66
|
}, {
|
|
67
67
|
// Disable health check to prevent automatic calls
|
|
68
68
|
capabilities: {
|
|
@@ -95,7 +95,19 @@ if (process.argv.length === 2) {
|
|
|
95
95
|
tempDirectory: z.string().optional().describe("Temporary directory for file storage (defaults to system temporary directory if not specified)"),
|
|
96
96
|
},
|
|
97
97
|
}, async (params: any) => {
|
|
98
|
-
|
|
98
|
+
// Handle case where arguments might be sent as a JSON string by Claude desktop
|
|
99
|
+
let processedParams = params;
|
|
100
|
+
if (typeof params.arguments === 'string') {
|
|
101
|
+
try {
|
|
102
|
+
processedParams = JSON.parse(params.arguments);
|
|
103
|
+
} catch (parseError) {
|
|
104
|
+
throw new Error('Invalid JSON string in arguments');
|
|
105
|
+
}
|
|
106
|
+
} else if (params.arguments && typeof params.arguments === 'object') {
|
|
107
|
+
processedParams = params.arguments;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const { document, charts, outputFile = 'report.html', tempDirectory = os.tmpdir() } = processedParams;
|
|
99
111
|
const outputPath = path.resolve(tempDirectory, outputFile);
|
|
100
112
|
|
|
101
113
|
try {
|