Skip to main content
Glama
cachly-dev

cachly — AI Cognitive Brain

memory_consolidate

Consolidate memory by scanning lessons, resolving contradictions, merging duplicates, and flagging stale entries. Returns a health score and before/after counts.

Instructions

Cognitive memory consolidation — the weekly garbage collector for your AI Brain. Scans all lessons, detects contradictions (same topic with conflicting outcomes), merges duplicates, flags stale entries (not recalled in 90+ days), and computes a health score. Returns a full consolidation report with conflicts resolved, duplicates merged, and a before/after count. Run weekly or when brain_doctor reports > 20 lessons. Like git gc for knowledge.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instance_idYesUUID of the cache instance
dry_runNoIf true, report what would change without writing (default: false)
stale_daysNoLessons not recalled in this many days are flagged stale (default: 90)
Behavior3/5

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

Without annotations, the description must fully explain side effects. It states that it resolves conflicts and merges duplicates, implying mutations, and mentions a before/after count. However, it does not clarify whether changes are permanent, how dry-run mode affects behavior, or whether the tool is idempotent. The 'git gc' analogy suggests compaction, but explicit behavioral details are missing.

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 concise with five sentences, front-loading the metaphor and key actions. It efficiently conveys purpose and usage without unnecessary details. Slightly more structure could improve, but it is already well-organized.

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

Completeness4/5

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

Given no output schema, the description adequately describes the return value (full consolidation report with conflicts resolved, duplicates merged, before/after count). It covers main actions and trigger condition. Missing aspects: fate of stale entries (deleted or flagged), health score details, and parameter examples. Still, it provides sufficient context for an agent to understand the tool's role.

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?

Input schema has 100% coverage, so the baseline is 3. The description adds little beyond the schema: it mentions '90+ days' aligning with the stale_days parameter default but does not elaborate on instance_id or dry_run. The trigger condition (brain_doctor >20) is not a parameter. Overall, the description does not significantly enhance parameter understanding.

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 defines the tool as a memory consolidation garbage collector, listing specific actions (scan, detect contradictions, merge duplicates, flag stale entries, compute health score) and uses the metaphor 'git gc for knowledge.' It distinguishes from siblings like brain_doctor by specifying when to run triggered by brain_doctor reports.

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

Usage Guidelines4/5

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

The description provides explicit guidance: 'Run weekly or when brain_doctor reports > 20 lessons.' This gives clear frequency and trigger conditions. It does not explicitly mention when not to use or alternatives, but the weekly cadence and trigger are strong usage hints.

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/cachly-dev/cachly-mcp'

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