Skip to main content
Glama

Memoria — Deterministic AI Memory & Code Intelligence MCP

Consolidate Namespace Memories

consolidate
Idempotent

Run an idempotent maintenance pass on a workspace namespace to deduplicate redundant records, link superseded state, and promote recurring high-salience episodic memories to Semantic tier (consumes 1 Write API call; non-destructive to unique facts) and return { namespace, consolidated }. Requires Write permission and a valid logical namespace (never prefixed with "org:"). Use at session wrap-up after multiple encode_memory calls; use feedback instead to rate one memory, or delete_by_context to purge obsolete tags.

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": {
      "namespace": "<namespace>"
    },
    "name": "consolidate"
  }
}

Input Schema

NameRequiredDescriptionDefault
namespaceYesLogical workspace namespace to consolidate (for example "my-project").

Output Schema

NameRequiredDescriptionDefault
namespaceYesConsolidated logical namespace.
consolidatedYesTrue once consolidation completes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / namespace / description
      Previous value: -"Workspace namespace to consolidate."New value: +"Logical workspace namespace to consolidate (for example \"my-project\")."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "consolidated": {
      +      "description": "True once consolidation completes.",
      +      "type": "boolean"
      +    },
      +    "namespace": {
      +      "description": "Consolidated logical namespace.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "namespace",
      +    "consolidated"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so the description's 'idempotent' and 'non-destructive to unique facts' partly restate them. It does add genuinely new behavioral context: cost ('consumes 1 Write API call'), an auth prerequisite ('Requires Write permission'), and a naming constraint ('never prefixed with "org:"').

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?

Front-loaded with the verb and resource, then side effects, then cost, then alternatives. It is a dense run-on with stacked parentheticals, but no sentence is filler; a small restructure into separate clauses would improve scanability.

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 mutation tool this covers permission requirements, API cost, destructiveness, naming preconditions, and sibling routing, and the output schema already documents the { namespace, consolidated } return. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With a single parameter at 100% schema coverage the baseline is 3, but the description adds a real constraint beyond the schema: the namespace must be a valid logical namespace and must never carry an 'org:' prefix. That meaning is not present in the schema's example-only description.

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?

States a specific verb and resource ('Run an idempotent maintenance pass on a workspace namespace') and enumerates the concrete operations: dedupe, link superseded state, promote episodic memories to Semantic tier. This is distinguishable from sibling memory tools such as feedback and delete_by_context without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('Use at session wrap-up after multiple encode_memory calls') and names two alternatives with the conditions that select them ('use feedback instead to rate one memory', 'delete_by_context to purge obsolete tags'). Both when-to-use and when-not-to-use are covered.

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.