Skip to main content
Glama

MergeLock

Verify Git Diff Integrity

mergelock_verify_diff
Read-onlyIdempotent

Use when someone asks to verify a unified git diff for weakened tests, CI bypasses, assertion spoofing, permissive SQL RLS policies, leaked credentials, or unbacked PR file claims. Returns deterministic findings on every plan and embeds the signed Ed25519 receipt on Audit Vault.

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": {
      "diff": "<diff>"
    },
    "name": "mergelock_verify_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
diffYesUnified git diff string (git diff output).
pr_bodyNoOptional pull request description text for file-claim verification.
head_shaNoOptional commit reference associated with the local diff.
repo_nameNoOptional repository identifier (blinded via HMAC-SHA256 prior to receipt chaining).

Output Schema

NameRequiredDescriptionDefault
planNoInternal plan code associated with the authenticated workspace.
usedNoValidations consumed in the active metering window.
errorNoError code returned when input arguments fail structural validation.
reasonNoExplanation for an error, quota hold, or non-evaluated diff state.
hold_idNoIdentifier of the recorded quota-hold receipt when paywalled.
receiptNoSigned Ed25519 mergelock-receipt.v2 object on Audit Vault, or null.
summaryNoPlain-English summary when a validation is held on quota.
verdictNoIntegrity evaluation verdict (PASS, FAIL, or ACTION_REQUIRED).
findingsNoStructured integrity findings with rule IDs, severities, files, and lines.
docs_onlyNoWhether every touched file in the diff is documentation-only.
evaluatedNoWhether deterministic integrity checks executed against the diff.
oversizedNoWhether the diff exceeded the deterministic inspection size boundary.
vault_urlNoMergeLock Audit Vault capability URL for the recorded receipt or hold.
receipt_idNoIdentifier of the recorded integrity receipt.
repo_limitNoPrivate repository slot limit on the workspace plan.
duration_msNoWall-clock evaluation duration in milliseconds.
upgrade_urlNoWorkspace plan checkout link returned when quota is exhausted.
hold_receiptNoSigned quota-hold receipt on Audit Vault workspaces, or null.
quota_windowNoMetering window for the workspace plan (lifetime or monthly).
changed_filesNoNumber of changed file sections parsed in the unified diff.
finding_countNoTotal deterministic integrity findings detected in the diff.
monthly_limitNoValidation cap for the active metering window.
consumes_quotaNoWhether this diff shape counts toward workspace validation quota.
quota_exceededNoWhether workspace validation quota was exhausted prior to evaluation.
attestation_lockedNoWhether signed Ed25519 receipt export requires an Audit Vault plan.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world scope, so the safety profile is covered. The description adds substantive behavior beyond that: findings are deterministic and a signed Ed25519 receipt is embedded on Audit Vault, which tells the agent the output is cryptographically attestable. The receipt-embedding side effect sits in mild tension with readOnlyHint but reads as payload/attestation rather than environment mutation, so it is not a contradiction.

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?

Two sentences, zero filler: the trigger condition and the defect taxonomy come first, followed by the return/attestation behavior. The six-item enumeration is long but each item is a distinct activation signal rather than redundant phrasing.

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?

An output schema exists, so return-value structure need not be explained, and annotations cover the safety profile; the description fills the remaining gap with determinism and receipt signing. It could say slightly more about how optional inputs (pr_body, head_sha, repo_name) change the analysis, but the essentials for correct invocation are present.

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%, with all four parameters individually documented in the schema, so the baseline is 3. The description only indirectly touches parameters by mentioning 'unified git diff' and 'unbacked PR file claims' (mapping loosely to diff and pr_body) and adds no format, size, or interaction guidance beyond the schema.

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 and resource ('verify a unified git diff') and enumerates the exact defect classes it detects (weakened tests, CI bypasses, assertion spoofing, permissive RLS, leaked credentials, unbacked PR file claims). This scope is clearly distinct from the sibling mergelock_verify_receipt, which by name operates on a receipt rather than a raw diff.

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?

Opens with an explicit trigger ('Use when someone asks to verify...'), giving the agent a concrete activation condition rather than implied usage. It does not state when NOT to use it or name mergelock_verify_receipt as the alternative for receipt-checking, so the routing decision is left partly to inference.

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.

Resources