Skip to content

Voice-to-text dictation app with local (Nvidia Parakeet/Whisper) and cloud models (BYOK). Privacy-first and available cross-platform.

chore(agent): encourage semantic folder matching in tool descriptions

Gabriel Stein3e60a91fb3c2
diff --git a/src/config/prompts.ts b/src/config/prompts.ts
index 618f30c3f..677a32550 100644
--- a/src/config/prompts.ts
+++ b/src/config/prompts.ts
@@ -153,11 +153,11 @@ const TOOL_INSTRUCTIONS: Record<string, string> = {
get_note:
"Use get_note to fetch the full content of a specific note by ID. If the current note's ID is provided in the context, use it directly. Otherwise, use search_notes first to find the note ID.",
create_note:
- "Use create_note when the user asks you to create, write, or draft a new note. If the user specifies a folder, call list_folders first and reuse a matching existing folder (case-insensitive, tolerant of plurals/typos) instead of creating a near-duplicate. Only pass a new folder name when no existing folder is a reasonable fit.",
+ "Use create_note when the user asks you to create, write, or draft a new note. Whenever the note will go into a folder, call list_folders first and reuse an existing folder whose name is a reasonable fit for the note's topic (e.g. a new story belongs in an existing 'Stories' folder) — do this even when the user didn't name a folder but the content clearly fits one. Only pass a new folder name when nothing existing fits. Be tolerant of case, plurals, and typos.",
update_note:
- "Use update_note to modify an existing note's title, content, or move it to a different folder. If the current note's ID is provided in the context, use it directly. Otherwise, use search_notes first to find the note ID. When moving to a folder, call list_folders first and prefer an existing folder over creating a new one.",
+ "Use update_note to modify an existing note's title, content, or move it to a different folder. If the current note's ID is provided in the context, use it directly. Otherwise, use search_notes first to find the note ID. When moving to a folder, call list_folders first and reuse an existing folder whose name fits the note's topic; only create a new folder when nothing existing fits.",
list_folders:
- "Use list_folders before create_note or update_note whenever the user mentions a folder, so you can reuse an existing folder instead of creating a near-duplicate.",
+ "Use list_folders before create_note or update_note whenever a note is going into a folder, so you can reuse an existing folder whose name fits the note's topic instead of creating a near-duplicate.",
web_search:
"Use web_search for questions about current events, facts you're unsure about, or anything requiring up-to-date information.",
copy_to_clipboard:
diff --git a/src/services/tools/createNoteTool.ts b/src/services/tools/createNoteTool.ts
index 3d6419612..5c2fbf982 100644
--- a/src/services/tools/createNoteTool.ts
+++ b/src/services/tools/createNoteTool.ts
@@ -5,7 +5,7 @@ import { syncNoteToCloud } from "../../stores/noteStore";
export const createNoteTool: ToolDefinition = {
name: "create_note",
description:
- "Always call list_folders first and reuse an existing folder when the user mentions one; only pass a new folder name when none fits. Creates a note with title, content, and optional folder (auto-created if missing).",
+ "Always call list_folders first. Reuse an existing folder whenever one is a reasonable semantic fit for the note's topic (e.g. a story goes into an existing 'Stories' folder), even if the user didn't name it. Only pass a new folder name when nothing existing fits. Creates a note with title, content, and optional folder (auto-created if missing).",
parameters: {
type: "object",
properties: {
diff --git a/src/services/tools/updateNoteTool.ts b/src/services/tools/updateNoteTool.ts
index e0382c383..610dbd8b3 100644
--- a/src/services/tools/updateNoteTool.ts
+++ b/src/services/tools/updateNoteTool.ts
@@ -5,7 +5,7 @@ import { syncNoteUpdateToCloud } from "../../stores/noteStore";
export const updateNoteTool: ToolDefinition = {
name: "update_note",
description:
- "Before moving to a folder, always call list_folders first and reuse an existing folder when the user mentions one; only pass a new folder name when none fits. Updates a note's title, content, or folder (auto-created if missing). Use the note ID from context if provided; otherwise search_notes first.",
+ "Before moving to a folder, always call list_folders first. Reuse an existing folder whenever one is a reasonable semantic fit for the note's topic, even if the user didn't name it. Only pass a new folder name when nothing existing fits. Updates a note's title, content, or folder (auto-created if missing). Use the note ID from context if provided; otherwise search_notes first.",
parameters: {
type: "object",
properties: {