Skip to main content
Glama

memory_diff

Summarizes a session's events, causal depth, errors, and newly seen event types to reveal what changed at session end.

Instructions

Summarise what happened in a session.

Returns event counts, types seen, causal depth, whether any errors
occurred, and event types that had never appeared in prior sessions.
Call this at the end of a session to understand what changed.

Args:
    session_id: The session to analyse

Returns:
    summary, event_types, total_events, has_errors, new_event_types

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": {
      "session_id": "<session_id>"
    },
    "name": "memory_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It implies a read-only analysis by describing returned aggregates and 'whether any errors occurred,' but never explicitly states that it is non-mutating, what permissions are needed, or how expensive the scan is over a session. Listing the return fields does add useful behavioral context.

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 purpose sentence is front-loaded and the Args/Returns blocks are easy to scan. There is mild redundancy between the prose enumeration of returned fields and the explicit Returns list, but nothing wasteful enough to harm comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly takes on the job of listing return fields (summary, event_types, total_events, has_errors, new_event_types), so an agent knows what comes back. For a one-parameter read tool this is nearly complete; only session-ID provenance and read-only confirmation are missing.

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 0%, so the description must carry the one parameter, and it does: 'session_id: The session to analyse.' That is minimal, however — it adds no format, example, or note on where session IDs come from, which is the main gap for a low-coverage single-parameter schema.

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?

States a specific verb and resource: 'Summarise what happened in a session,' then enumerates what the summary contains (event counts, types seen, causal depth, errors, new event types). This makes the tool's output shape clear. It does not, however, distinguish it from nearby siblings such as query_events or why, and the name 'memory_diff' only loosely matches the 'summarise a session' framing.

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?

'Call this at the end of a session to understand what changed' gives a concrete usage moment, which is more than most definitions offer. No alternatives or exclusions are named, so the agent must infer when query_events or why would be preferable.

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