Skip to main content
Glama

audit_unified_diff

Parse multi-file unified git diffs against deterministic AST rules RH001–RH008 to detect reward hacking and safety issues, optionally exporting a Nexus Aegis G5 attestation.

Instructions

Parse and audit a multi-file unified git diff against 8 deterministic AST anti-reward-hacking & safety rules (RH001–RH008) and export canonical Nexus Aegis G5 leaf attestation.

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": {
      "unified_diff": "<unified_diff>"
    },
    "name": "audit_unified_diff"
  }
}

Input Schema

NameRequiredDescriptionDefault
export_aegisNoWhether to include canonical Nexus Aegis G5 attestation package in output.
unified_diffYesMulti-file unified diff string (e.g. git diff output).
original_filesNoOptional mapping of {rel_path: original_source_code}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose that the rules are AST-based and deterministic (so results are reproducible) and scopes them to RH001–RH008. However it never states that the operation is read-only, what happens when a rule fires, or whether any rule requires original_files to run.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded sentence with no filler, which is good. But it compresses heavily into undefined jargon ('canonical Nexus Aegis G5 leaf attestation') that an agent cannot decode, and it leaves out the one thing it should say: what the output contains.

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

Completeness2/5

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

There is no output schema, so the description should explain return values, yet callers learn almost nothing about the audit result structure (per-rule findings? pass/fail?). The role of original_files in rule evaluation and the meaning of the attestation export are also left implicit for a tool with a nested-object parameter.

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 all three parameters, including export_aegis and the original_files mapping, are already documented. The description adds no format hints, sizing limits, or explanation of when export_aegis should be enabled, so the baseline applies.

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?

States a specific verb pair (parse and audit) plus a precise resource (multi-file unified git diff) and names the exact rule set (RH001–RH008). It is clearly distinguishable from patch-applying siblings, though it never explicitly says how it differs from verify_patch_integrity.

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?

No when-to-use guidance, no prerequisites, and no mention of alternatives such as verify_patch_integrity or apply_transactional_patch. The agent must infer that this is the pre-application audit step rather than one of the siblings.

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