refactor(tools): consolidate LLM tools from 42 to 38

Merge create_task into create_note (set status='todo' for tasks, omit
for notes), merge delete_task into delete_note, consolidate entity
tools (create/update_person → save_person, create/update_place →
save_place), rename get_note → read_note with clearer descriptions,
move calculate out of rag.py into utility.py, and extract shared
duplicate detection into check_duplicate() helper.

Updates all downstream references in generation_task.py, quick_capture.py,
ToolCallCard.vue, and WorkspaceView.vue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-12 13:38:45 -04:00
parent e95ad90055
commit 77339d5c58
12 changed files with 278 additions and 378 deletions
+8 -8
View File
@@ -12,10 +12,9 @@ logger = logging.getLogger(__name__)
@tool(
name="search_web",
description=(
"Search the web for quick information and answer the user's question from results. "
"Use for factual lookups, current events, version numbers, quick definitions, or any question "
"where a fast web answer is needed without creating a note. "
"Use research_topic instead when the user explicitly wants a comprehensive note or deep research."
"Quick web lookup — returns search result snippets for factual questions, current events, "
"definitions, or version numbers. No note is saved. Use research_topic when the user wants "
"a comprehensive written report saved as a note."
),
parameters={
"query": {"type": "string", "description": "The search query"},
@@ -40,9 +39,10 @@ async def search_web_tool(*, user_id, arguments, **_ctx):
@tool(
name="research_topic",
description=(
"Research a topic by searching the web and compiling a note with cited sources. "
"Use for 'research X', 'look up X', 'find information about X', "
"'compile notes on X'. Takes 30120 seconds."
"Deep web research — searches multiple sources, synthesizes findings, and saves the result "
"as a structured note with sections and citations. Use when the user says 'research', "
"'look into', or wants a comprehensive write-up. Takes 30120 seconds. "
"For a quick factual answer without saving a note, use search_web."
),
parameters={
"topic": {"type": "string", "description": "The topic or question to research"},
@@ -64,7 +64,7 @@ async def research_topic_tool(*, user_id, arguments, **_ctx):
@tool(
name="search_images",
description="Search and display images inline. Use ONLY when user explicitly asks to see or show an image or photo. Not for factual questions.",
description="Search and display images inline. Use ONLY when the user explicitly asks to see, show, or find an image or photo. Not for factual questions — use search_web for those.",
parameters={
"query": {"type": "string", "description": "The image search query"},
},