Skip to main content
Glama

Compare Source To Bundle

compare_source_to_bundle
Idempotent

Compare a committed HistoricalSourceGraph with authenticated JavaScript bundle evidence to classify source files as unchanged, modified, removed, split, merged, duplicated, or unknown.

Instructions

Compare a cryptographically committed HistoricalSourceGraph with authenticated JavaScript Application Graph Evidence supplied inline or by exact same-session retained reference. Uses explicit exact-digest, source-map path, current-path, suffix, and basename signals with stable weights. Classifies unchanged, modified, removed, split, merged, duplicated, and unknown; incomplete coverage and ambiguous weak signals never become absence or forced matches.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "reference": {
        "vcs": {
          "head": null,
          "kind": "none",
          "dirty": null
        },
        "schema": "HistoricalSourceGraph",
        "entries": [
          {
            "kind": "directory",
            "path": "src",
            "tree_state": "enumerated",
            "limitations": [],
            "classifications": [
              "source"
            ]
          },
          {
            "kind": "file",
            "path": "src/main.ts",
            "size": 128,
            "sha256": "2222222222222222222222222222222222222222222222222222222222222222",
            "language": "TypeScript",
            "limitations": [],
            "content_state": "hashed",
            "classifications": [
              "source"
            ]
          }
        ],
        "authority": "historical-reference",
        "languages": [
          "TypeScript"
        ],
        "manifests": [],
        "exclusions": [],
        "provenance": {
          "caller": "contract-example",
          "importer": "rea",
          "importer_version": "1"
        },
        "root_alias": "$REFERENCE_ROOT",
        "limitations": [],
        "root_sha256": "683969414c3e674a368392213c78021322fb39609b0c57f346b22da6464b2110",
        "relationships": [],
        "parse_failures": [],
        "inventory_state": "complete"
      },
      "application": {
        "kind": "retained-evidence",
        "evidence_id": "ev_2a6371cd2a7665bdad6d37d9b3a69da558e9882a0696d195f1f1a7707f14b5e5"
      }
    },
    "name": "compare_source_to_bundle"
  }
}

Input Schema

NameRequiredDescriptionDefault
referenceYes
applicationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

The annotations already declare safety traits such as non-destructive and idempotent behavior, while the description adds meaningful comparison behavior: weighted signals, a classification taxonomy, and conservative handling of incomplete coverage and weak ambiguity. It still does not fully describe the return shape, session-retention mechanics, or failure behavior.

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 front-loaded with the core comparison, then adds classification and ambiguity-handling details without obvious filler. It is dense and jargon-heavy, but each sentence contributes substantive information.

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

Completeness3/5

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

For a complex two-parameter comparison tool with no output schema, the description covers the comparison model and output categories but does not describe the result structure, per-file records, confidence reporting, or limitations in enough detail. It is minimally adequate but leaves clear gaps around return values and operational constraints.

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 compensate, and it does explain that the reference is a cryptographically committed HistoricalSourceGraph and that application evidence may be inline or supplied by exact same-session retained reference. However, it remains high-level and does not clarify detailed constraints or expected field-level shape for either parameter.

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 uses a specific verb, 'Compare', and names both resources precisely: a HistoricalSourceGraph and JavaScript Application Graph Evidence. This is clear enough to distinguish the operation, though it does not explicitly contrast itself with sibling comparison tools such as compare_bundles or compare_application_versions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use guidance, no when-not-to-use guidance, and no named alternative among the many comparison siblings. The input types imply the scenario, but an agent must infer when this tool is preferable to other compare tools.

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

Deploy Server

Other Tools