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
feat: add document chunking and search content modes (chunk/truncated/full)
Implement document chunking for large markdown files and extend the
search() content parameter to support string modes ('chunk', 'truncated',
'full') alongside the existing boolean values for backward compatibility.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: src/holoviz_mcp/apps/holoviz_search.py
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,11 @@
40
40
- **`query`**: Your search text - the tool uses semantic similarity to find the most relevant documents
41
41
- **`project`**: Filter results by specific project (e.g., "panel", "hvplot", "datashader") or search across all projects
42
42
- **`max_results`**: Control the number of results returned (1-50 documents)
43
-
- **`content`**: Choose whether to include full document content or just metadata for faster responses
43
+
- **`content`**: Controls what content is returned per result:
44
+
- `"truncated"` (default): Full document content, smart-truncated around query keywords
45
+
- `"chunk"`: Only the best-matching chunk from the document (useful for quick snippets)
46
+
- `"full"`: Complete document content with no truncation (can be very large)
47
+
- `"none"`: No content, metadata only (fastest)
44
48
- **`max_content_chars`**: Maximum characters of content per result (100-50,000). Smaller values provide faster responses. Content is truncated at word boundaries with query-relevant excerpts.
45
49
46
50
### Query Optimization Tips
@@ -103,8 +107,11 @@ class SearchConfiguration(param.Parameterized):
103
107
104
108
max_results=param.Integer(default=2, bounds=(1, 50), doc="Maximum number of search results to return")
105
109
106
-
content=param.Boolean(
107
-
default=True, label="Include Full Content", doc="Include full document content in results. Disable for faster and simpler responses with metadata only."
110
+
content=param.Selector(
111
+
default="truncated",
112
+
objects=["truncated", "chunk", "full", "none"],
113
+
doc='Controls what content is returned. "truncated": full doc smart-truncated around query keywords (default). '
114
+
'"chunk": only best-matching chunk. "full": complete document, no truncation. "none": metadata only (fastest).',
0 commit comments