What it does
Searches your memory store for rules, lessons, and past decisions relevant to an action you’re about to take. Returns a checklist of applicable constraints, warnings, and past mistakes to help you avoid repeating errors. Always call this before configuration changes, file deletions, API writes, external messages, or production system modifications.Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| action | string | Yes | — | Description of the action you are about to take. Must be at least 3 characters. |
| limit | number | No | 10 | Maximum number of memory items to return. Range: 1-20. |
Returns
action— Echo of your input action descriptionchecklist— Formatted markdown with rules, lessons, decisions organized by typeitemCount— Total number of relevant memories foundmemories— Array of matching memory records (if available)
Examples
Basic usage
Advanced usage
When to use this vs alternatives
crystal_preflight— Before ANY risky action (config, delete, external message, production change)crystal_recall— When you need general context about a topic, not safety/decision guidancecrystal_why_did_we— When you want to understand WHY a specific past decision was made
Error handling
| Error | Cause | Resolution |
|---|---|---|
| ”Invalid arguments” | args is not an object | Pass a valid object with action property |
| ”action is required” | action is missing or empty | Provide a non-empty action string (≥3 chars) |
| “limit must be a number” | limit is provided but not numeric | Omit limit or provide a number in range 1-20 |
| Embedding service unavailable | OpenAI API down or unreachable | Retry; the tool will degrade gracefully (API-key auth routes fallback to HTTP) |
| No relevant memories found | No rules/lessons/decisions match the action | This is not an error — proceed with standard caution |
Notes
- Searches across rules, lessons, and decisions (categories:
rule,lesson,decision) - Stores (
procedural,semantic,prospective) are automatically weighted - Memory titles are always shown; full content is available in the JSON response if needed
- The checklist is formatted with a defense header to prevent injection
- If no memories match, the checklist advises “proceed with standard caution”
- Use this BEFORE committing to the action, not after
- The tool supports both API-key auth (HTTP endpoint) and Convex JWT (query-based) seamlessly
