@voxslopuli/teamdynamix-mcp 0.5.3 → 0.5.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/index.js CHANGED
@@ -15,7 +15,7 @@ var init_package = __esm({
15
15
  "package.json"() {
16
16
  package_default = {
17
17
  name: "@voxslopuli/teamdynamix-mcp",
18
- version: "0.5.3",
18
+ version: "0.5.5",
19
19
  private: false,
20
20
  description: "A production-ready TypeScript MCP server for TeamDynamix",
21
21
  keywords: [
@@ -61,7 +61,7 @@ var init_package = __esm({
61
61
  },
62
62
  dependencies: {
63
63
  "@modelcontextprotocol/sdk": "^1.30.0",
64
- "@voxslopuli/teamdynamix-ts": "^0.3.1",
64
+ "@voxslopuli/teamdynamix-ts": "^0.3.2",
65
65
  tablemark: "^4.1.0",
66
66
  zod: "^4.6.2"
67
67
  },
@@ -285,8 +285,13 @@ function buildSdkConfig(config, tenant, tokenProvider) {
285
285
  environment: config.baseUrl?.includes("sandbox") ? "sandbox" : "production",
286
286
  baseUrl: config.baseUrl,
287
287
  timeoutMs: config.timeoutMs,
288
- runtimeValidationMode: "fail-open",
289
288
  ...resolveSdkSpecPath() ? { specPath: resolveSdkSpecPath() } : {},
289
+ // The MCP validates its own tool inputs at the boundary (zod schemas); the
290
+ // live API's published schemas don't consistently match its real responses
291
+ // (required-field drift, duplicate enum aliases), so OpenAPI runtime
292
+ // validation runs open here — hard validation against the doc would reject
293
+ // legitimate responses (issue #22 symptom 2).
294
+ runtimeValidationMode: "fail-open",
290
295
  retryPolicy: {
291
296
  maxRetries: config.maxRetries
292
297
  }
@@ -415,11 +420,17 @@ var init_client_factory = __esm({
415
420
  const results = Array.isArray(data) ? data : [];
416
421
  const groupFilter = parseIdListEnv(process.env["TEAMDYNAMIX_TICKET_GROUP_IDS"]);
417
422
  if (groupFilter.length === 0) return results;
418
- return results.filter((item) => {
423
+ const filtered = results.filter((item) => {
419
424
  if (typeof item !== "object" || item === null) return false;
420
425
  const gid = Number(item["ResponsibleGroupID"]);
421
426
  return groupFilter.includes(gid);
422
427
  });
428
+ if (filtered.length < results.length) {
429
+ console.error(
430
+ `[teamdynamix-mcp] TEAMDYNAMIX_TICKET_GROUP_IDS=${groupFilter.join(",")} filtered ${results.length - filtered.length} of ${results.length} rows for app ${appId}`
431
+ );
432
+ }
433
+ return filtered;
423
434
  });
424
435
  }
425
436
  listTicketTypes(appId) {
@@ -2873,7 +2884,7 @@ function registerTeamDynamixWatchTools(server2) {
2873
2884
  if (!note_id) throw new Error("op=delete requires note_id.");
2874
2885
  return svc.notesDelete({ noteId: note_id });
2875
2886
  case "list":
2876
- return svc.notesList({ appId: app_id, ticketId: ticket_id });
2887
+ return { notes: await svc.notesList({ appId: app_id, ticketId: ticket_id }) };
2877
2888
  }
2878
2889
  })
2879
2890
  );