@utilix-tech/mcp 0.13.0 → 0.14.0
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/CHANGELOG.md +3 -0
- package/README.md +3 -2
- package/dist/index.js +28 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.14.0
|
|
6
|
+
- Added VAT / Sales Tax Calculator (`calculate_tax`).
|
|
7
|
+
|
|
5
8
|
## 0.13.0
|
|
6
9
|
- Added ICO Favicon Inspector (`read_ico_info`) and Barcode Checksum Validator (`validate_barcode`).
|
|
7
10
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/mcp
|
|
2
2
|
|
|
3
|
-
MCP server exposing
|
|
3
|
+
MCP server exposing 114 developer utility tools to Claude, Cursor, VS Code Copilot, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible AI assistant.
|
|
4
4
|
|
|
5
5
|
No API key required. All tools run locally. Requires Node.js 18 or later.
|
|
6
6
|
|
|
@@ -145,7 +145,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
145
145
|
| `date_diff` | Calculate the difference between two dates |
|
|
146
146
|
| `convert_timezone` | Convert a date/time between timezones |
|
|
147
147
|
|
|
148
|
-
### Units (
|
|
148
|
+
### Units (7 tools)
|
|
149
149
|
| Tool | Description |
|
|
150
150
|
|------|-------------|
|
|
151
151
|
| `convert_bytes` | Convert between B, KB, MB, GB, TB, KiB, MiB, GiB, TiB |
|
|
@@ -154,6 +154,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
154
154
|
| `validate_iban` | Validate an IBAN via the mod-97 checksum and format it into grouped blocks |
|
|
155
155
|
| `calculate_loan` | Compute a loan's monthly payment, total interest, and amortization schedule |
|
|
156
156
|
| `validate_barcode` | Validate an EAN-13, EAN-8, or UPC-A barcode via its weighted mod-10 check digit |
|
|
157
|
+
| `calculate_tax` | Add or remove VAT/sales tax from a price, in either direction |
|
|
157
158
|
|
|
158
159
|
### API / Network (8 tools)
|
|
159
160
|
| Tool | Description |
|
package/dist/index.js
CHANGED
|
@@ -1960,6 +1960,34 @@ server.tool(
|
|
|
1960
1960
|
return text(JSON.stringify(result, null, 2));
|
|
1961
1961
|
}
|
|
1962
1962
|
);
|
|
1963
|
+
function _calculateTax(amount, ratePercent, direction) {
|
|
1964
|
+
if (!Number.isFinite(amount) || amount < 0) return { error: "Amount must be zero or a positive number" };
|
|
1965
|
+
if (!Number.isFinite(ratePercent) || ratePercent < 0) return { error: "Tax rate must be zero or a positive number" };
|
|
1966
|
+
if (direction !== "add" && direction !== "remove") return { error: 'Direction must be "add" or "remove"' };
|
|
1967
|
+
if (direction === "add") {
|
|
1968
|
+
const netAmount2 = _roundMoneyMcp(amount);
|
|
1969
|
+
const taxAmount2 = _roundMoneyMcp(amount * (ratePercent / 100));
|
|
1970
|
+
return { netAmount: netAmount2, taxAmount: taxAmount2, grossAmount: _roundMoneyMcp(netAmount2 + taxAmount2), ratePercent, direction };
|
|
1971
|
+
}
|
|
1972
|
+
const grossAmount = _roundMoneyMcp(amount);
|
|
1973
|
+
const netAmount = _roundMoneyMcp(amount / (1 + ratePercent / 100));
|
|
1974
|
+
const taxAmount = _roundMoneyMcp(grossAmount - netAmount);
|
|
1975
|
+
return { netAmount, taxAmount, grossAmount, ratePercent, direction };
|
|
1976
|
+
}
|
|
1977
|
+
server.tool(
|
|
1978
|
+
"calculate_tax",
|
|
1979
|
+
"Add tax to a net (pre-tax) amount or remove tax from a gross (tax-inclusive) amount, given a rate. Pure formula, not a live VAT/sales-tax rate lookup.",
|
|
1980
|
+
{
|
|
1981
|
+
amount: z.number().describe("The amount to add tax to (net) or remove tax from (gross)"),
|
|
1982
|
+
ratePercent: z.number().describe("Tax rate as a percent, e.g. 20"),
|
|
1983
|
+
direction: z.enum(["add", "remove"]).describe('"add" treats amount as net and computes gross; "remove" treats amount as gross and backs out net')
|
|
1984
|
+
},
|
|
1985
|
+
async ({ amount, ratePercent, direction }) => {
|
|
1986
|
+
const result = _calculateTax(amount, ratePercent, direction);
|
|
1987
|
+
if ("error" in result) return errText(result);
|
|
1988
|
+
return text(JSON.stringify(result, null, 2));
|
|
1989
|
+
}
|
|
1990
|
+
);
|
|
1963
1991
|
server.tool(
|
|
1964
1992
|
"format_ndjson",
|
|
1965
1993
|
"Validate newline-delimited JSON (NDJSON/JSON Lines), report per-line errors, and pretty-print each valid line.",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server exposing
|
|
3
|
+
"version": "0.14.0",
|
|
4
|
+
"description": "MCP server exposing 114 Utilix developer tools to Claude, Cursor, VS Code Copilot, and any MCP-compatible AI assistant.",
|
|
5
5
|
"author": "Utilix <hello@utilix.tech>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://utilix.tech/mcp",
|