Skip to main content
Glama

memory_recall

Search Forge's stored patterns to find previously learned conventions, failure modes, and successful approaches for project guidance and debugging.

Instructions

Search forge's learned-pattern memory for entries relevant to a query. Memory is a simple JSONL store (not a vector index) — forge keeps it deliberately primitive so the format is human-readable, git-friendly, and cheap to grep. Each entry has a category (convention, failure_pattern, success_pattern, test_command, architecture, dependency, tool_usage), a free-text pattern, a confidence in [0,1], and a timestamp. Results are keyword-matched against pattern text, category name, and any included tags.

Behaviour:

  • READ-ONLY, idempotent. No telemetry side effects, no access counters bumped, no state mutated.

  • No authentication, no network, no rate limits.

  • Reads .forge/memory/project.jsonl and/or .forge/memory/global.jsonl depending on scope.

  • Returns an informative empty result if the query has no matches — never throws.

Use when:

  • The planner agent is about to decompose an objective and wants to check whether forge has already learned conventions for this project (test commands, style rules, known failure modes).

  • The debugger agent is analysing a failure and wants to check whether the same pattern has been seen and resolved before.

  • A worker agent is deciding between two approaches and wants to bias towards one that previously worked.

Do NOT use for:

  • Saving new patterns — use memory_save.

  • Looking up per-module retry history — use iteration_state.

  • Querying structured run events — use forge_logs.

  • Full-text search across commit history or codebase — this is learned patterns only, not source code.

Returns: A text block listing matching entries, each showing category, pattern, confidence, and timestamp. Grouped by scope (project first, then global) and sorted by confidence descending within each group.

Example: memory_recall({ query: "test command", scope: "project" }) → "Found 2 matches in project memory: [test_command] 0.9 — pnpm vitest --run (watch mode hangs in CI) [test_command] 0.8 — avoid npm test, use pnpm test instead"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesKeywords to search for (e.g. 'test conventions', 'auth patterns', 'python')
scopeNoWhich memory store to search (default: all)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure and excels at it. It explicitly states: 'READ-ONLY, idempotent. No telemetry side effects, no access counters bumped, no state mutated. No authentication, no network, no rate limits.' It also describes file sources, empty result behavior ('never throws'), and implementation details (JSONL store, keyword matching). This provides rich behavioral context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, behavior, usage guidelines, exclusions, returns, example) and every sentence adds value. It's appropriately sized for a tool with rich behavioral context and sibling differentiation, with no redundant or wasted text. The information is front-loaded with the core purpose first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description provides exceptional completeness. It covers purpose, behavioral traits, usage scenarios, exclusions, return format (text block with grouping and sorting), and includes a concrete example. The only minor gap is not explicitly documenting the exact output schema, but the return description and example adequately compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so the baseline is 3. The description adds meaningful context: it explains that 'query' searches against 'pattern text, category name, and any included tags' (not just keywords), and clarifies that 'scope' determines which files are read (project.jsonl vs. global.jsonl). However, it doesn't provide additional syntax or format details beyond what the schema already documents.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search forge's learned-pattern memory for entries relevant to a query.' It specifies the exact resource (learned-pattern memory) and verb (search), and distinguishes it from siblings like memory_save (for saving), iteration_state (for retry history), and forge_logs (for structured events).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit 'Use when' scenarios with three concrete examples (planner agent decomposition, debugger analysis, worker agent decision-making) and a 'Do NOT use for' section that names four specific alternatives (memory_save, iteration_state, forge_logs, and full-text search). This gives comprehensive guidance on when to use this tool versus others.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/TT-Wang/forge'

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