fts_search
Search journal entries with relevance-ranked full-text queries. Supports phrases, prefixes, boolean and proximity search plus filters by journal, year, date range, and starred status.
Instructions
Full-text search with relevance ranking.
Uses FTS5 for fast, ranked search results. Must run fts_sync first to build/update the search index.
Query syntax: - Basic terms: startup ideas (matches entries with both words) - Phrases: "morning run" (exact phrase match) - Prefix: build* (matches build, building, builder) - Boolean NOT: startup NOT fintech (has startup, excludes fintech) - Boolean AND: startup AND ideas (explicit AND, same as space) - Boolean OR: startup OR ideas (either term) - Proximity: NEAR(morning run, 5) (words within 5 tokens of each other)
Note: "AND NOT" is not valid syntax - use just "NOT" instead.
Results are ranked by relevance (BM25), not by date.
Args: query: FTS5 search query (see syntax above) limit: Maximum number of results (1-50, default 20) journal: Optional journal name filter starred_only: Only return starred entries year: Optional year filter (e.g., 2024) date_from: Optional start date filter (YYYY-MM-DD) date_to: Optional end date filter (YYYY-MM-DD) full_text: If True, returns complete entry text instead of snippet
Returns: Formatted search results with relevance-ranked snippets
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "fts_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | ||
| limit | No | ||
| query | Yes | ||
| date_to | No | ||
| journal | No | ||
| date_from | No | ||
| full_text | No | ||
| starred_only | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |