recall
Retrieve relevant past feedback, memories, and prevention rules for current tasks to apply previous learnings and avoid repeating mistakes.
Instructions
Recall relevant past feedback, memories, and prevention rules for the current task. Call this at the start of any task to inject past learnings into the conversation.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Describe the current task or context to find relevant past feedback | |
| limit | No | Max memories to return (default 5) | |
| repoPath | No | Optional repository path for structural impact analysis on coding tasks |
Implementation Reference
- adapters/mcp/server-stdio.js:121-146 (handler)The `buildRecallResponse` function implements the logic for the "recall" tool, which constructs a context pack based on a query, analyzes code graph impact, and formats the response.
function buildRecallResponse(args = {}) { const limit = checkLimit('recall'); ensureContextFs(); const pack = constructContextPack({ query: args.query || '', maxItems: Number(args.limit || 5), }); const impact = analyzeCodeGraphImpact({ intentId: null, context: args.query || '', repoPath: args.repoPath, }); const section = formatCodeGraphRecallSection(impact); let text = section ? `${formatContextPack(pack)}\n\n${section}` : formatContextPack(pack); if (!limit.allowed) { text += '\n\n---\n'; text += 'Upgrade to Context Gateway for unlimited recall, shared workflow memory, and hosted rollout.\n'; text += 'Hosted API: https://rlhf-feedback-loop-production.up.railway.app\n'; text += 'Pro pack: https://rlhf-feedback-loop-production.up.railway.app/checkout/pro'; } return toTextResult(text); }