Skip to main content
Glama

Garden the brain — consolidate over-grown areas (sleep-time compute)

brain_garden

Consolidate dormant and peripheral cards into a single synthesis per area, archiving originals without deleting anything. Requires human approval before changes; also removes duplicate partial notes.

Instructions

Tidy an over-grown brain WITHOUT losing anything — SMART and non-invasive: it only consolidates DORMANT cards (old + peripheral), never load-bearing ones. Two phases: call it with no apply to get the areas that have accumulated forgotten cards (deterministic: >3 cards that are older than 14 days, beyond the area's newest 8, AND have ≤1 connection — so hubs and still-referenced decisions are left untouched; Focus/Instructions/Archive/Open-questions areas protected) plus their card text; YOU write one tight synthesis per area; then call again with apply:true, syntheses:[{title, synthesis}] AND the human's 8-char approve code (apply is REFUSED without it — you are never shown the code; the human generates it with npx klypix-mcp garden-code after reviewing your plan). Each area gets a 🌿 synthesis card, the originals are stamped "⤵ consolidated", moved to Archive, and arrowed to the synthesis — nothing is deleted, and one undo un-gardens. Run it when brain_insights or the brief shows an area has grown noisy. SEPARATE PASS: repair:"duplicate-partials" lists (and with apply:true collapses) cards that carry the SAME ✔ partial note more than once — the residue of a partial ✓ on a card that stays live by design. It keeps the earliest note of each distinct body and removes only exact repeats, so nothing is archived, nothing is deleted, no synthesis and no approval code are needed, and a second run finds nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNofalse (default) = list over-grown areas + cards to synthesize; true = consolidate using the supplied syntheses.
canvasNoBrain canvas filename/path. Defaults to the project brain ("brain").
repairNoRun a targeted repair instead of the consolidation pass. "duplicate-partials" collapses repeated ✔ partial notes on a card to the earliest one — lossless, idempotent, no syntheses and no approval code. Dry-run by default; apply:true writes.
approveNoRequired when apply:true — the 8-char human-approval code. You are never shown it: the human runs `npx klypix-mcp garden-code` and pastes the code into chat after reviewing your plan. Never guess or fabricate it.
synthesesNoRequired when apply:true — one entry per area you want consolidated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.86.0
    • addedInput schema / properties / repair
      Added value: +{
      +  "description": "Run a targeted repair instead of the consolidation pass. \"duplicate-partials\" collapses repeated ✔ partial notes on a card to the earliest one — lossless, idempotent, no syntheses and no approval code. Dry-run by default; apply:true writes.",
      +  "enum": [
      +    "duplicate-partials"
      +  ],
      +  "type": "string"
      +}
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/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 delivers: it states nothing is deleted, originals are stamped and moved to Archive, an undo exists, apply requires a human approval code the agent never sees, and the repair pass is idempotent and lossless. It also reveals deterministic selection criteria and protected areas.

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 the tool has two modes and five parameters with serious safety constraints. Nearly every clause earns its place, though the opening phrasing is slightly padded and the repair pass paragraph is dense enough that an agent must read carefully.

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?

Despite no output schema, the description explains what the dry run returns, what apply produces, how undo works, and what the repair pass does on a second run. For a tool of this complexity, no critical operational detail is missing.

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?

Schema coverage is 100%, but the description adds substantial meaning: apply:true requires syntheses plus an approve code, syntheses titles must match dry-run output exactly, synthesis prose should be 3-6 sentences preserving facts, repair is a separate mode with no approval needed, and the approve code is never shown to the agent. This is far beyond the schema's basic descriptions.

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 states a specific operation: consolidate over-grown brain areas by synthesizing dormant cards into one synthesis card, with a separate duplicate-partials repair pass. It clearly distinguishes this from the broader sibling set by defining exactly what it acts on (dormant cards) and what it preserves.

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?

It explicitly says when to run it: 'Run it when brain_insights or the brief shows an area has grown noisy.' It also explains the two-phase workflow and when to use the repair pass. It does not name sibling tools as alternatives, but the trigger condition is specific enough to guide selection.

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