@togglhq/mcp 1.5.27 → 1.5.29

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/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { n as runMcpCli } from "./src-BNlkz4O4.js";
2
+ import { n as runMcpCli } from "./src-RzQj8FxB.js";
3
3
  //#region src/cli.ts
4
4
  runMcpCli();
5
5
  //#endregion
package/build/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { n as runMcpCli, t as bootstrapServer } from "./src-BNlkz4O4.js";
2
+ import { n as runMcpCli, t as bootstrapServer } from "./src-RzQj8FxB.js";
3
3
  export { bootstrapServer, runMcpCli };
@@ -14496,8 +14496,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
14496
14496
  inst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite(fn));
14497
14497
  inst.optional = () => optional$2(inst);
14498
14498
  inst.exactOptional = () => exactOptional(inst);
14499
- inst.nullable = () => nullable$1(inst);
14500
- inst.nullish = () => optional$2(nullable$1(inst));
14499
+ inst.nullable = () => nullable$2(inst);
14500
+ inst.nullish = () => optional$2(nullable$2(inst));
14501
14501
  inst.nonoptional = (params) => nonoptional(inst, params);
14502
14502
  inst.array = () => array$2(inst);
14503
14503
  inst.or = (arg) => union$1([inst, arg]);
@@ -14985,7 +14985,7 @@ const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
14985
14985
  inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
14986
14986
  inst.unwrap = () => inst._zod.def.innerType;
14987
14987
  });
