You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Invalid workspace - search all content with informative message
101
+
constmessage=availableWorkspaces.length>0
102
+
? `Note: Workspace '${workspace}' not found. Searching all content instead. Available workspaces: ${availableWorkspaces.join(', ')}. Use server_info tool to see workspace details.`
103
+
: `Note: Workspace '${workspace}' not found and no workspaces are configured. Searching all indexed content.`;
Copy file name to clipboardExpand all lines: src/mcp.ts
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,7 @@ Example queries:
108
108
},
109
109
workspace: {
110
110
type: 'string',
111
-
description: 'Optional workspace name to filter search results. Only files within the workspace directories will be searched. Use server_info to see available workspaces.'
111
+
description: 'Optional workspace name to filter search results. Only files within the workspace directories will be searched. IMPORTANT: Use server_info tool first to discover available workspace names - using invalid workspace names will result in empty results.'
112
112
}
113
113
},
114
114
required: ['query']
@@ -150,7 +150,7 @@ Returns file paths with similarity scores. Use get_content to read full files or
150
150
},
151
151
workspace: {
152
152
type: 'string',
153
-
description: 'Optional workspace name to filter results. Only files within the workspace directories will be considered. Use server_info to see available workspaces.'
153
+
description: 'Optional workspace name to filter results. Only files within the workspace directories will be considered. IMPORTANT: Use server_info tool first to discover available workspace names - using invalid workspace names will result in empty results.'
154
154
}
155
155
},
156
156
required: ['file_path']
@@ -235,6 +235,7 @@ Returns chunk content as text. Use this with chunk IDs from search results to ge
235
235
description: `Get information about server status and indexed content. Shows what directories and files are available for search.
236
236
237
237
When to use this tool:
238
+
- REQUIRED: Check available workspace names before using workspace parameter in search or similar_files tools
238
239
- Check what content is already indexed before performing searches
239
240
- Verify system is working properly
240
241
- See indexing statistics and status
@@ -244,14 +245,16 @@ How it works:
244
245
- Reports total indexed directories, files, and chunks
245
246
- Shows database size and last indexing time
246
247
- Lists all indexed directories with file counts
248
+
- Lists all configured workspaces with their paths and file counts
247
249
- Reports any errors or issues
248
250
249
251
Examples:
252
+
- Check workspaces before searching: "What workspaces are available?"
250
253
- Check before searching: "What content is indexed?"
251
254
- Verify after indexing: "Did the indexing complete successfully?"
252
255
- Monitor system: "How many files are searchable?"
253
256
254
-
Returns server version, indexing statistics, directory list, and any errors. Use this to understand what content is available for search and similar_files tools.`,
257
+
Returns server version, indexing statistics, directory list, workspace information, and any errors. IMPORTANT: Always use this tool first to discover available workspace names when you need to search within specific workspaces.`,
0 commit comments