Skip to main content
Glama

memkernel_trigger_gc

Compact a branch's memory by folding older tool logs and notes into a semantic snapshot; reports token counts before and after.

Instructions

Compact a branch's memory now, folding older tool logs and notes into a semantic snapshot. Reports token counts before/after.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "memkernel_trigger_gc"
  }
}

Input Schema

NameRequiredDescriptionDefault
target_branchNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.3.1
    • addedInput schema / properties / target_branch / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / target_branch / default
      Previous value: -"main"New value: +null
    • removedInput schema / properties / target_branch / type
      Removed value: -"string"
  2. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the core transformation (older logs and notes become a semantic snapshot) plus the before/after token reporting. However, it never says whether the original logs are discarded or recoverable, whether the operation blocks or requires a lease, or whether it fails on a branch with in-flight investigations, all of which matter for an irreversible-sounding mutation.

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?

Two short sentences that front-load the action and end with the observable result; nothing is redundant. It could be slightly tighter but no sentence is wasted.

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?

An output schema exists, so the description need not detail return values, and it briefly notes token counts are reported. For a mutation-style compaction tool with no annotations, though, it omits safety and concurrency context (data retention, lease requirements, failure modes) that an agent would need before invoking it.

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?

There is a single optional parameter, target_branch, with 0% schema description coverage, and the description says only 'a branch's memory' without stating whether omitting it targets the current branch or some default. It adds a small amount of meaning by framing the operation as branch-scoped, but does not explain the null/default behavior the schema leaves undocumented.

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

Purpose4/5

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

States a concrete verb and resource: 'Compact a branch's memory' and explains the mechanism, folding older tool logs and notes into a semantic snapshot. This clearly separates it from sibling tools like memkernel_sync_now or memkernel_history, though it never names those alternatives explicitly.

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 only usage cue is 'now', which implies an on-demand operation, but there is no guidance about when compaction is warranted, whether it should follow lease acquisition, or why an agent would choose it over memkernel_sync_now or memkernel_rollback. The agent is left to infer the trigger conditions.

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