Skip to main content
Glama

Dream (nightly consolidation)

dream
Destructive

Dreaming: a scheduled consolidation sweep over this vault. Light stages what changed since the last dream (near-duplicate concepts, finished task outcomes, hygiene counts); REM asks an LLM for proposals; deep applies the ones that pass threshold gates: merges duplicates (edges redirected, the other tombstoned), promotes outcome knowledge into concepts, adds missing links, and files a task for each contradiction. A sweep that would touch too much of the vault is rejected; every applied dream keeps preimages and can be reverted. {action: "status"} shows schedule + last dream; {action: "run"} dreams now; {action: "diary"} reads the Dream Diary; {action: "revert", id} undoes one dream; {action: "configure", ...} sets the schedule, mode (apply, propose, light-only), phases, thresholds, caps, a stricter loss rail and the LLM choice; {action: "apply", id, proposals?} decides a proposed dream. Without an LLM only light runs.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "dream"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoWith "revert" or "apply": the dream id (from "diary" or "status").
llmNoWith "configure": Cloud: which LLM the REM step uses — "auto" (default), "workers-ai", or "byok" (only the account's own key) — and a model id for the account's own key; null clears it.
capsNoWith "configure": Most changes per dream: maxMerges 5 (1-20), maxPromotions 5 (1-20), maxLinks 10 (1-50), maxContradictions 3 (1-10).
modeNoWith "configure": "apply" writes the changes that pass the gates (default); "propose" holds them in the Dream Diary until approved with {action: "apply"}; "light-only" never calls an LLM.
limitNoWith "diary": how many entries to return (default 10).
actionYes"status" reports the settings, the last/next dream and any sweep in flight. "run" starts (or continues) a sweep NOW and advances it as far as one request allows. "diary" returns recent Dream Diary entries (newest first). "revert" undoes one dream via its preimages (requires `id`). "configure" changes this vault's dreaming settings. "apply" decides a proposed dream (propose mode): applies the listed `proposals` (all when omitted) and rejects the rest (requires `id`).
phasesNoWith "configure": Turn individual kinds of change on or off: merges, promotions, links, contradictions.
enabledNoWith "configure": Turn scheduled dreaming on or off.
lossRailNoWith "configure": How much of the vault one dream may modify: maxTouchFraction (0.01-0.2) and minTouchAllowance (0-3). Can only be made stricter than the defaults.
proposalsNoWith "apply": the proposal numbers (`n`) to approve; omit for all, [] to reject all.
runHourUtcNoWith "configure": Preferred UTC hour for a dream when the cadence is 24h or more; null clears it.
thresholdsNoWith "configure": Minimum confidence (0.5-1) per kind: merge 0.8, promote 0.7, link 0.7, contradiction 0.6 by default.
cadenceHoursNoWith "configure": Hours between dreams (default 24).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changed
    • changedInput schema / properties / action / description
      Previous value: -"\"status\" reports whether dreaming is on, its cadence, the last/next dream and any sweep in flight. \"run\" starts (or continues) a sweep NOW and advances it as far as one request allows. \"diary\" returns recent Dream Diary entries (newest first). \"revert\" undoes one dream via its preimages (requires `id`). \"configure\" turns dreaming on/off and sets the cadence."New value: +"\"status\" reports the settings, the last/next dream and any sweep in flight. \"run\" starts (or continues) a sweep NOW and advances it as far as one request allows. \"diary\" returns recent Dream Diary entries (newest first). \"revert\" undoes one dream via its preimages (requires `id`). \"configure\" changes this vault's dreaming settings. \"apply\" decides a proposed dream (propose mode): applies the listed `proposals` (all when omitted) and rejects the rest (requires `id`)."
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "status",
      -  "run",
      -  "diary",
      -  "revert",
      -  "configure"
      -]New value: +[
      +  "status",
      +  "run",
      +  "diary",
      +  "revert",
      +  "configure",
      +  "apply"
      +]
    • changedInput schema / properties / cadenceHours / description
      Previous value: -"With \"configure\": hours between dreams (default 24)."New value: +"With \"configure\": Hours between dreams (default 24)."
    • addedInput schema / properties / caps
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "With \"configure\": Most changes per dream: maxMerges 5 (1-20), maxPromotions 5 (1-20), maxLinks 10 (1-50), maxContradictions 3 (1-10).",
      +  "properties": {
      +    "maxContradictions": {
      +      "maximum": 10,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "maxLinks": {
      +      "maximum": 50,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "maxMerges": {
      +      "maximum": 20,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    "maxPromotions": {
      +      "maximum": 20,
      +      "minimum": 1,
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedInput schema / properties / enabled / description
      Previous value: -"With \"configure\": turn nightly dreaming on or off."New value: +"With \"configure\": Turn scheduled dreaming on or off."
    • changedInput schema / properties / id / description
      Previous value: -"With \"revert\": the dream id to undo (from \"diary\" or \"status\")."New value: +"With \"revert\" or \"apply\": the dream id (from \"diary\" or \"status\")."
    • addedInput schema / properties / llm
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "With \"configure\": Cloud: which LLM the REM step uses — \"auto\" (default), \"workers-ai\", or \"byok\" (only the account's own key) — and a model id for the account's own key; null clears it.",
      +  "properties": {
      +    "model": {
      +      "anyOf": [
      +        {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "pattern": "^[A-Za-z0-9._:/@-]+$",
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "provider": {
      +      "enum": [
      +        "auto",
      +        "workers-ai",
      +        "byok"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / lossRail
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "With \"configure\": How much of the vault one dream may modify: maxTouchFraction (0.01-0.2) and minTouchAllowance (0-3). Can only be made stricter than the defaults.",
      +  "properties": {
      +    "maxTouchFraction": {
      +      "maximum": 0.2,
      +      "minimum": 0.01,
      +      "type": "number"
      +    },
      +    "minTouchAllowance": {
      +      "maximum": 3,
      +      "minimum": 0,
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "With \"configure\": \"apply\" writes the changes that pass the gates (default); \"propose\" holds them in the Dream Diary until approved with {action: \"apply\"}; \"light-only\" never calls an LLM.",
      +  "enum": [
      +    "apply",
      +    "propose",
      +    "light-only"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / phases
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "With \"configure\": Turn individual kinds of change on or off: merges, promotions, links, contradictions.",
      +  "properties": {
      +    "contradictions": {
      +      "type": "boolean"
      +    },
      +    "links": {
      +      "type": "boolean"
      +    },
      +    "merges": {
      +      "type": "boolean"
      +    },
      +    "promotions": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / proposals
      Added value: +{
      +  "description": "With \"apply\": the proposal numbers (`n`) to approve; omit for all, [] to reject all.",
      +  "items": {
      +    "minimum": 0,
      +    "type": "integer"
      +  },
      +  "maxItems": 200,
      +  "type": "array"
      +}
    • addedInput schema / properties / runHourUtc
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 23,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "With \"configure\": Preferred UTC hour for a dream when the cadence is 24h or more; null clears it."
      +}
    • addedInput schema / properties / thresholds
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "With \"configure\": Minimum confidence (0.5-1) per kind: merge 0.8, promote 0.7, link 0.7, contradiction 0.6 by default.",
      +  "properties": {
      +    "contradiction": {
      +      "$ref": "#/properties/thresholds/properties/merge"
      +    },
      +    "link": {
      +      "$ref": "#/properties/thresholds/properties/merge"
      +    },
      +    "merge": {
      +      "maximum": 1,
      +      "minimum": 0.5,
      +      "type": "number"
      +    },
      +    "promote": {
      +      "$ref": "#/properties/thresholds/properties/merge"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior5/5

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

The annotations already mark this as destructive and open-world, and the description adds substantial behavioral detail beyond them: merges tombstone one concept and redirect edges, outcome knowledge is promoted, contradictions generate tasks, over-broad sweeps are rejected, and preimages make every applied dream revertible. It directly supports the destructiveHint rather than contradicting it.

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 dense but front-loaded and organized around the staging model before the action map. Every sentence carries useful operational detail, though the long parenthetical configure list is somewhat compressed and could be easier to scan.

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?

For a complex 13-parameter, destructive, open-world tool with no output schema, the description covers the essential behavior: what each stage does, how proposals are approved, how reverts work, and the no-LLM fallback. Combined with the fully described schema, an agent has enough context to invoke it correctly.

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?

Schema description coverage is 100%, so the schema already documents the meaning of every parameter, including the action enum and all configure fields. The description reinforces the action forms and names configure options, but mostly duplicates what the schema already provides rather than adding new parameter-level semantics.

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 opens with a specific verb-plus-resource framing: a scheduled consolidation sweep over this vault. It then distinguishes the light, REM, and deep stages and the concrete effects of a dream, so an agent can tell exactly what this tool does and how it differs from ordinary CRUD siblings.

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 gives clear action-level routing for status, run, diary, revert, configure, and apply, and notes the important limitation that without an LLM only light runs. It does not explicitly compare this tool against sibling tools, but for a dedicated scheduling/consolidation tool the action context is strong.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources