# pre_edit_check

RARELY NEEDED — the PreToolUse hook auto-runs this before every edit. Call manually only for an explicit impact check (past mistakes, loop risk, scope violations).

Agent View of the PolicyLayer registry record for `pre_edit_check`. HTML page: https://policylayer.com/tools/20alexl-claude-engram/pre-edit-check

## Facts

- Tool: `pre_edit_check`
- Server: Claude Engram (`20alexl/claude-engram`) — https://policylayer.com/tools/20alexl-claude-engram.md
- Homepage: https://github.com/20alexl/claude-engram
- Risk category: Read (Low risk)
- Registry record: grade D, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

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

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pre_edit_check",
    "arguments": {}
  }
}
```

## Why pre_edit_check is rated Low

The tool performs a pre-edit analysis by checking past mistakes, loop risks, and scope violations before an edit occurs. This is a read/query operation against stored session history and memory — it retrieves and evaluates information rather than modifying anything. The description says it's 'auto-run' by a hook but produces an impact assessment, not a write or destructive action.

From the tool's own definition: "pre_edit_check ... Call manually only for an explicit impact check (past mistakes, loop risk, scope violations)"

Risk signals: Bulk/mass operation — affects multiple targets

## Use case

AI agents call pre_edit_check to retrieve information from Claude Engram 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 Claude Engram:

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

## Other tools on Claude Engram (15)

- `audit_batch` — Read — https://policylayer.com/tools/20alexl-claude-engram/audit-batch.md
- `claude_engram_status` — Read — https://policylayer.com/tools/20alexl-claude-engram/claude-engram-status.md
- `context` — Read — https://policylayer.com/tools/20alexl-claude-engram/context.md
- `convention` — Read — https://policylayer.com/tools/20alexl-claude-engram/convention.md
- `deps_map` — Read — https://policylayer.com/tools/20alexl-claude-engram/deps-map.md
- `file_summarize` — Read — https://policylayer.com/tools/20alexl-claude-engram/file-summarize.md
- `find_similar_issues` — Read — https://policylayer.com/tools/20alexl-claude-engram/find-similar-issues.md
- `impact_analyze` — Read — https://policylayer.com/tools/20alexl-claude-engram/impact-analyze.md
- `memory` — Read — https://policylayer.com/tools/20alexl-claude-engram/memory.md
- `scope` — Read — https://policylayer.com/tools/20alexl-claude-engram/scope.md
- `scout_search` — Read — https://policylayer.com/tools/20alexl-claude-engram/scout-search.md
- `session_end` — Read — https://policylayer.com/tools/20alexl-claude-engram/session-end.md
- `session_mine` — Read — https://policylayer.com/tools/20alexl-claude-engram/session-mine.md
- `session_start` — Read — https://policylayer.com/tools/20alexl-claude-engram/session-start.md
- `work` — Read — https://policylayer.com/tools/20alexl-claude-engram/work.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=20alexl-claude-engram · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/20alexl-claude-engram
