# diagnose_crash

Diagnose a GPU/ML training crash (CUDA OOM, NCCL timeout, Xid fault, NaN loss, checkpoint corruption, etc.) and get the root cause plus an escalating fix (primary → fallback → emergency). Provide ONE of: logs (paste), file (path to a log), or dir (folder to scan for the newest *.err/*.log). Uses the Denpex cloud by default, or runs fully offline with DENPEX_LOCAL=1.

Agent View of the PolicyLayer registry record for `diagnose_crash`. HTML page: https://policylayer.com/tools/denpex-mcp/diagnose-crash

## Facts

- Tool: `diagnose_crash`
- 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: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 9
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `dir` | string | no | Directory to scan for the newest *.err / *.log / *.out / *.txt. |
| `file` | string | no | Path to a log file to read from disk. |
| `logs` | string | no | Paste the crash log / stderr (at least 20 characters). |
| `gpuRate` | number | no | Your effective $/GPU-hour (enables a $ cost estimate). |
| `jobName` | string | no | Optional job or run name (saved to history). |
| `telemetry` | object | no | Hardware telemetry captured from the failing node. Keys the engine reads: `dmesg` (output of `dmesg -T`), `nvidia_smi` (`nvidia-smi -q`), `ibstat`. Sending thes |
| `codeContext` | object | no | Relevant source files as { path: contents }. Only send real files you read — the engine never fabricates code context, and neither should you. |
| `topologyMap` | object | no | Rank → node placement as { nodeName: [rank, ...] }, e.g. from the launcher. Lets the engine map a failing rank to a physical node and GPU. |
| `runtimeHours` | number | no | Hours the job ran before crashing (enables a $ cost estimate). |

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": "diagnose_crash",
    "arguments": {}
  }
}
```

## Why diagnose_crash is rated Low

Even though diagnose_crash only reads data, uncontrolled read access leaks sensitive information and racks up API costs: an agent caught in a retry loop can make thousands of calls a minute without anyone noticing.

Risk signals: Accepts file system path (file) · Admin/system-level operation

## Use case

AI agents call diagnose_crash to retrieve information from Denpex without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

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

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "diagnose_crash": {}
  }
}
```

## Other tools on Denpex (14)

- `compare_runs` — Execute — https://policylayer.com/tools/denpex-mcp/compare-runs.md
- `diff_environments` — Execute — https://policylayer.com/tools/denpex-mcp/diff-environments.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
- `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