14988
- function nullable$1(innerType) {
14988
+ function nullable$2(innerType) {
14989
14989
  return new ZodNullable({
14990
14990
  type: "nullable",
14991
14991
  innerType
@@ -27651,6 +27651,31 @@ function looseObject(entries$1, message$1) {
27651
27651
  };
27652
27652
  }
27653
27653
  /* @__NO_SIDE_EFFECTS__ */
27654
+ function nullable$1(wrapped, default_) {
27655
+ return {
27656
+ kind: "schema",
27657
+ type: "nullable",
27658
+ reference: nullable$1,
27659
+ expects: `(${wrapped.expects} | null)`,
27660
+ async: false,
27661
+ wrapped,
27662
+ default: default_,
27663
+ get "~standard"() {
27664
+ return /* @__PURE__ */ _getStandardProps$1(this);
27665
+ },
27666
+ "~run"(dataset, config$1) {
27667
+ if (dataset.value === null) {
27668
+ if (this.default !== void 0) dataset.value = /* @__PURE__ */ getDefault$1(this, dataset, config$1);
27669
+ if (dataset.value === null) {
27670
+ dataset.typed = true;
27671
+ return dataset;
27672
+ }
27673
+ }
27674
+ return this.wrapped["~run"](dataset, config$1);
27675
+ }
27676
+ };
27677
+ }
27678
+ /* @__NO_SIDE_EFFECTS__ */
27654
27679
  function number$2(message$1) {
27655
27680
  return {
27656
27681
  kind: "schema",
@@ -30714,6 +30739,15 @@ async function patchOrganizationUserActive(httpClient, organization_id, organiza
30714
30739
  async function getWorkspaces(httpClient, organization_id, signal) {
30715
30740
  return (await httpClient.get(`organizations/${organization_id}/workspaces`, { signal })).json();
30716
30741
  }
30742
+ async function getWorkspaceTimezone(httpClient, organization_id, workspace_id, signal) {
30743
+ return (await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/settings/timezone`, { signal })).json();
30744
+ }
30745
+ async function putWorkspaceTimezone(httpClient, organization_id, workspace_id, data, signal) {
30746
+ return (await httpClient.put(`organizations/${organization_id}/workspaces/${workspace_id}/settings/timezone`, {
30747
+ signal,
30748
+ json: data
30749
+ })).json();
30750
+ }
30717
30751
  async function getWorkspaceUserMeRoles(httpClient, organization_id, workspace_id, signal) {
30718
30752
  return (await httpClient.get(`organizations/${organization_id}/workspaces/${workspace_id}/users/me/roles`, { signal })).json();
30719
30753
  }
@@ -30824,7 +30858,7 @@ async function deleteMyWorkingHours(httpClient, organization_id, data, signal) {
30824
30858
  return response.json();
30825
30859
  }
30826
30860
  //#endregion
30827
- //#region ../cli-core/build/focus-client-7dpDsjfZ.js
30861
+ //#region ../cli-core/build/focus-client-BTk5v8IS.js
30828
30862
  const DATE_ONLY_RE = /^\d{4}-\d{2}-\d{2}$/;
30829
30863
  function normalizeDateFrom(value) {
30830
30864
  return DATE_ONLY_RE.test(value) ? `${value}T00:00:00Z` : value;
@@ -31622,6 +31656,20 @@ var FocusClient = class {
31622
31656
  data: response.data
31623
31657
  } : response;
31624
31658
  }
31659
+ async getOrgWorkspaceTimezone(workspaceId) {
31660
+ const response = await this.run("getOrgWorkspaceTimezone", () => getWorkspaceTimezone(this.orgHttp, this.organizationIdNum, workspaceId));
31661
+ return response.ok ? {
31662
+ ok: true,
31663
+ data: response.data
31664
+ } : response;
31665
+ }
31666
+ async updateOrgWorkspaceTimezone(workspaceId, payload) {
31667
+ const response = await this.run("updateOrgWorkspaceTimezone", () => putWorkspaceTimezone(this.orgHttp, this.organizationIdNum, workspaceId, payload));
31668
+ return response.ok ? {
31669
+ ok: true,
31670
+ data: response.data
31671
+ } : response;
31672
+ }
31625
31673
  async getSharedDataStatus() {
31626
31674
  const response = await this.run("getSharedDataStatus", () => getStatus(this.sharedDataHttp));
31627
31675
  return this.softValidateResponse("getSharedDataStatus", StatusOKSchema, response);
@@ -32534,7 +32582,7 @@ function createAuthenticatedClientProxy() {
32534
32582
  } });
32535
32583
  }
32536
32584
  //#endregion
32537
- //#region ../operations/build/safety-BSD7hS5Z.js
32585
+ //#region ../operations/build/safety-B7a8yXtb.js
32538
32586
  const optionalNumber = /* @__PURE__ */ optional$1(/* @__PURE__ */ number$2());
32539
32587
  const DATE_FIELD_RE = /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2}))?$/;
32540
32588
  const dateField = (description) => /* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ regex(DATE_FIELD_RE, "must be YYYY-MM-DD or RFC3339 datetime (e.g. '2025-01-01' or '2025-01-01T00:00:00Z')"), /* @__PURE__ */ description$1(description));
@@ -33682,6 +33730,71 @@ const orgSharedOperations = [
33682
33730
  return client.getMyWorkspaceRoles(body.workspace_id ?? Number.parseInt(client.workspaceId, 10));
33683
33731
  }
33684
33732
  },
33733
+ {
33734
+ id: "org.workspaces.get-timezone",
33735
+ family: "org",
33736
+ resource: "workspaces",
33737
+ action: "get-timezone",
33738
+ title: "Get workspace timezone",
33739
+ description: "Get the workspace-level default timezone (null when unset). Requires organization admin.",
33740
+ agentGuidance: "Use when you need the org-wide default timezone for a workspace. When timezone is null, members use their personal timezones.",
33741
+ safety: "read",
33742
+ destructive: false,
33743
+ cli: {
33744
+ group: ["organization", "workspaces"],
33745
+ command: "get-timezone",
33746
+ examples: [{
33747
+ description: "Get timezone for the active workspace",
33748
+ data: {}
33749
+ }, {
33750
+ description: "Get timezone for a specific workspace",
33751
+ data: { workspace_id: 40770900 }
33752
+ }]
33753
+ },
33754
+ mcp: { entityTool: "org-workspaces" },
33755
+ inputSchema: /* @__PURE__ */ object$2({ workspace_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Workspace ID (defaults to profile)"))) }),
33756
+ execute: (input, { client }) => {
33757
+ const body = input;
33758
+ return client.getOrgWorkspaceTimezone(body.workspace_id ?? client.workspaceIdNumber);
33759
+ }
33760
+ },
33761
+ {
33762
+ id: "org.workspaces.update-timezone",
33763
+ family: "org",
33764
+ resource: "workspaces",
33765
+ action: "update-timezone",
33766
+ title: "Update workspace timezone",
33767
+ description: "Set or clear the workspace-level default timezone. Requires organization admin.",
33768
+ agentGuidance: "Set timezone to an IANA name (e.g. Europe/London) or clear with clear: true / timezone: null so members fall back to personal timezones.",
33769
+ safety: "update",
33770
+ destructive: false,
33771
+ cli: {
33772
+ group: ["organization", "workspaces"],
33773
+ command: "update-timezone",
33774
+ examples: [{
33775
+ description: "Set default timezone for the active workspace",
33776
+ data: { timezone: "Europe/London" }
33777
+ }, {
33778
+ description: "Clear workspace default timezone",
33779
+ data: { clear: true }
33780
+ }]
33781
+ },
33782
+ mcp: { entityTool: "org-workspaces" },
33783
+ inputSchema: /* @__PURE__ */ object$2({
33784
+ workspace_id: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ number$2(), /* @__PURE__ */ description$1("Workspace ID (defaults to profile)"))),
33785
+ timezone: /* @__PURE__ */ optional$1(/* @__PURE__ */ nullable$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ string$1(), /* @__PURE__ */ description$1("IANA timezone (e.g. \"Europe/London\"), or null to clear")))),
33786
+ clear: /* @__PURE__ */ optional$1(/* @__PURE__ */ pipe$2(/* @__PURE__ */ boolean$1(), /* @__PURE__ */ description$1("Clear workspace default timezone")))
33787
+ }),
33788
+ execute: (input, { client }) => {
33789
+ const body = input;
33790
+ const workspaceId = body.workspace_id ?? client.workspaceIdNumber;
33791
+ const clearsTimezone = body.clear === true || body.timezone === null;
33792
+ if (clearsTimezone && typeof body.timezone === "string") throw new Error("Pass either a timezone string or clear/null, not both");
33793
+ if (clearsTimezone) return client.updateOrgWorkspaceTimezone(workspaceId, { timezone: null });
33794
+ if (body.timezone === void 0) throw new Error("Pass --timezone <IANA>, --clear true, or timezone: null to remove the default");
33795
+ return client.updateOrgWorkspaceTimezone(workspaceId, { timezone: body.timezone });
33796
+ }
33797
+ },
33685
33798
  {
33686
33799
  id: "shared.status.get",
33687
33800
  family: "shared",
@@ -45212,7 +45325,7 @@ import_main.default.config({
45212
45325
  quiet: true,
45213
45326
  ignore: ["MISSING_ENV_FILE"]
45214
45327
  });
45215
- const packageVersion = "1.5.27";
45328
+ const packageVersion = "1.5.29";
45216
45329
  function resolvePublicUrls() {
45217
45330
  return {
45218
45331
  focusApiUrl: process.env.TOGGL_FOCUS_API_URL ?? "https://focus.toggl.com",
@@ -45277,4 +45390,4 @@ function bootstrapServer(options = {}) {
45277
45390
  //#endregion
45278
45391
  export { runMcpCli as n, bootstrapServer as t };
45279
45392
 
45280
- //# sourceMappingURL=src-BNlkz4O4.js.map
45393
+ //# sourceMappingURL=src-RzQj8FxB.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@togglhq/mcp",
3
- "version": "1.5.27",
3
+ "version": "1.5.29",
4
4
  "description": "Toggl 2.0 MCP server for Claude Code, Claude Desktop, and other MCP clients.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -57,7 +57,7 @@
57
57
  "@toggl/operations": "workspace:^",
58
58
  "@types/node": "22.19.11",
59
59
  "tsdown": "0.21.8",
60
- "vitest": "3.2.4"
60
+ "vitest": "3.2.7"
61
61
  },
62
62
  "mcpName": "io.github.toggl/toggl-mcp"
63
63
  }