fathom-mcp 0.4.9 → 0.4.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fathom-mcp",
3
- "version": "0.4.9",
3
+ "version": "0.4.10",
4
4
  "description": "MCP server for Fathom — vault operations, search, rooms, and cross-workspace communication",
5
5
  "type": "module",
6
6
  "bin": {
package/src/index.js CHANGED
@@ -291,6 +291,55 @@ const tools = [
291
291
  required: ["workspace", "message"],
292
292
  },
293
293
  },
294
+ {
295
+ name: "fathom_routine_create",
296
+ description:
297
+ "Create a new ping routine for a workspace. Routines fire on an interval and inject " +
298
+ "context into the persistent session. Use single_fire for one-shot routines that " +
299
+ "auto-disable after firing once. All parameters are optional with sensible defaults.",
300
+ inputSchema: {
301
+ type: "object",
302
+ properties: {
303
+ name: { type: "string", description: "Routine name. Default: 'New Routine'." },
304
+ enabled: { type: "boolean", description: "Start enabled. Default: false." },
305
+ interval_minutes: { type: "integer", description: "Minutes between pings. Default: 60.", minimum: 1 },
306
+ single_fire: { type: "boolean", description: "Auto-disable after firing once. Default: false." },
307
+ workspace: WORKSPACE_PROP,
308
+ context_sources: {
309
+ type: "object",
310
+ description: "What to inject on each ping.",
311
+ properties: {
312
+ time: { type: "boolean", description: "Include current time/date. Default: true." },
313
+ scripts: {
314
+ type: "array",
315
+ description: "Shell commands to run and inject output.",
316
+ items: {
317
+ type: "object",
318
+ properties: {
319
+ label: { type: "string" },
320
+ command: { type: "string" },
321
+ enabled: { type: "boolean" },
322
+ },
323
+ },
324
+ },
325
+ texts: {
326
+ type: "array",
327
+ description: "Static text blocks to inject.",
328
+ items: {
329
+ type: "object",
330
+ properties: {
331
+ label: { type: "string" },
332
+ content: { type: "string" },
333
+ enabled: { type: "boolean" },
334
+ },
335
+ },
336
+ },
337
+ },
338
+ },
339
+ },
340
+ required: [],
341
+ },
342
+ },
294
343
  ];
295
344
 
296
345
  // --- Vault routing by mode ---------------------------------------------------
@@ -480,6 +529,16 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
480
529
  case "fathom_send":
481
530
  result = await client.sendToWorkspace(args.workspace, args.message, config.workspace);
482
531
  break;
532
+ case "fathom_routine_create": {
533
+ const routineParams = {};
534
+ if (args.name != null) routineParams.name = args.name;
535
+ if (args.enabled != null) routineParams.enabled = args.enabled;
536
+ if (args.interval_minutes != null) routineParams.intervalMinutes = args.interval_minutes;
537
+ if (args.single_fire != null) routineParams.singleFire = args.single_fire;
538
+ if (args.context_sources != null) routineParams.contextSources = args.context_sources;
539
+ result = await client.createRoutine(routineParams, args.workspace || config.workspace);
540
+ break;
541
+ }
483
542
  default:
484
543
  result = { error: `Unknown tool: ${name}` };
485
544
  }
@@ -539,6 +598,13 @@ async function startupSync() {
539
598
  await client.pushFile(config.workspace, filePath, content);
540
599
  }
541
600
  }
601
+
602
+ // Delete server files that no longer exist locally (local is source of truth)
603
+ if (diff.deleted?.length) {
604
+ for (const filePath of diff.deleted) {
605
+ await client.deleteFile(config.workspace, filePath);
606
+ }
607
+ }
542
608
  } catch {
543
609
  // Sync failure is non-fatal — local vault is source of truth
544
610
  }
@@ -551,6 +617,7 @@ async function main() {
551
617
  vault: config._rawVault,
552
618
  description: config.description,
553
619
  agents: config.agents,
620
+ type: config.vaultMode,
554
621
  }).catch(() => {});
555
622
  }
556
623
 
@@ -190,6 +190,21 @@ export function createClient(config) {
190
190
  });
191
191
  }
192
192
 
193
+ // --- Activation / Routines -------------------------------------------------
194
+
195
+ async function createRoutine(params, ws) {
196
+ const body = {};
197
+ if (params.name != null) body.name = params.name;
198
+ if (params.enabled != null) body.enabled = params.enabled;
199
+ if (params.intervalMinutes != null) body.intervalMinutes = params.intervalMinutes;
200
+ if (params.singleFire != null) body.singleFire = params.singleFire;
201
+ if (params.contextSources != null) body.contextSources = params.contextSources;
202
+ return request("POST", "/api/activation/ping/routines", {
203
+ params: { workspace: ws },
204
+ body,
205
+ });
206
+ }
207
+
193
208
  // --- Auth ------------------------------------------------------------------
194
209
 
195
210
  async function getApiKey() {
@@ -229,6 +244,7 @@ export function createClient(config) {
229
244
  listFiles,
230
245
  pushFile,
231
246
  syncManifest,
247
+ createRoutine,
232
248
  getApiKey,
233
249
  healthCheck,
234
250
  };