@spacelr/mcp 0.1.0 → 0.2.1

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/index.mjs CHANGED
@@ -1228,7 +1228,7 @@ function registerDatabaseTools(server, api) {
1228
1228
  server.registerTool(
1229
1229
  "database_collections_update_metadata",
1230
1230
  {
1231
- description: "Update a collection's realtime delivery mode, stream retention, write rate-limit override, or search filter requirements. `realtimeMode: 'stream'` switches the collection to Redis Streams for durable event replay (needed for chat, notifications, activity feeds). `realtimeMode: 'pubsub'` (default) is fire-and-forget, used for dashboards and list views. Exactly one of `streamRetention.maxLen` (approx. entry count) or `streamRetention.maxAgeMs` (retention age in ms) may be set. `writeThrottle` overrides the default per-collection write rate limit (10 writes / 10 s) \u2014 set `enabled: false` to disable entirely (e.g. audit logs), or override `limit` / `windowMs`. `searchConfig.requireFilter` declares top-level filter keys that callers MUST include in every `collection.search()` call to prevent unindexable full-scan regex queries \u2014 affects ALL callers immediately (no deprecation window). Response may include `warnings[]` if the project exceeds the 50-collection soft cap.",
1231
+ description: "Update a collection's realtime delivery mode, stream retention, write rate-limit override, or search filter requirements. `realtimeMode: 'stream'` switches the collection to Redis Streams for durable event replay (needed for chat, notifications, activity feeds). `realtimeMode: 'pubsub'` (default) is fire-and-forget, used for dashboards and list views. Exactly one of `streamRetention.maxLen` (approx. entry count) or `streamRetention.maxAgeMs` (retention age in ms) may be set. `writeThrottle` overrides the default per-collection write rate limit (10 writes / 10 s) \u2014 set `enabled: false` to disable entirely (e.g. audit logs), or override `limit` / `windowMs`. `searchConfig.requireFilter` declares top-level filter keys that callers MUST include in every `collection.search()` call to prevent unindexable full-scan regex queries \u2014 affects ALL callers immediately (no deprecation window). `coldTier` enables/disables archival of aged documents to object storage: set `enabled: true` with `expireField`, `expireAfterMs`, `bucketWindow` (day|week|month) and `segmentSizeBytes`; set `enabled: false` to turn it off. Enabling also triggers index creation on the collection. Response may include `warnings[]` if the project exceeds the 50-collection soft cap.",
1232
1232
  inputSchema: {
1233
1233
  projectId: z4.string(),
1234
1234
  name: z4.string(),
@@ -1264,15 +1264,31 @@ function registerDatabaseTools(server, api) {
1264
1264
  // have no observable effect today and may take on different
1265
1265
  // semantics when enforcement ships. Add back once the feature
1266
1266
  // is live.
1267
- }).strict().optional()
1267
+ }).strict().optional(),
1268
+ coldTier: z4.object({
1269
+ enabled: z4.boolean().describe("Turn cold-tier archival on or off for this collection"),
1270
+ expireField: z4.string().optional().describe("Date/timestamp field that decides a document's age. Required when enabled."),
1271
+ expireAfterMs: z4.number().int().min(1).optional().describe("Archive documents older than this many ms (by expireField). Required when enabled."),
1272
+ partitionField: z4.string().nullable().optional().describe("Optional top-level field to partition segments by (e.g. tenant/room id). null = no partition."),
1273
+ bucketWindow: z4.enum(["day", "week", "month"]).optional().describe("Time window each segment spans. Required when enabled."),
1274
+ segmentSizeBytes: z4.number().int().min(1).optional().describe("Target uncompressed size of a segment before it is flushed. Required when enabled."),
1275
+ maxDocsPerSegment: z4.number().int().min(1).optional().describe("Optional hard cap on documents per segment."),
1276
+ historyPolicy: z4.enum(["full_history", "from_join_time", "from_key_epoch"]).optional().describe("Optional read-history policy for partitioned access.")
1277
+ }).refine(
1278
+ (c) => c.enabled !== true || c.expireField !== void 0 && c.expireAfterMs !== void 0 && c.bucketWindow !== void 0 && c.segmentSizeBytes !== void 0,
1279
+ {
1280
+ message: "When enabled is true, expireField, expireAfterMs, bucketWindow and segmentSizeBytes are all required"
1281
+ }
1282
+ ).optional()
1268
1283
  }
