Skip to main content
Glama

memory_distill_candidates

Read-only

Mine recurring memories from project/user context files into reviewable context candidates, without modifying the source files. Use filters and optional observer judgment to isolate non-routine, memory-worthy patterns.

Instructions

Mine recurring memories into reviewable context candidates. Reads project/user context files without modifying them and can call the optional observer when judge=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoFilter by memory kind
judgeNoJudge candidates with the observer model and drop routine-activity clusters (on by default; falls back to unjudged output when no observer model is configured)
limitNoMax candidates
projectNoFilter by project scope (matches sessions.project)
scope_idNoFilter by a single sharing domain scope_id
trust_biasNo
visibilityNo
all_projectsNoMine memories across all projects
min_recurrenceNoMinimum member count per candidate
personal_firstNo
ownership_scopeNo
exclude_actor_idsNo
exclude_scope_idsNoSharing domain scope_ids to exclude
include_actor_idsNo
include_scope_idsNoSharing domain scope_ids to include
exclude_visibilityNo
include_documentedNoInclude candidates already represented in context files
include_visibilityNo
max_evidence_itemsNoEvidence snippets per candidate
exclude_trust_statesNo
include_trust_statesNo
exclude_workspace_idsNo
include_workspace_idsNo
widen_shared_when_weakNo
exclude_workspace_kindsNo
include_workspace_kindsNo
widen_shared_min_personal_scoreNo
widen_shared_min_personal_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionYes
metadataYes
candidatesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.44.2
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "candidates": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "artifact_kind": {
      +            "enum": [
      +              "context_fact",
      +              "skill"
      +            ],
      +            "type": "string"
      +          },
      +          "concepts": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "draft_text": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "evidence": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "member_ids": {
      +            "items": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "type": "array"
      +          },
      +          "projects": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "recurrence": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "representative_id": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "scope": {
      +            "enum": [
      +              "project",
      +              "user"
      +            ],
      +            "type": "string"
      +          },
      +          "score": {
      +            "type": "number"
      +          },
      +          "suggested_target": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "scope",
      +          "suggested_target",
      +          "score",
      +          "recurrence",
      +          "projects",
      +          "member_ids",
      +          "representative_id",
      +          "concepts",
      +          "artifact_kind",
      +          "evidence",
      +          "draft_text"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "metadata": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "candidate_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "cluster_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "context_document_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "corpus_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "corpus_limit": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "documented_cluster_count": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "include_documented": {
      +          "type": "boolean"
      +        },
      +        "min_recurrence": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "candidate_count",
      +        "cluster_count",
      +        "context_document_count",
      +        "corpus_count",
      +        "corpus_limit",
      +        "documented_cluster_count",
      +        "include_documented",
      +        "min_recurrence"
      +      ],
      +      "type": "object"
      +    },
      +    "version": {
      +      "const": 1,
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "version",
      +    "candidates",
      +    "metadata"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, and the description adds that it reads files without modifying them. It also discloses the conditional side-effect of calling the observer model when judge=true, which goes beyond the annotation structure. This is useful behavioral context beyond the structured hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences front-load the primary purpose and then add the key behavioral note. No redundant wording or recitation of schema fields. Every sentence earned its place.

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?

The tool has 28 optional parameters and an output schema exists, so return format does not need explanation. The description covers the core purpose and safety profile. However, with many filter options and no direction on how to combine or prioritize them, an agent may struggle to use the tool effectively. Adequate at a high level but missing meaningful usage depth.

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

Parameters2/5

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

With 28 parameters and only 39% schema description coverage, the description must compensate, but it only explains the judge option. It gives no guidance for trust_bias, ownership_scope, visibility filters, exclude/include groups, widen_shared options, or other ambiguous parameters. The single judge clarification is marginal but insufficient for the parameter complexity.

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 verb-resource pair ('Mine recurring memories') and the outcome ('reviewable context candidates'), which clearly distinguishes this from search/explain/remember siblings. An agent can infer this is a discovery/distillation tool, not a lookup or mutation tool.

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?

No explicit guidance on when to use this tool versus siblings like memory_search or memory_pack, and no when-not conditions. The purpose statement implies it's for recurring-pattern mining, but the description does not describe scenarios where an alternative would be more appropriate.

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