contxt suggest
Retrieve the most relevant memory entries for a task. The same relevance engine used by the MCP contxt_suggest tool — available directly from the terminal.
Usage
$contxt suggest --task "add Stripe webhook handler"
Example output
Relevant context for: "add Stripe webhook handler" [decision] JWT in httpOnly cookies (stateless, refresh rotation) score: 0.91 [pattern] API routes: Zod schema → validate → handler → typed response score: 0.87 [decision] Use Prisma for ORM (better TS support than Drizzle) score: 0.74 [context] Currently building user onboarding flow. Blocked on Stripe webhook integration. score: 0.68
Flags
| Flag | Default | Description |
|---|---|---|
| --task | required | Natural language description of the task to find context for |
| --limit | 5 | Maximum number of results to return |
| --min-score | 0.6 | Minimum relevance score (0–1). Results below this threshold are omitted |
| --type | all | Filter by memory type: decision, pattern, stack, context |
| --json | false | Output results as JSON |
Relevance scoring
On Pro plans, relevance is computed with vector similarity — each entry is embedded at write time and compared against the task embedding at query time. On the Free plan, full-text search is used instead (keyword matching, no embedding).
Scores range from 0 to 1. A score of 0.8+ indicates strong relevance; below 0.6 is typically noise. The default --min-score 0.6 filters most irrelevant results without being too aggressive.
Relation to MCP
When an AI editor calls the contxt_suggest MCP tool, it runs the same query under the hood — the CLI exposes the same engine for scripting and debugging. You can use contxt suggest to preview exactly what context your AI will receive before starting a session.
# Preview what your AI will see for a given task$contxt suggest --task "refactor auth middleware" --limit 10