1269
1284
  },
1270
- async ({ projectId, name, realtimeMode, streamRetention, writeThrottle, searchConfig }) => {
1285
+ async ({ projectId, name, realtimeMode, streamRetention, writeThrottle, searchConfig, coldTier }) => {
1271
1286
  try {
1272
1287
  const body = {};
1273
1288
  if (realtimeMode !== void 0) body.realtimeMode = realtimeMode;
1274
1289
  if (streamRetention !== void 0) body.streamRetention = streamRetention;
1275
1290
  if (writeThrottle !== void 0) body.writeThrottle = writeThrottle;
1291
+ if (coldTier !== void 0) body.coldTier = coldTier;
1276
1292
  if (searchConfig !== void 0) {
1277
1293
  const normalized = {};
1278
1294
  if (searchConfig.requireFilter !== void 0) {
@@ -1285,7 +1301,7 @@ function registerDatabaseTools(server, api) {
1285
1301
  content: [
1286
1302
  {
1287
1303
  type: "text",
1288
- text: "At least one of realtimeMode, streamRetention, writeThrottle, or searchConfig must be provided"
1304
+ text: "At least one of realtimeMode, streamRetention, writeThrottle, searchConfig, or coldTier must be provided"
1289
1305
  }
1290
1306
  ],
1291
1307
  isError: true
@@ -3537,8 +3553,143 @@ function registerCronJobTools(server, api) {
3537
3553
  );
3538
3554
  }
3539
3555
 
3540
- // libs/mcp-server/src/tools/webhooks.ts
3556
+ // libs/mcp-server/src/tools/schedules.ts
3541
3557
  import { z as z10 } from "zod";
3558
+ var STATUS_VALUES = ["scheduled", "fired", "failed", "cancelled"];
3559
+ function registerScheduleTools(server, api) {
3560
+ server.registerTool(
3561
+ "schedules_list",
3562
+ {
3563
+ description: "List one-shot scheduled function invocations for a project",
3564
+ inputSchema: {
3565
+ projectId: z10.string(),
3566
+ functionId: z10.string().optional(),
3567
+ status: z10.enum(STATUS_VALUES).optional(),
3568
+ limit: z10.number().int().min(1).max(200).optional(),
3569
+ offset: z10.number().int().min(0).optional()
3570
+ }
3571
+ },
3572
+ async ({ projectId, functionId, status, limit, offset }) => {
3573
+ try {
3574
+ const result = await api.get(
3575
+ `/projects/${encodeURIComponent(projectId)}/schedules`,
3576
+ { params: { functionId, status, limit, offset } }
3577
+ );
3578
+ return {
3579
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
3580
+ };
3581
+ } catch (error) {
3582
+ const message = error instanceof Error ? error.message : String(error);
3583
+ return {
3584
+ content: [{ type: "text", text: `Failed to list schedules: ${message}` }],
3585
+ isError: true
3586
+ };
3587
+ }
3588
+ }
3589
+ );
3590
+ server.registerTool(
3591
+ "schedules_get",
3592
+ {
3593
+ description: "Get a single scheduled invocation by ID",
3594
+ inputSchema: {
3595
+ projectId: z10.string(),
3596
+ scheduleId: z10.string()
3597
+ }
3598
+ },
3599
+ async ({ projectId, scheduleId }) => {
3600
+ try {
3601
+ const result = await api.get(
3602
+ `/projects/${encodeURIComponent(projectId)}/schedules/${encodeURIComponent(scheduleId)}`
3603
+ );
3604
+ return {
3605
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
3606
+ };
3607
+ } catch (error) {
3608
+ const message = error instanceof Error ? error.message : String(error);
3609
+ return {
3610
+ content: [{ type: "text", text: `Failed to get schedule: ${message}` }],
3611
+ isError: true
3612
+ };
3613
+ }
3614
+ }
3615
+ );
3616
+ server.registerTool(
3617
+ "schedules_create",
3618
+ {
3619
+ description: "Schedule a one-shot function invocation. `executeAt` must be ISO-8601 within the configured max-delay window (default 90 days). Repeating with the same `idempotencyKey` returns the existing schedule.",
3620
+ inputSchema: {
3621
+ projectId: z10.string(),
3622
+ functionId: z10.string().regex(/^[a-f0-9]{24}$/i),
3623
+ executeAt: z10.string().describe("ISO-8601 timestamp"),
3624
+ payload: z10.record(z10.string(), z10.unknown()).optional(),
3625
+ idempotencyKey: z10.string().min(1).max(256).optional(),
3626
+ maxAttempts: z10.number().int().min(0).max(10).optional()
3627
+ }
3628
+ },
3629
+ async ({
3630
+ projectId,
3631
+ functionId,
3632
+ executeAt,
3633
+ payload,
3634
+ idempotencyKey,
3635
+ maxAttempts
3636
+ }) => {
3637
+ try {
3638
+ const body = { functionId, executeAt };
3639
+ if (payload !== void 0) body.payload = payload;
3640
+ if (idempotencyKey !== void 0) body.idempotencyKey = idempotencyKey;
3641
+ if (maxAttempts !== void 0) body.maxAttempts = maxAttempts;
3642
+ const result = await api.post(
3643
+ `/projects/${encodeURIComponent(projectId)}/schedules`,
3644
+ { body }
3645
+ );
3646
+ return {
3647
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
3648
+ };
3649
+ } catch (error) {
3650
+ const message = error instanceof Error ? error.message : String(error);
3651
+ return {
3652
+ content: [{ type: "text", text: `Failed to create schedule: ${message}` }],
3653
+ isError: true
3654
+ };
3655
+ }
3656
+ }
3657
+ );
3658
+ server.registerTool(
3659
+ "schedules_cancel",
3660
+ {
3661
+ description: "Cancel a scheduled invocation. Idempotent \u2014 returns the existing record if already in a terminal state (fired/failed/cancelled).",
3662
+ inputSchema: {
3663
+ projectId: z10.string(),
3664
+ scheduleId: z10.string()
3665
+ }
3666
+ },
3667
+ async ({ projectId, scheduleId }) => {
3668
+ try {
3669
+ const result = await api.delete(
3670
+ `/projects/${encodeURIComponent(projectId)}/schedules/${encodeURIComponent(scheduleId)}`
3671
+ );
3672
+ return {
3673
+ content: [
3674
+ {
3675
+ type: "text",
3676
+ text: result ? JSON.stringify(result, null, 2) : "Schedule cancelled"
3677
+ }
3678
+ ]
3679
+ };
3680
+ } catch (error) {
3681
+ const message = error instanceof Error ? error.message : String(error);
3682
+ return {
3683
+ content: [{ type: "text", text: `Failed to cancel schedule: ${message}` }],
3684
+ isError: true
3685
+ };
3686
+ }
3687
+ }
3688
+ );
3689
+ }
3690
+
3691
+ // libs/mcp-server/src/tools/webhooks.ts
3692
+ import { z as z11 } from "zod";
3542
3693
  var WEBHOOK_EVENT_TYPES = [
3543
3694
  "user.created",
3544
3695
  "user.updated",
@@ -3562,7 +3713,7 @@ function registerWebhookTools(server, api) {
3562
3713
  {
3563
3714
  description: "List all webhooks for a project",
3564
3715
  inputSchema: {
3565
- projectId: z10.string()
3716
+ projectId: z11.string()
3566
3717
  }
3567
3718
  },
3568
3719
  async ({ projectId }) => {
@@ -3585,8 +3736,8 @@ function registerWebhookTools(server, api) {
3585
3736
  {
3586
3737
  description: "Get a single webhook by ID",
3587
3738
  inputSchema: {
3588
- projectId: z10.string(),
3589
- webhookId: z10.string()
3739
+ projectId: z11.string(),
3740
+ webhookId: z11.string()
3590
3741
  }
3591
3742
  },
3592
3743
  async ({ projectId, webhookId }) => {
@@ -3609,12 +3760,12 @@ function registerWebhookTools(server, api) {
3609
3760
  {
3610
3761
  description: "Create a new webhook for a project. WARNING: The response includes a secret that will be visible in the conversation context. Events include: user.created, user.updated, user.deleted, user.login, user.email_verified, user.password_reset_requested, user.password_reset, user.2fa_verified, database.insert, database.update, database.delete, storage.upload, storage.delete, project.created, project.updated.",
3611
3762
  inputSchema: {
3612
- projectId: z10.string(),
3613
- url: z10.string().url(),
3614
- events: z10.array(z10.enum(WEBHOOK_EVENT_TYPES)).min(1),
3615
- description: z10.string().optional(),
3616
- headers: z10.record(z10.string(), z10.string()).optional(),
3617
- active: z10.boolean().optional()
3763
+ projectId: z11.string(),
3764
+ url: z11.string().url(),
3765
+ events: z11.array(z11.enum(WEBHOOK_EVENT_TYPES)).min(1),
3766
+ description: z11.string().optional(),
3767
+ headers: z11.record(z11.string(), z11.string()).optional(),
3768
+ active: z11.boolean().optional()
3618
3769
  }
3619
3770
  },
3620
3771
  async ({ projectId, url, events, description, headers, active }) => {
@@ -3641,13 +3792,13 @@ function registerWebhookTools(server, api) {
3641
3792
  {
3642
3793
  description: "Update an existing webhook",
3643
3794
  inputSchema: {
3644
- projectId: z10.string(),
3645
- webhookId: z10.string(),
3646
- url: z10.string().url().optional(),
3647
- events: z10.array(z10.enum(WEBHOOK_EVENT_TYPES)).min(1).optional(),
3648
- description: z10.string().optional(),
3649
- headers: z10.record(z10.string(), z10.string()).optional(),
3650
- active: z10.boolean().optional()
3795
+ projectId: z11.string(),
3796
+ webhookId: z11.string(),
3797
+ url: z11.string().url().optional(),
3798
+ events: z11.array(z11.enum(WEBHOOK_EVENT_TYPES)).min(1).optional(),
3799
+ description: z11.string().optional(),
3800
+ headers: z11.record(z11.string(), z11.string()).optional(),
3801
+ active: z11.boolean().optional()
3651
3802
  }
3652
3803
  },
3653
3804
  async ({ projectId, webhookId, url, events, description, headers, active }) => {
@@ -3682,8 +3833,8 @@ function registerWebhookTools(server, api) {
3682
3833
  {
3683
3834
  description: "Delete a webhook",
3684
3835
  inputSchema: {
3685
- projectId: z10.string(),
3686
- webhookId: z10.string()
3836
+ projectId: z11.string(),
3837
+ webhookId: z11.string()
3687
3838
  }
3688
3839
  },
3689
3840
  async ({ projectId, webhookId }) => {
@@ -3706,8 +3857,8 @@ function registerWebhookTools(server, api) {
3706
3857
  {
3707
3858
  description: "Send a test ping to a webhook",
3708
3859
  inputSchema: {
3709
- projectId: z10.string(),
3710
- webhookId: z10.string()
3860
+ projectId: z11.string(),
3861
+ webhookId: z11.string()
3711
3862
  }
3712
3863
  },
3713
3864
  async ({ projectId, webhookId }) => {
@@ -3730,10 +3881,10 @@ function registerWebhookTools(server, api) {
3730
3881
  {
3731
3882
  description: "List webhook delivery logs for a project",
3732
3883
  inputSchema: {
3733
- projectId: z10.string(),
3734
- webhookId: z10.string().optional(),
3735
- limit: z10.number().int().min(1).max(100).optional(),
3736
- offset: z10.number().int().min(0).optional()
3884
+ projectId: z11.string(),
3885
+ webhookId: z11.string().optional(),
3886
+ limit: z11.number().int().min(1).max(100).optional(),
3887
+ offset: z11.number().int().min(0).optional()
3737
3888
  }
3738
3889
  },
3739
3890
  async ({ projectId, webhookId, limit, offset }) => {
@@ -3756,8 +3907,8 @@ function registerWebhookTools(server, api) {
3756
3907
  {
3757
3908
  description: "Retry a failed webhook delivery",
3758
3909
  inputSchema: {
3759
- projectId: z10.string(),
3760
- deliveryId: z10.string()
3910
+ projectId: z11.string(),
3911
+ deliveryId: z11.string()
3761
3912
  }
3762
3913
  },
3763
3914
  async ({ projectId, deliveryId }) => {
@@ -3778,14 +3929,14 @@ function registerWebhookTools(server, api) {
3778
3929
  }
3779
3930
 
3780
3931
  // libs/mcp-server/src/tools/notifications.ts
3781
- import { z as z11 } from "zod";
3932
+ import { z as z12 } from "zod";
3782
3933
  function registerNotificationTools(server, api) {
3783
3934
  server.registerTool(
3784
3935
  "notification_templates_list",
3785
3936
  {
3786
3937
  description: "List all notification templates for a project (includes system defaults)",
3787
3938
  inputSchema: {
3788
- projectId: z11.string()
3939
+ projectId: z12.string()
3789
3940
  }
3790
3941
  },
3791
3942
  async ({ projectId }) => {
@@ -3808,7 +3959,7 @@ function registerNotificationTools(server, api) {
3808
3959
  {
3809
3960
  description: "Get a single notification template by ID",
3810
3961
  inputSchema: {
3811
- id: z11.string()
3962
+ id: z12.string()
3812
3963
  }
3813
3964
  },
3814
3965
  async ({ id }) => {
@@ -3831,15 +3982,15 @@ function registerNotificationTools(server, api) {
3831
3982
  {
3832
3983
  description: "Create a new project-specific notification template. Variables use Handlebars syntax in titleTemplate and bodyTemplate.",
3833
3984
  inputSchema: {
3834
- projectId: z11.string(),
3835
- type: z11.string(),
3836
- name: z11.string(),
3837
- titleTemplate: z11.string(),
3838
- bodyTemplate: z11.string(),
3839
- icon: z11.string().optional(),
3840
- defaultUrl: z11.string().optional(),
3841
- variables: z11.array(z11.string()).optional(),
3842
- isActive: z11.boolean().optional()
3985
+ projectId: z12.string(),
3986
+ type: z12.string(),
3987
+ name: z12.string(),
3988
+ titleTemplate: z12.string(),
3989
+ bodyTemplate: z12.string(),
3990
+ icon: z12.string().optional(),
3991
+ defaultUrl: z12.string().optional(),
3992
+ variables: z12.array(z12.string()).optional(),
3993
+ isActive: z12.boolean().optional()
3843
3994
  }
3844
3995
  },
3845
3996
  async ({ projectId, type, name, titleTemplate, bodyTemplate, icon, defaultUrl, variables, isActive }) => {
@@ -3867,14 +4018,14 @@ function registerNotificationTools(server, api) {
3867
4018
  {
3868
4019
  description: "Update an existing notification template",
3869
4020
  inputSchema: {
3870
- id: z11.string(),
3871
- name: z11.string().optional(),
3872
- titleTemplate: z11.string().optional(),
3873
- bodyTemplate: z11.string().optional(),
3874
- icon: z11.string().optional(),
3875
- defaultUrl: z11.string().optional(),
3876
- variables: z11.array(z11.string()).optional(),
3877
- isActive: z11.boolean().optional()
4021
+ id: z12.string(),
4022
+ name: z12.string().optional(),
4023
+ titleTemplate: z12.string().optional(),
4024
+ bodyTemplate: z12.string().optional(),
4025
+ icon: z12.string().optional(),
4026
+ defaultUrl: z12.string().optional(),
4027
+ variables: z12.array(z12.string()).optional(),
4028
+ isActive: z12.boolean().optional()
3878
4029
  }
3879
4030
  },
3880
4031
  async ({ id, name, titleTemplate, bodyTemplate, icon, defaultUrl, variables, isActive }) => {
@@ -3911,7 +4062,7 @@ function registerNotificationTools(server, api) {
3911
4062
  {
3912
4063
  description: "Delete a project notification template override (reverts to system default)",
3913
4064
  inputSchema: {
3914
- id: z11.string()
4065
+ id: z12.string()
3915
4066
  }
3916
4067
  },
3917
4068
  async ({ id }) => {
@@ -3934,9 +4085,9 @@ function registerNotificationTools(server, api) {
3934
4085
  {
3935
4086
  description: "Preview a compiled notification template with Handlebars variables applied",
3936
4087
  inputSchema: {
3937
- titleTemplate: z11.string(),
3938
- bodyTemplate: z11.string(),
3939
- variables: z11.record(z11.string(), z11.string())
4088
+ titleTemplate: z12.string(),
4089
+ bodyTemplate: z12.string(),
4090
+ variables: z12.record(z12.string(), z12.string())
3940
4091
  }
3941
4092
  },
3942
4093
  async ({ titleTemplate, bodyTemplate, variables }) => {
@@ -3959,7 +4110,7 @@ function registerNotificationTools(server, api) {
3959
4110
  {
3960
4111
  description: "Get push notification provider configuration for a project (VAPID, FCM, APNS). WARNING: Response may include sensitive credentials that will be visible in the conversation context.",
3961
4112
  inputSchema: {
3962
- projectId: z11.string()
4113
+ projectId: z12.string()
3963
4114
  }
3964
4115
  },
3965
4116
  async ({ projectId }) => {
@@ -3982,24 +4133,24 @@ function registerNotificationTools(server, api) {
3982
4133
  {
3983
4134
  description: "Update push notification provider configuration. Supports VAPID, FCM, and APNS providers. WARNING: privateKey and serviceAccountJson values are sensitive credentials that will be visible in the conversation context.",
3984
4135
  inputSchema: {
3985
- projectId: z11.string(),
3986
- vapid: z11.object({
3987
- publicKey: z11.string().optional(),
3988
- privateKey: z11.string().optional(),
3989
- subject: z11.string().optional(),
3990
- enabled: z11.boolean().optional()
4136
+ projectId: z12.string(),
4137
+ vapid: z12.object({
4138
+ publicKey: z12.string().optional(),
4139
+ privateKey: z12.string().optional(),
4140
+ subject: z12.string().optional(),
4141
+ enabled: z12.boolean().optional()
3991
4142
  }).optional(),
3992
- fcm: z11.object({
3993
- serviceAccountJson: z11.string().optional(),
3994
- enabled: z11.boolean().optional()
4143
+ fcm: z12.object({
4144
+ serviceAccountJson: z12.string().optional(),
4145
+ enabled: z12.boolean().optional()
3995
4146
  }).optional(),
3996
- apns: z11.object({
3997
- keyId: z11.string().optional(),
3998
- teamId: z11.string().optional(),
3999
- privateKey: z11.string().optional(),
4000
- bundleId: z11.string().optional(),
4001
- production: z11.boolean().optional(),
4002
- enabled: z11.boolean().optional()
4147
+ apns: z12.object({
4148
+ keyId: z12.string().optional(),
4149
+ teamId: z12.string().optional(),
4150
+ privateKey: z12.string().optional(),
4151
+ bundleId: z12.string().optional(),
4152
+ production: z12.boolean().optional(),
4153
+ enabled: z12.boolean().optional()
4003
4154
  }).optional()
4004
4155
  }
4005
4156
  },
@@ -4033,8 +4184,8 @@ function registerNotificationTools(server, api) {
4033
4184
  {
4034
4185
  description: "Delete push notification provider configuration. Specify a provider to delete only that one, or omit to delete all.",
4035
4186
  inputSchema: {
4036
- projectId: z11.string(),
4037
- provider: z11.enum(["vapid", "fcm", "apns"]).optional()
4187
+ projectId: z12.string(),
4188
+ provider: z12.enum(["vapid", "fcm", "apns"]).optional()
4038
4189
  }
4039
4190
  },
4040
4191
  async ({ projectId, provider }) => {
@@ -4078,12 +4229,12 @@ function registerNotificationTools(server, api) {
4078
4229
  {
4079
4230
  description: "Send a push notification to selected users",
4080
4231
  inputSchema: {
4081
- projectId: z11.string(),
4082
- userIds: z11.array(z11.string()).min(1),
4083
- title: z11.string(),
4084
- body: z11.string(),
4085
- icon: z11.string().optional(),
4086
- url: z11.string().optional()
4232
+ projectId: z12.string(),
4233
+ userIds: z12.array(z12.string()).min(1),
4234
+ title: z12.string(),
4235
+ body: z12.string(),
4236
+ icon: z12.string().optional(),
4237
+ url: z12.string().optional()
4087
4238
  }
4088
4239
  },
4089
4240
  async ({ projectId, userIds, title, body: notifBody, icon, url }) => {
@@ -4109,11 +4260,11 @@ function registerNotificationTools(server, api) {
4109
4260
  {
4110
4261
  description: "Broadcast a push notification to all subscribed users in a project",
4111
4262
  inputSchema: {
4112
- projectId: z11.string(),
4113
- title: z11.string(),
4114
- body: z11.string(),
4115
- icon: z11.string().optional(),
4116
- url: z11.string().optional()
4263
+ projectId: z12.string(),
4264
+ title: z12.string(),
4265
+ body: z12.string(),
4266
+ icon: z12.string().optional(),
4267
+ url: z12.string().optional()
4117
4268
  }
4118
4269
  },
4119
4270
  async ({ projectId, title, body: notifBody, icon, url }) => {
@@ -4137,20 +4288,20 @@ function registerNotificationTools(server, api) {
4137
4288
  }
4138
4289
 
4139
4290
  // libs/mcp-server/src/tools/auditLogs.ts
4140
- import { z as z12 } from "zod";
4291
+ import { z as z13 } from "zod";
4141
4292
  function registerAuditLogTools(server, api) {
4142
4293
  server.registerTool(
4143
4294
  "audit_logs_list",
4144
4295
  {
4145
4296
  description: "List audit logs for a project. Filter by entity type, action, and date range.",
4146
4297
  inputSchema: {
4147
- projectId: z12.string(),
4148
- entityType: z12.enum(["user", "client", "project", "auth", "database", "storage"]).optional(),
4149
- action: z12.string().optional(),
4150
- startDate: z12.string().datetime().optional(),
4151
- endDate: z12.string().datetime().optional(),
4152
- limit: z12.number().int().min(1).max(100).optional(),
4153
- offset: z12.number().int().min(0).optional()
4298
+ projectId: z13.string(),
4299
+ entityType: z13.enum(["user", "client", "project", "auth", "database", "storage"]).optional(),
4300
+ action: z13.string().optional(),
4301
+ startDate: z13.string().datetime().optional(),
4302
+ endDate: z13.string().datetime().optional(),
4303
+ limit: z13.number().int().min(1).max(100).optional(),
4304
+ offset: z13.number().int().min(0).optional()
4154
4305
  }
4155
4306
  },
4156
4307
  async ({ projectId, entityType, action, startDate, endDate, limit, offset }) => {
@@ -4175,8 +4326,8 @@ function registerAuditLogTools(server, api) {
4175
4326
  {
4176
4327
  description: "Get a single audit log entry by ID",
4177
4328
  inputSchema: {
4178
- projectId: z12.string(),
4179
- logId: z12.string()
4329
+ projectId: z13.string(),
4330
+ logId: z13.string()
4180
4331
  }
4181
4332
  },
4182
4333
  async ({ projectId, logId }) => {
@@ -4207,13 +4358,14 @@ function registerAllTools(server, api) {
4207
4358
  registerFunctionTools(server, api);
4208
4359
  registerEmailTemplateTools(server, api);
4209
4360
  registerCronJobTools(server, api);
4361
+ registerScheduleTools(server, api);
4210
4362
  registerWebhookTools(server, api);
4211
4363
  registerNotificationTools(server, api);
4212
4364
  registerAuditLogTools(server, api);
4213
4365
  }
4214
4366
 
4215
4367
  // libs/mcp-server/src/prompts/database.ts
4216
- import { z as z13 } from "zod";
4368
+ import { z as z14 } from "zod";
4217
4369
  function registerDatabasePrompts(server) {
4218
4370
  server.registerPrompt(
4219
4371
  "setup-collection",
@@ -4221,9 +4373,9 @@ function registerDatabasePrompts(server) {
4221
4373
  title: "Setup Database Collection",
4222
4374
  description: "Guide for creating a new database collection with proper security rules. Collections MUST have rules defined before data can be inserted.",
4223
4375
  argsSchema: {
4224
- projectId: z13.string().describe("Project ID"),
4225
- collectionName: z13.string().describe("Name of the collection to create"),
4226
- access: z13.enum(["public-read", "authenticated", "admin-only"]).optional().describe("Access level (default: admin-only)")
4376
+ projectId: z14.string().describe("Project ID"),
4377
+ collectionName: z14.string().describe("Name of the collection to create"),
4378
+ access: z14.enum(["public-read", "authenticated", "admin-only"]).optional().describe("Access level (default: admin-only)")
4227
4379
  }
4228
4380
  },
4229
4381
  async ({ projectId, collectionName, access }) => {
@@ -4288,7 +4440,7 @@ function registerDatabasePrompts(server) {
4288
4440
  title: "Database Workflow Guide",
4289
4441
  description: "Explains how the Spacelr database system works: rules-first approach, collection lifecycle, and security model.",
4290
4442
  argsSchema: {
4291
- projectId: z13.string().describe("Project ID")
4443
+ projectId: z14.string().describe("Project ID")
4292
4444
  }
4293
4445
  },
4294
4446
  async ({ projectId }) => {
@@ -4337,7 +4489,7 @@ function registerDatabasePrompts(server) {
4337
4489
  }
4338
4490
 
4339
4491
  // libs/mcp-server/src/prompts/functions.ts
4340
- import { z as z14 } from "zod";
4492
+ import { z as z15 } from "zod";
4341
4493
  function registerFunctionPrompts(server) {
4342
4494
  server.registerPrompt(
4343
4495
  "deploy-function",
@@ -4345,9 +4497,9 @@ function registerFunctionPrompts(server) {
4345
4497
  title: "Deploy a Serverless Function",
4346
4498
  description: "Step-by-step guide for creating, deploying, and testing a serverless function. Covers the full lifecycle from creation to execution.",
4347
4499
  argsSchema: {
4348
- projectId: z14.string().describe("Project ID"),
4349
- name: z14.string().describe("Function name"),
4350
- useCase: z14.string().optional().describe('What the function should do (e.g. "fetch data from API and store in DB")')
4500
+ projectId: z15.string().describe("Project ID"),
4501
+ name: z15.string().describe("Function name"),
4502
+ useCase: z15.string().optional().describe('What the function should do (e.g. "fetch data from API and store in DB")')
4351
4503
  }
4352
4504
  },
4353
4505
  async ({ projectId, name, useCase }) => {