@@ -427,6 +427,8 @@ await write_note(
427427)
428428```
429429
430+ > ** Important** : ` write_note ` errors if the note already exists. Use ` edit_note ` for incremental changes, or pass ` overwrite=True ` to replace.
431+
430432** Well-structured note** :
431433
432434``` python
@@ -760,6 +762,9 @@ notes = await read_note(
760762 identifier = " memory://specs/*" ,
761763 project = " main"
762764)
765+
766+ # Cross-project URL (auto-routes to the correct project)
767+ note = await read_note(identifier = " memory://research/specs/api-design" )
763768```
764769
765770``` python
@@ -1069,7 +1074,10 @@ results = await search_notes(
10691074
10701075### Search Types
10711076
1072- ** Text search (default)** :
1077+ Available types: ` "text" ` , ` "title" ` , ` "permalink" ` , ` "vector" ` /` "semantic" ` , ` "hybrid" ` .
1078+ Default is ` "hybrid" ` when semantic search is enabled, ` "text" ` otherwise.
1079+
1080+ ** Text search** :
10731081
10741082``` python
10751083# Full-text search across all content
@@ -1080,17 +1088,52 @@ results = await search_notes(
10801088)
10811089```
10821090
1083- ** Semantic search** :
1091+ ** Title and permalink search** :
1092+
1093+ ``` python
1094+ # Search by title only
1095+ results = await search_notes(query = " API Design" , search_type = " title" , project = " main" )
1096+
1097+ # Search by permalink
1098+ results = await search_notes(query = " specs/api-design" , search_type = " permalink" , project = " main" )
1099+ ```
1100+
1101+ ** Semantic/vector search** :
10841102
10851103``` python
10861104# Semantic/vector search (if enabled)
1105+ results = await search_notes(
1106+ query = " user login security" ,
1107+ search_type = " semantic" , # or "vector"
1108+ project = " main"
1109+ )
1110+
1111+ # Override similarity threshold
10871112results = await search_notes(
10881113 query = " user login security" ,
10891114 search_type = " semantic" ,
1115+ min_similarity = 0.5 ,
10901116 project = " main"
10911117)
10921118```
10931119
1120+ ** Hybrid search** (combines text + semantic):
1121+
1122+ ``` python
1123+ results = await search_notes(
1124+ query = " authentication best practices" ,
1125+ search_type = " hybrid" ,
1126+ project = " main"
1127+ )
1128+ ```
1129+
1130+ ** Tag shorthand in query** :
1131+
1132+ ``` python
1133+ # Use tag: prefix as shorthand
1134+ results = await search_notes(query = " tag:security" , project = " main" )
1135+ ```
1136+
10941137### Search Response
10951138
10961139** Result structure** :
@@ -2161,6 +2204,31 @@ active_project = projects[0]["name"]
21612204results = await search_notes(query = " test" , project = active_project)
21622205```
21632206
2207+ ### Note Already Exists
2208+
2209+ ** Error** : ` write_note ` called for a note that already exists
2210+
2211+ ** Solution** :
2212+
2213+ ``` python
2214+ # Preferred: use edit_note for incremental updates
2215+ await edit_note(
2216+ identifier = " Existing Topic" ,
2217+ operation = " append" ,
2218+ content = " \n - [update] new information" ,
2219+ project = " main"
2220+ )
2221+
2222+ # Alternative: replace the entire note
2223+ await write_note(
2224+ title = " Existing Topic" ,
2225+ content = " # Existing Topic\n ..." ,
2226+ folder = " notes" ,
2227+ overwrite = True ,
2228+ project = " main"
2229+ )
2230+ ```
2231+
21642232### Entity Not Found
21652233
21662234** Error** : Note doesn't exist
@@ -2716,14 +2784,15 @@ await write_note(
27162784
27172785### Content Management
27182786
2719- ** write_note(title, content, folder, tags, note_type, project)**
2720- - Create or update markdown notes
2787+ ** write_note(title, content, folder, tags, note_type, overwrite, project)**
2788+ - Create new markdown notes (errors if note already exists unless overwrite=True)
27212789- Parameters:
27222790 - ` title ` (required): Note title
27232791 - ` content ` (required): Markdown content
27242792 - ` folder ` (required): Destination folder
27252793 - ` tags ` (optional): List of tags
27262794 - ` note_type ` (optional): Type of note (stored in frontmatter). Can be "note", "person", "meeting", "guide", etc.
2795+ - ` overwrite ` (optional): Set to True to replace an existing note (default: error if exists)
27272796 - ` project ` (required unless default_project_mode): Target project
27282797- Returns: Created/updated entity with permalink
27292798- Example:
@@ -2890,19 +2959,20 @@ contents = await list_directory(
28902959
28912960### Search & Discovery
28922961
2893- ** search_notes(query, page, page_size, search_type, types, entity_types, after_date, metadata_filters, tags, status, project)**
2962+ ** search_notes(query, page, page_size, search_type, types, entity_types, after_date, metadata_filters, tags, status, min_similarity, project)**
28942963- Search across knowledge base
28952964- Parameters:
2896- - ` query ` (required ): Search query
2965+ - ` query ` (optional ): Search query (not required for filter-only searches)
28972966 - ` page ` (optional): Page number (default: 1)
28982967 - ` page_size ` (optional): Results per page (default: 10)
2899- - ` search_type ` (optional): "text" or " semantic"
2968+ - ` search_type ` (optional): "text", "title", "permalink", "vector"/" semantic", "hybrid" (default: "hybrid" when semantic enabled, "text" otherwise)
29002969 - ` types ` (optional): Entity type filter
29012970 - ` entity_types ` (optional): Observation category filter
29022971 - ` after_date ` (optional): Date filter (ISO format)
2903- - ` metadata_filters ` (optional): Structured frontmatter filters (dict)
2904- - ` tags ` (optional): Frontmatter tags filter (list)
2972+ - ` metadata_filters ` (optional): Structured frontmatter filters (dict, supports ` $in ` , ` $gt ` , ` $gte ` , ` $lt ` , ` $lte ` , ` $between ` operators )
2973+ - ` tags ` (optional): Frontmatter tags filter (list); also available via ` tag: ` query shorthand
29052974 - ` status ` (optional): Frontmatter status filter (string)
2975+ - ` min_similarity ` (optional): Override similarity threshold for vector/hybrid search
29062976 - ` project ` (required unless default_project_mode): Target project
29072977- Returns: Matching entities with scores
29082978- Example:
@@ -2971,6 +3041,15 @@ await delete_project(project_name="old-project")
29713041status = await sync_status(project = " main" )
29723042```
29733043
3044+ ** list_workspaces()**
3045+ - List available workspaces (cloud)
3046+ - Parameters: None
3047+ - Returns: List of workspaces with metadata
3048+ - Example:
3049+ ``` python
3050+ workspaces = await list_workspaces()
3051+ ```
3052+
29743053### Visualization
29753054
29763055** canvas(nodes, edges, title, folder, project)**
@@ -3239,8 +3318,8 @@ await edit_note(
32393318 project = " main"
32403319)
32413320
3242- # Avoid: Complete rewrite
3243- # (unless necessary for major restructuring )
3321+ # When full rewrite is needed, use overwrite=True
3322+ await write_note( title = " Note " , content = " ... " , folder = " notes " , overwrite = True )
32443323```
32453324
32463325### 14. Tagging Strategy
0 commit comments