@utilix-tech/mcp 0.49.0 → 0.50.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 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.50.0
6
+ - Add `calculate_cash_rounding` tool: round a cashless total to the nearest payable cash denomination ("Swedish rounding"), with round-nearest, round-up, and round-down modes.
7
+
5
8
  ## 0.49.0
6
9
  - Add `resolve_yaml_anchors` tool: expand YAML anchors, aliases, and merge keys inline, and list which anchors were referenced vs. left unused.
7
10
  - Add `split_sitemap` tool: split a URL list exceeding the sitemaps.org 50,000-URL cap into multiple sitemap.xml files plus a sitemap index file.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/mcp
2
2
 
3
- MCP server exposing 188 developer utility tools to Claude, Cursor, VS Code Copilot, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible AI assistant.
3
+ MCP server exposing 189 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
 
@@ -160,7 +160,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
160
160
  | `convert_timezone` | Convert a date/time between timezones |
161
161
  | `convert_iso8601_duration` | Parse an ISO 8601 duration into components and total seconds, or format seconds into a duration string |
162
162
 
163
- ### Units (29 tools)
163
+ ### Units (30 tools)
164
164
  | Tool | Description |
165
165
  |------|-------------|
166
166
  | `convert_bytes` | Convert between B, KB, MB, GB, TB, KiB, MiB, GiB, TiB |
@@ -192,6 +192,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
192
192
  | `calculate_payback_period` | Compute the simple and discounted payback period from an initial investment and a series of periodic cash flows |
193
193
  | `calculate_cd_maturity` | Compute a certificate of deposit's maturity value and effective annual yield (APY) from a principal, nominal rate, term, and compounding frequency, plus the net early-withdrawal payout |
194
194
  | `calculate_depreciation_schedule` | Build a year-by-year fixed-asset depreciation schedule from cost, salvage value, and useful life, using straight-line, double-declining-balance, or sum-of-years-digits |
195
+ | `calculate_cash_rounding` | Round a cashless total to the nearest payable cash denomination ("Swedish rounding"), with round-nearest, round-up, and round-down modes |
195
196
 
196
197
  ### API / Network (28 tools)
197
198
  | Tool | Description |
package/dist/index.js CHANGED
@@ -8304,5 +8304,41 @@ server.tool(
8304
8304
  return text(JSON.stringify(result, null, 2));
8305
8305
  }
8306
8306
  );
8307
+ function _calculateCashRoundingMcp(total, roundingUnit, mode = "nearest") {
8308
+ const round2 = (n) => Math.round(n * 100) / 100;
8309
+ if (typeof total !== "number" || !Number.isFinite(total)) {
8310
+ return { error: "total must be a finite number" };
8311
+ }
8312
+ if (typeof roundingUnit !== "number" || !Number.isFinite(roundingUnit) || roundingUnit <= 0) {
8313
+ return { error: "roundingUnit must be a finite number greater than zero" };
8314
+ }
8315
+ if (mode !== "nearest" && mode !== "up" && mode !== "down") {
8316
+ return { error: 'mode must be one of: "nearest", "up", "down"' };
8317
+ }
8318
+ const steps = total / roundingUnit;
8319
+ const roundedSteps = mode === "up" ? Math.ceil(steps) : mode === "down" ? Math.floor(steps) : Math.round(steps);
8320
+ const roundedTotal = round2(roundedSteps * roundingUnit);
8321
+ return {
8322
+ total: round2(total),
8323
+ roundingUnit,
8324
+ mode,
8325
+ roundedTotal,
8326
+ adjustment: round2(roundedTotal - total)
8327
+ };
8328
+ }
8329
+ server.tool(
8330
+ "calculate_cash_rounding",
8331
+ 'Round a cashless total to the nearest payable cash denomination, the way a till rounds a card-priced total to the nearest 5 cents (or whatever the smallest circulating coin is) when settling in physical cash, commonly called "Swedish rounding" or "cash rounding".',
8332
+ {
8333
+ total: z.number().describe("The cashless total to round"),
8334
+ roundingUnit: z.number().describe("The smallest payable cash denomination to round to, e.g. 0.05"),
8335
+ mode: z.enum(["nearest", "up", "down"]).optional().describe('Rounding mode (default "nearest")')
8336
+ },
8337
+ async ({ total, roundingUnit, mode }) => {
8338
+ const result = _calculateCashRoundingMcp(total, roundingUnit, mode);
8339
+ if ("error" in result) return errText(result);
8340
+ return text(JSON.stringify(result, null, 2));
8341
+ }
8342
+ );
8307
8343
  var transport = new StdioServerTransport();
8308
8344
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilix-tech/mcp",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "description": "MCP server exposing 188 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",