Skip to main content
Glama

WhiteMagic — governed local memory for agent continuity

Aggregate Memories

memory.aggregate
Read-onlyIdempotent

Aggregate over the matched record set: numeric fields (importance, created_at, epoch) support count/sum/avg/min/max; categorical fields (source, domain, class, status, galaxy) support count only. Unsupported field/op is refused.

Input Schema

NameRequiredDescriptionDefault
opNoAggregation operator
fieldNoNumeric: importance | created_at | epoch. Categorical (count only): source | domain | class | status | galaxy
limitNoMaximum candidates considered (default 50; must be >= 1)
queryNoFull-text query selecting the memories to aggregate over
metricNoAlternative metric over matched records: count | session_count | session_span

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / field
      Added value: +{
      +  "description": "Numeric: importance | created_at | epoch. Categorical (count only): source | domain | class | status | galaxy",
      +  "type": "string"
      +}
    • changedInput schema / properties / metric / description
      Previous value: -"Aggregate metric: count | session_count | session_span"New value: +"Alternative metric over matched records: count | session_count | session_span"
    • addedInput schema / properties / metric / enum
      Added value: +[
      +  "count",
      +  "session_count",
      +  "session_span"
      +]
    • addedInput schema / properties / op
      Added value: +{
      +  "description": "Aggregation operator",
      +  "enum": [
      +    "count",
      +    "sum",
      +    "avg",
      +    "min",
      +    "max"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "query",
      -  "metric"
      -]
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Result envelope for this tool; fields vary by operation.",
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. Added

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is clear. The description adds useful behavioral detail by stating that unsupported field/op combinations are refused, which is not captured in the annotations.

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?

The description is compact and front-loaded, moving immediately from the aggregation scope to supported operators and field categories. There is no filler, and every clause contributes to selecting or invoking the tool correctly.

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 definition covers aggregation scope and supported field/operator combinations, but it does not clarify whether categorical-field counts return a single total or grouped counts, nor does it describe the return shape. With no output schema and a moderately complex aggregation surface, this leaves some ambiguity.

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 all five parameters, including the field/operator compatibility and limit default. The description largely restates the schema's field categories rather than adding new parameter-level meaning.

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?

The description states a specific verb and resource: 'Aggregate over the matched record set' and names the supported numeric/categorical fields and operators. It is clear what the tool does, though it does not distinguish itself from nearby siblings such as memory.count or memory.stats.

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 description implies the tool is for aggregation, but gives no explicit guidance on when to use it versus alternatives like memory.count, memory.filter, or memory.stats. It also provides no exclusions or prerequisites.

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