# diff_environments

Diff the SOFTWARE environment between a good run and a bad one — torch / CUDA / NCCL / driver / flash-attn versions, env vars — and flag combinations known to be broken. Feed it pip freeze, nvidia-smi, env output (or the whole job log; it extracts what it needs). Use this when compare_runs points at a version change, or when a job breaks after an image rebuild.

Agent View of the PolicyLayer registry record for `diff_environments`. HTML page: https://policylayer.com/tools/denpex-mcp/diff-environments

## Facts

- Tool: `diff_environments`
- Server: Denpex (`denpex-mcp`) — https://policylayer.com/tools/denpex-mcp.md
- Install: `npx -y denpex-mcp`
- Homepage: https://www.npmjs.com/package/denpex-mcp
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 3 (2 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `badRun` | string | yes | The same artifacts from the failing run. |
| `goodRun` | string | yes | Artifacts from the last good run (pip freeze / nvidia-smi / env, or the full log). |
| `failureLogs` | string | no | Optional: the failure output itself, for fingerprinting. |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "diff_environments",
    "arguments": {
      "badRun": "<badRun>",
      "goodRun": "<goodRun>"
    }
  }
}
```

## Why diff_environments is rated High

diff_environments triggers real processes with real consequences. An agent gone sideways doesn't fire it once. It starts dozens of builds, sends mass notifications, or burns through compute before anyone looks up.

## Use case

AI agents invoke diff_environments to trigger actions in Denpex. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Denpex:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "diff_environments": {
      "limits": [
        {
          "counter": "diff_environments_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Denpex (14)

- `compare_runs` — Execute — https://policylayer.com/tools/denpex-mcp/compare-runs.md
- `node_health` — Execute — https://policylayer.com/tools/denpex-mcp/node-health.md
- `predict_failures` — Execute — https://policylayer.com/tools/denpex-mcp/predict-failures.md
- `analyze_cascade` — Read — https://policylayer.com/tools/denpex-mcp/analyze-cascade.md
- `ask_followup` — Read — https://policylayer.com/tools/denpex-mcp/ask-followup.md
- `check_quota` — Read — https://policylayer.com/tools/denpex-mcp/check-quota.md
- `check_versions` — Read — https://policylayer.com/tools/denpex-mcp/check-versions.md
- `diagnose_crash` — Read — https://policylayer.com/tools/denpex-mcp/diagnose-crash.md
- `list_incidents` — Read — https://policylayer.com/tools/denpex-mcp/list-incidents.md
- `lookup_failure` — Read — https://policylayer.com/tools/denpex-mcp/lookup-failure.md
- `preflight_check` — Read — https://policylayer.com/tools/denpex-mcp/preflight-check.md
- `recent_diagnoses` — Read — https://policylayer.com/tools/denpex-mcp/recent-diagnoses.md
- `validate_checkpoint` — Read — https://policylayer.com/tools/denpex-mcp/validate-checkpoint.md
- `submit_fix_outcome` — Write — https://policylayer.com/tools/denpex-mcp/submit-fix-outcome.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=denpex-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/denpex-mcp
