Context Search
Endpoint to search contexts with flexible filtering options and smart word-based matching. Note: Only returns contexts matching the criteria and does not include the description field.
Args: query (Optional[str]): Search query to match against name, summary, type, and description. Splits into words and matches if ANY word is found. type (Optional[str]): Filter contexts by specific type. status (Optional[str]): Filter by status (default: “active”). max_results (int): Maximum number of results to return (default: 5).
Returns:
List[ContextListItem]: A list of ContextListItem model instances matching the search criteria,
sorted by relevance score (number of matching words).
Raises: HTTPException 500: If an error occurs while retrieving contexts from the database.
Examples:
- /context/search?query=keyword - Search for “keyword” in name, summary, type
- /context/search?type=Skill - Filter by type “Skill”
- /context/search?query=api&type=Tool - Search for “api” within “Tool” type
- /context/search?status=disabled&max_results=10 - Get top 10 disabled contexts
Authorizations
JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'
Query Parameters
Search query for name, summary, or type
Filter by context type
Filter by status (active/disabled)
Maximum number of results to return
Response
Successful Response
Unique identifier for the context
Name of the context
User who created the context
The date and time when the context was created.
The date and time when the context was last updated.
List of associated apps
A short summary about the context
A short summary explaining to LLM when to apply the context
A string to classify the context type
Status of the context: active or disabled
