Skip to main content
Glama
meharajM
by meharajM

compact_memory

Clear the active context and preserve key facts by storing a condensed summary into compacted history, preventing memory overload.

Instructions

Empties the Active Context and appends the AI-provided summary to the Compacted History.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes
context_summaryYesA highly condensed summary of the current Active Context to preserve important facts and outcomes.
Behavior3/5

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

With no annotations, the description carries full disclosure responsibility. It does honestly state that it empties the Active Context, which is destructive, and explains the preservation of the summary. However, it doesn't mention any side effects like whether the summary overwrites existing Compacted History, any permissions needed, or reversibility. This is a minimal but not comprehensive disclosure.

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 exactly one sentence, front-loaded with the two key actions (empties, appends) and the resources involved. There is no redundant wording or filler, making it highly efficient and easy to parse.

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

Completeness3/5

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

For a tool with two simple parameters and no output schema or annotations, the description is adequate but thin. It explains the core behavior but omits an explanation for session_id and any details about the Compacted History format or error conditions. It is complete enough for basic use but not robust for complex decision-making.

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

Parameters3/5

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

The schema describes only context_summary, and session_id is undocumented. The description adds value by tying context_summary to the 'AI-provided summary' of the Active Context, which clarifies its purpose. However, it provides no additional context for session_id, and at 50% schema coverage, the description only partially compensates for the missing parameter details.

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 actions: it empties the Active Context and appends a summary to the Compacted History. This is a specific verb+resource combination that unambiguously differentiates from sibling tools like init_loop or log_step, which handle other loop or logging tasks.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, nor does it mention any preconditions or scenarios where it should not be used. It lacks explicit context like 'use when memory needs compaction' or contrasts with siblings. The usage is only implied by the tool's name.

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/meharajM/agent-loop-mcp'

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