Skip to main content
Glama
0Mattias
by 0Mattias

memory_scope_overview

Assess memory scope counts in one call at session start to decide whether to search memory and see pending curation or write confirmations.

Instructions

Cheap session-start hint: per-scope counts, no bodies / ids / summaries. Call once at the start of a conversation; if total is 0, skip memory_search for the rest of the session unless explicitly asked.

Returns {current_repo, current_cwd, auto_scope, scopes: {scope: count}, total, disabled_scopes, curation_pending, curation_pending_new_since_last_session, recently_removed_in_worktree, proposals_pending, pending_writes}. proposals_pending is the count of write-reflex proposals the Stop hook has captured awaiting review via memory_proposals (0 unless the opt-in [proposals] auto_propose is on). pending_writes is this session's staged writes awaiting memory_write_confirm/cancel — a dangling confirmation (silent 1h expiry). curation_pending is an integer-count rollup the model should branch on: {stale, never_verified, drifted, cold, dead, silent_misses, unique_silent_miss_memories, cold_endorsement_memories, conflicts} conflicts = contradiction pairs awaiting a memory_conflicts verdict. Any non-zero dead or drifted is a cue to suggest a curation pass when the conversation has time. Non-zero silent_misses / cold_endorsement_memories means the audit-turn telemetry has actionable backlog. silent_misses counts events; unique_silent_miss_memories counts the distinct memories those misses pointed at (dedup'd by top-hit id). Misses whose top-hit memory has been tombstoned are excluded from both counters. cold_endorsement_memories counts distinct memories (NOT turns) with retrieval_count >= N AND zero explicit applies — usually a sign the memory is over-surfaced or stale.

recently_removed_in_worktree is the integer count of tombstones removed in the trailing 7 days; under auto_scope=True it's filtered to this worktree (tombstones with no recorded worktree are excluded), under auto_scope=False it covers every tombstone in the window. Non-zero is a 'where did X go?' signal — material was deliberately trimmed here recently; don't blindly re-suggest it.

curation_pending_new_since_last_session is the same shape, filtered to events emitted and memories created since the previous session ended (not memories that aged into a bucket; an older record aging into stale between sessions stays visible only in the absolute curation_pending view — note this is distinct from the separate drifted bucket, which tracks working-tree drift). Branch on it when deciding whether to prompt about curation — non-zero means new rot since the last session, vs. the absolute view which persists until resolved. null on the very first session — fall back to curation_pending.

Default-scoped to the caller's current repository; memories with no origin always pass as global. Set auto_scope=False for the cross-project view. Counts respect session-disabled scopes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
auto_scopeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations, the description supplies extensive behavioral details: cheapness, field semantics, filtering rules, special cases like null on first session, and effects of session-disabled scopes. It goes far beyond what annotations would provide, covering nuances like silent_misses deduplication and tombstone exclusion.

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

Conciseness4/5

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

The description is long but packed with necessary detail about the complex return object. It opens with a one-line summary and then structures field explanations, though a more formal layout could improve scanability. Every sentence serves a purpose, but the density is high.

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?

Given the presence of an output schema, the description goes beyond simply listing returns by explaining how to interpret and branch on each field. It covers edge cases (null first session, filtered vs absolute counts) and operational guidance (curation cues, pending write expiry), making it fully contextual for an agent.

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

Parameters5/5

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

The schema provides no description for auto_scope, but the description explains default scoping to the caller's repository and how to opt into a cross-project view with auto_scope=False. It also notes global pass-through for memories without origin, effectively documenting the parameter's behavior.

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 identifies the tool as a 'Cheap session-start hint' providing per-scope counts without bodies/ids/summaries. It distinguishes itself from memory_search by advising to skip searches when total is 0, making its purpose and scope unique among siblings.

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?

Explicitly instructs to call once at conversation start and provides conditional logic for skipping memory_search. Also explains when to set auto_scope=False for cross-project views, giving clear context for usage.

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/0Mattias/bettermemory'

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