From 850c270434a5fade5a5e22d8bc1458d33d8ee929 Mon Sep 17 00:00:00 2001 From: Chris Lettieri Date: Wed, 25 Feb 2026 17:27:49 -0500 Subject: [PATCH] use mcp to write back --- src/services/task-dispatch-service.ts | 2 +- tests/task-dispatch-service.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/task-dispatch-service.ts b/src/services/task-dispatch-service.ts index c82a3b5..f8eadfa 100644 --- a/src/services/task-dispatch-service.ts +++ b/src/services/task-dispatch-service.ts @@ -292,7 +292,7 @@ export class TaskDispatchService { context += `\n\n---\n\n## Linked Context\n${linkedContent}`; } - context += `\n\n---\n\n## Instructions\n\nTask file: ${file.path}\nTask ID: ${taskId}\n\nWork with the context above first. Only search the vault via MCP if needed.\n\nWhen you have results, write them back using:\n python main.py append-results --task-id ${taskId} --input results.json\n\nThe ## Results section of the task note is our shared communication channel.\nLink any files you create as [[wikilinks]] in your results.\n\nYou have MCP tools available for searching the user's Obsidian vault (semantic search, tag search, hub discovery, etc.). Use them to find related notes, look up referenced concepts, or gather additional context when the information above is insufficient.`; + context += `\n\n---\n\n## Instructions\n\nTask file: ${file.path}\nTask ID: ${taskId}\n\nWork with the context above first. Only search the vault via MCP if needed.\n\nWhen you have results, use the MCP append_results tool to write them back to the task note.\nThe ## Results section of the task note is our shared communication channel.\nLink any files you create as [[wikilinks]] in your results.\n\nYou have MCP tools available for searching the user's Obsidian vault (semantic search, tag search, hub discovery, etc.) and for writing results back. Use them to find related notes, look up referenced concepts, or gather additional context when the information above is insufficient.`; // Cap at max characters const maxChars = this.settings.taskDispatch.maxContextChars; diff --git a/tests/task-dispatch-service.test.ts b/tests/task-dispatch-service.test.ts index 5ff531d..b8895e1 100644 --- a/tests/task-dispatch-service.test.ts +++ b/tests/task-dispatch-service.test.ts @@ -280,7 +280,7 @@ describe('TaskDispatchService', () => { expect(context).toContain('## Instructions'); expect(context).toContain('Task file: Notes/Task 1.md'); expect(context).toContain('Task ID: test-1'); - expect(context).toContain('python main.py append-results --task-id test-1'); + expect(context).toContain('MCP append_results tool'); expect(context).toContain('## Results section'); expect(context).toContain('[[wikilinks]]'); });