Skip to main content
Glama
stand-out-of-my-sun

Diogenes Context Compression, Code Patching & Deterministic Solver MCP

Agent State Graph Differ, Belief Conflict Resolver & SHA-256 Hasher

diff_agent_memory_checkpoint
Read-onlyIdempotent

Compute structural diffs between two agent state snapshots, flag boolean contradictions, and generate an RFC 7396 JSON Merge Patch delta with a canonical checkpoint hash for state handoffs.

Instructions

Computes structural diffs between two agent state snapshots ('added_keys', 'mutated_keys', 'removed_keys'), flags boolean belief contradictions, generates an RFC 7396 JSON Merge Patch delta, and computes a canonical checkpoint hash. Use when checkpointing agent state or transmitting minimal RFC 7396 state deltas across multi-agent handoffs; for counting BPE tokens and auditing Lost-in-the-Middle prompt attention, use plan_context_token_budget instead. Read-only call (32 KB, 60 RPM): accepts 'previous_state_json' (with enum defaults), uses '?demo=true' or L402 (50 sats); HTTP 400 if invalid.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conflict_strategyNoResolution policy when keys conflict; defaults to 'prefer_current' when omitted.
current_state_jsonYesJSON string or object representing the updated agent state snapshot.
previous_state_jsonYesJSON string or object representing the prior agent state snapshot.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
added_keysYesState keys newly introduced in current_state.
mutated_keysYesModified keys with before/after values and belief_contradiction flag.
checkpoint_digestYesDeterministic cryptographic hash of the canonicalized merged state.
rfc7396_json_merge_patch_deltaYesMinimal RFC 7396 JSON Merge Patch payload transforming previous into current.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, yet the description adds real operational context beyond them: size/rate limits (32 KB, 60 RPM), auth paths ('?demo=true' or L402 at 50 sats), and failure behavior (HTTP 400 if invalid). This is unusually rich disclosure for a read-only tool.

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?

Front-loaded with the core operation and outputs, followed by usage routing and operational constraints. Dense and largely waste-free, though the '(with enum defaults)' clause is mildly confusing and attached to the wrong parameter, slightly muddying an otherwise tight structure.

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?

An output schema exists, so return values need not be explained; the description instead covers scope, alternatives, limits, auth, and error behavior. For a read-only diff tool with full schema coverage, nothing an agent needs to invoke it correctly is 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 100%, so the schema already documents all three parameters, making 3 the baseline. The description references 'previous_state_json' and 'enum defaults', but the enum actually belongs to conflict_strategy, so the added parameter detail is slightly imprecise rather than value-adding.

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?

States a specific verb+resource (computes structural diffs between two agent state snapshots) and enumerates the exact outputs ('added_keys', 'mutated_keys', 'removed_keys'), plus belief-contradiction flagging, RFC 7396 patch generation, and hashing. It also names the sibling it is not (plan_context_token_budget), so an agent can distinguish it without opening either schema.

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?

Explicitly states when to use it ('checkpointing agent state or transmitting minimal RFC 7396 state deltas across multi-agent handoffs') and names the alternative with the contrasting condition (token counting / Lost-in-the-Middle auditing → plan_context_token_budget). Nothing is left to inference.

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