it-tools-mcp 3.0.6 → 3.0.7
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/build/tools/math.js +3 -2
- package/package.json +4 -2
package/build/tools/math.js
CHANGED
|
@@ -5,14 +5,15 @@ export function registerMathTools(server) {
|
|
|
5
5
|
expression: z.string().describe("Mathematical expression to evaluate (e.g., '2 + 3 * 4')")
|
|
6
6
|
}, async ({ expression }) => {
|
|
7
7
|
try {
|
|
8
|
-
// Dynamically import mathjs only when needed
|
|
9
8
|
const { evaluate } = await import("mathjs");
|
|
9
|
+
const start = Date.now();
|
|
10
10
|
const result = evaluate(expression);
|
|
11
|
+
const elapsed = Date.now() - start;
|
|
11
12
|
return {
|
|
12
13
|
content: [
|
|
13
14
|
{
|
|
14
15
|
type: "text",
|
|
15
|
-
text: `Expression: ${expression}\nResult: ${result}`
|
|
16
|
+
text: `Expression: ${expression}\nResult: ${result}\n(evaluated in ${elapsed} ms)`
|
|
16
17
|
}
|
|
17
18
|
]
|
|
18
19
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "it-tools-mcp",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"description": "MCP server providing access to various IT tools and utilities for developers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
"start:node": "node build/index.js",
|
|
14
14
|
"dev": "tsc && node build/index.js",
|
|
15
15
|
"test": "node tests/test-server.mjs",
|
|
16
|
+
"test:math": "node tests/math-tool-test.mjs",
|
|
16
17
|
"test:security": "node tests/security-test.mjs",
|
|
17
|
-
"test:all": "npm run test && npm run test:security",
|
|
18
|
+
"test:all": "npm run test && npm run test:security && npm run test:math",
|
|
18
19
|
"docker:build": "docker buildx build --platform linux/amd64,linux/arm64 --provenance=true --sbom=true -t it-tools-mcp .",
|
|
19
20
|
"docker:build:local": "docker build -t it-tools-mcp .",
|
|
20
21
|
"docker:run": "docker-compose up --build",
|
|
@@ -81,6 +82,7 @@
|
|
|
81
82
|
"marked": "^15.0.12",
|
|
82
83
|
"mathjs": "^14.5.2",
|
|
83
84
|
"mime-types": "^3.0.1",
|
|
85
|
+
"node-fetch": "^3.3.2",
|
|
84
86
|
"papaparse": "^5.5.3",
|
|
85
87
|
"qrcode": "^1.5.4",
|
|
86
88
|
"speakeasy": "^2.0.0",
|