Overview
The/search endpoint performs full-text search across observations, sessions, or user data. It supports multiple search types and returns compact results optimized for MCP progressive disclosure.
Authentication
This endpoint requires a valid authentication token if configured:Request
Search query string. Empty query returns recent observations ordered by recency with decay weighting.
Type of search to perform:
"observations": Search tool observations (default)"sessions": Search session prompts and metadata"user": Search user-provided observations"recent": Get recent observations with decay scoring (ignores query)
Filter results to a specific project. If omitted, searches across all projects.
Maximum number of results to return. Must be between 1 and 100.
Response
Array of compact search results. Each result contains:
Database ID of the observation or session.
Creation date in YYYY-MM-DD format.
Tool name (for observations) or session status (for sessions).
Compressed summary or first user prompt (truncated to 120 characters).
Comma-separated list of referenced file paths (if available).
Weighted ranking score (higher is more relevant). 0 for non-scored results.
Total number of results returned (always matches
results.length).Error message if the request failed.
Examples
Search Observations
Search Sessions
Get Recent Observations
Empty Query (Recency-Based)
Status Codes
- 200 OK: Search completed successfully
- 401 Unauthorized: Missing or invalid authentication token
- 500 Internal Server Error: Search query failed
Use Cases
- Find relevant past observations for context injection
- Search session history by user prompts
- Discover similar work across projects
- Retrieve recent activity with time-decay weighting
- Browse user-provided documentation and notes