Skip to main content
Glama
Graph-Memory

Graph-Memory

Graph Decay

graph_decay
Destructive

Applies time-based decay to node confidence and edge weights using per-type half-lives during graph maintenance. Preview with dry_run=true before irreversible updates.

Instructions

Apply time-based decay to every node confidence and edge weight using per-type half-lives (preferences ~693d, events ~99d, etc.). Called by the dream process during maintenance. Always preview with dry_run=true first — decay is irreversible without restoring from a graph_export backup. Rule-subtype nodes and edges touching them are exempt. Returns totals, not per-type counts: {nodes_decayed, edges_decayed, nodes_flagged_for_pruning} (with dry_run, edges_decayed is always 0).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "graph_decay"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoPreview only, don't apply changes (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2
  2. Removedv0.1.4
  3. Changed1 schema field changedv1.0.1
    • addedInput schema / properties / dry_run / default
      Added value: +false
  4. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Although the only annotation is destructiveHint=true, the description adds the irreversibility and how to recover, the exemption for rule-subtype nodes and their edges, and a special dry_run behavior where edges_decayed is always 0. These details go well beyond what annotations disclose and directly affect how the agent calls the tool.

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 front-loads what the tool does, then the usage warning, then the exemption, then the return shape. Every sentence carries information the agent needs, with no filler.

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 there being no output schema, the description gives the full return shape inline. Combined with the irreversibility warning and the exemption rule, the agent has everything it needs to call this destructive maintenance tool safely.

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?

There is only one parameter, and the schema already covers dry_run at 100%. The description reinforces its meaning with the warning to preview first and the detail that dry_run reports edges_decayed as 0, which is a meaningful behavior beyond the schema text.

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 gives a specific verb and resource: applying time-based decay to node confidence and edge weights with per-type half-lives, and it illustrates it with concrete examples (~693d for preferences, ~99d for events). That is far more specific than the name alone. However, it never explains how it relates to its close siblings graph_boost and graph_weaken, so the agent must infer which one to use.

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?

It states the context in which the tool runs ('called by the dream process during maintenance') and gives an explicit precondition: preview with dry_run=true first, and make a graph_export backup because decay is irreversible. This tells the agent exactly how to proceed and which related tool to use first.

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