Skip to main content
Glama

Graph Diff

graph_diff
Read-onlyIdempotent

Say exactly what changed between two versions of a memory. FREE.

The audit trail a database gives you for free, without the database. Typical input {"before": {...}, "after": {...}} returns {"entities_added": ["Beta Ltd"], "entities_removed": [], "observations_added": {"Acme Corp": ["renewed in March"]}, "relations_added": [...], "changed": true}.

Use after an upsert to record what a session learned, or between two agents to see what one knows that the other does not. Not for merging the two - feed the differences back through graph_upsert for that. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""}. Every call is read-only and idempotent, so after correcting the input it is always safe to retry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterYesThe later graph document.
beforeYesThe earlier graph document.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.6/5.0
Behavior5/5

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

While annotations already declare read-only and idempotent, the description adds error-handling behavior: 'never raises a protocol error — it returns an error object.' It also hints at retry safety: 'it is always safe to retry,' which goes beyond the structured annotations.

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 description is well-structured and front-loaded with a clear purpose statement. It's a bit long but each sentence provides value, such as usage, error semantics, and idempotency. Slightly verbose but justified.

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?

Covers purpose, use cases, non-use cases, error behavior, retry guidance, and includes an output example. With annotations and output schema already present, this description is comprehensive and complete.

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 coverage is 100% with clear descriptions for 'before' and 'after'. The description adds a concrete JSON example showing expected structure, but this is more illustrative than adding new semantic meaning. Meets the baseline without adding significant parameter-specific insights.

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 opens with 'Say exactly what changed between two versions of a memory,' a specific verb+resource that clearly defines the tool's purpose. It differentiates from siblings by stating 'Not for merging the two' and pointing to graph_upsert, making the distinction explicit.

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 gives explicit use cases: 'Use after an upsert... or between two agents.' It also states what not to use it for and directs to an alternative: 'feed the differences back through graph_upsert for that.'

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.

TDQS

A4.9/5.0
Disambiguation5/5

Each tool has a distinct, non-overlapping purpose: time-based query, compaction, diff, lint, search, and upsert. No ambiguity between them.

Naming Consistency5/5

All tools follow a consistent 'graph_' prefix with descriptive verb suffixes, forming a clear and predictable naming pattern.

Tool Count5/5

Six tools is an appropriate number for a memory graph server, covering all essential operations without redundancy or bloat.

Completeness5/5

The toolset provides full coverage: upsert for writing, search and at_time for reading, diff for change tracking, lint for validation, and compact for maintenance. No gaps.

Resources