@motorbay/mcp 0.1.4 → 0.1.5

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/dist/tools.js CHANGED
@@ -5,7 +5,13 @@ const id = (what) => z.string().regex(/^\d{1,19}$/, "A Motorbay id is a string o
5
5
  // and hyphens, 1 to 17 characters once trimmed. encodeURIComponent leaves
6
6
  // `.` alone and fetch resolves a `..` segment, so `..` would otherwise send
7
7
  // GET /v1/vehicles/ (Search vehicles, no filter).
8
- const plateOrVin = (what) => z.string().trim()
8
+ // Trimmed first: space, tab, CR and LF at either end, the same set in every
9
+ // client (#87). zod's .trim() is String.prototype.trim, which takes more
10
+ // (U+FEFF, U+00A0, ...) than Python's strip and less in other places.
11
+ // .overwrite() is what .trim() is built on, so the tool's JSON schema stays
12
+ // a plain string with a pattern (a .transform() would change it).
13
+ const ENDS = /^[ \t\r\n]+|[ \t\r\n]+$/g;
14
+ const plateOrVin = (what) => z.string().overwrite((s) => s.replace(ENDS, ""))
9
15
  .regex(/^[A-Za-z0-9ÆØÅæøå -]{1,17}$/, "A plate or a VIN is letters, digits, spaces and hyphens, 1 to 17 characters")
10
16
  .describe(what);
11
17
  const vehicleId = id("The vehicle's Motorbay id (the `id` field from a vehicle lookup), e.g. \"1000123456\".");
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "0.1.4";
1
+ export const VERSION = "0.1.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motorbay/mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "MCP server for the Motorbay API: Danish vehicle data from Motorstyrelsen's public weekly extract.",
5
5
  "license": "MIT",
6
6
  "type": "module",