Skip to main content
Glama
Flux-Frontiers

SwiftKG MCP Server

snapshot_diff

Compare two codebase metric snapshots side-by-side to see changes in node/edge counts and per-kind deltas. Provide two snapshot keys to get a full delta report.

Instructions

Compare two codebase metric snapshots side-by-side.

Returns the full metrics dict for both snapshots and a computed delta (b − a) covering node and edge counts, plus per-kind node count and per-relation edge count deltas.

Typical workflow::

# 1. List available snapshots — note the 'key' field in each entry
snapshot_list()

# 2. Diff any two using the key= field values
snapshot_diff(key_a="abc1234ef...", key_b="def5678ab...")

:param key_a: First (older) snapshot key — the key field from snapshot_list() output (a tree-hash string). :param key_b: Second (newer) snapshot key — the key field from snapshot_list() output (a tree-hash string). :return: JSON object with keys a (metrics + issues list for key_a), b (metrics + issues list for key_b), delta (b − a), node_counts_delta, and edge_counts_delta. Returns an error dict if either snapshot is missing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
key_aYes
key_bYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It clearly discloses the return shape (metrics and issues for both sides, computed delta, node/edge count deltas) and the error-dict behavior for invalid keys. It does not explicitly state side effects or read-only guarantees, but the compare operation strongly implies them.

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 front-loaded with the core purpose, then gives return detailsholistically, then a minimal two-step workflow example. It is organized and dense without redundancy; every sentence adds operational value.

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?

Given a bare input schema and no annotations, the description provides enough context for an agent to call the tool correctly: how to obtain valid keys, what the delta means, exact top-level return keys, and error behavior. No essential operational context is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has zero description coverage, but the description fully compensates: both key_a and key_b are explained as snapshot keys from snapshot_list() and typed as tree-hash strings. This is above-and-beyond schema-only information.

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 leads with a specific verb and resource: 'Compare two codebase metric snapshots side-by-side.' It also clarifies what the comparison yields (delta of node and edge counts, per-kind breakdowns), making the tool's purpose unmistakable even without opening the schema.

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?

Provides a concrete workflow: call snapshot_list() to obtain keys, then snapshot_diff() using the key= fields. This tells the agent how to prepare inputs. It does not explicitly contrast with sibling tools like snapshot_show or snapshot_list, so it falls just short of full alternative-selection guidance.

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