Skip to main content
Glama

think

Run incremental cognitive maintenance on memory: consolidate similar memories, detect conflicts, and optionally mine patterns. Supports full hygiene cycles and targeted index operations.

Instructions

Run incremental cognitive maintenance — processes a small batch per call.

DESIGNED TO BE CALLED OFTEN: Each call processes ~5 memories (configurable). Running regularly (e.g. at end of conversation) gradually maintains the entire database without blocking. Safe to call frequently.

MODES:

  • Default: incremental think() — consolidation + conflict scan + (optional) pattern mining on a small batch.

  • maintenance_cycle=True: run the v0.9.0 autonomous-hygiene "sleep cycle" — think + burn-down-conflicts + prune-triggers + recalibrate-importance + backfill-entities + auto-relate (+ optional split_oversized + repair_artifacts).

  • last_cycle_only=True: just fetch the last persisted maintenance-cycle summary (read-only, no work performed).

  • maintenance_op="backfill_entities"|"rebuild_vec_index"|"rebuild_graph_index": run ONE targeted index-maintenance op and return. (Moved here from stats in v0.10 so stats could become read-only.)

Args: run_consolidation: Merge similar memories (default on). run_conflict_scan: Detect contradictions (default on). run_pattern_mining: Mine cross-domain patterns (default off, slow). consolidation_time_window_days: Only consolidate memories within this window (default 7 days). consolidation_limit: Batch size — max memories to process per call (default 5). Keep small for fast returns. maintenance_cycle: Run the full autonomous hygiene cycle instead. last_cycle_only: Just fetch the last cycle summary (read-only). dry_run: For maintenance_cycle — preview without persisting changes. burn_down_conflicts / prune_triggers_too / max_pending_triggers / recalibrate_importance / backfill_entities / auto_relate_in_cycle / max_auto_relate_edges / split_oversized / split_min_chars / repair_artifacts: Maintenance-cycle knobs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dry_runNo
maintenance_opNo
last_cycle_onlyNo
split_min_charsNo
split_oversizedNo
repair_artifactsNo
backfill_entitiesNo
maintenance_cycleNo
run_conflict_scanNo
run_consolidationNo
prune_triggers_tooNo
run_pattern_miningNo
burn_down_conflictsNo
consolidation_limitNo
auto_relate_in_cycleNo
max_pending_triggersNo
max_auto_relate_edgesNo
recalibrate_importanceNo
consolidation_time_window_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate the tool is not read-only nor destructive, and the description confirms it processes and modifies state (e.g., consolidation, conflict scan). It mentions safety for frequent calls and outlines behavioral aspects like batch processing. However, it does not detail the exact return format or side effects per mode, leaving some gaps.

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 well-structured using headings, lists, and clear separation of modes and parameters. It is front-loaded with the purpose. While every sentence adds value, some redundancy could be trimmed (e.g., repeating defaults), keeping it from a perfect score.

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 high complexity (19 parameters, multiple modes), the description covers all essential aspects: purpose, usage frequency, modes, all parameters with explanations, and behavioral notes. An output schema exists (though not shown), so return values are addressed externally. The description is complete for an AI agent to use the tool effectively.

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?

With 0% schema description coverage, the description fully compensates by explaining every parameter in the 'Args' section, including defaults, behavior, and examples (e.g., 'consolidation_limit: Batch size — max memories to process per call (default 5)'). This provides rich semantics beyond the schema titles.

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: 'Run incremental cognitive maintenance'. It distinguishes itself from sibling tools like 'remember' or 'recall' by focusing on maintenance tasks. The three operational modes are explicitly described, leaving no ambiguity about what the tool does.

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 strong usage guidance: it is 'DESIGNED TO BE CALLED OFTEN', suggests running at the end of a conversation, and explains when to use each mode. However, it does not explicitly list alternatives among sibling tools or state when not to use this tool, which would make it a 5.

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/yantrikos/yantrikdb-mcp'

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