Skip to main content
Glama

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
NameRequiredDescriptionDefault
queryYesDescribe the current task or context to find relevant past feedback
limitNoMax memories to return (default 5)
repoPathNoOptional repository path for structural impact analysis on coding tasks

Implementation Reference

  • 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);
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/IgorGanapolsky/mcp-memory-gateway'

If you have feedback or need assistance with the MCP directory API, please join our Discord server