# run_sandman_quality_hygiene

Run deterministic Sandman quality hygiene repairs with audit events.

Agent View of the PolicyLayer registry record for `run_sandman_quality_hygiene`. HTML page: https://policylayer.com/tools/mapi-agent-memory/run-sandman-quality-hygiene

## Facts

- Tool: `run_sandman_quality_hygiene`
- Server: Mapi Agent Memory (`cabo0m/mapi-agent-memory`) — https://policylayer.com/tools/mapi-agent-memory.md
- Homepage: https://github.com/cabo0m/mapi-agent-memory
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

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

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

## Why run_sandman_quality_hygiene is rated High

This tool executes a repair operation ('run...repairs') whose effects depend on the current state of memory hygiene and the deterministic algorithm applied. While described as 'deterministic' (suggesting predictability), it is fundamentally an Execute-category tool because it triggers an external operation that performs corrective actions on system data.

From the tool's own definition: "The tool name includes 'run' which indicates execution, and the description states 'Run deterministic Sandman quality hygiene repairs' - the verb 'run' combined with 'repairs' indicates this tool executes an operation that modifies system state."

## Use case

AI agents invoke run_sandman_quality_hygiene to trigger actions in Mapi Agent Memory. 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 Mapi Agent Memory:

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

## Other tools on Mapi Agent Memory (251)

- `delete_path` — Destructive — https://policylayer.com/tools/mapi-agent-memory/delete-path.md
- `expire_memory_capture_item` — Destructive — https://policylayer.com/tools/mapi-agent-memory/expire-memory-capture-item.md
- `gemma_worker_cancel_job` — Destructive — https://policylayer.com/tools/mapi-agent-memory/gemma-worker-cancel-job.md
- `rollback_memory_pointer_lifecycle_remediation_execution` — Destructive — https://policylayer.com/tools/mapi-agent-memory/rollback-memory-pointer-lifecycle-remediation-execution.md
- `apply_escalation_reactions` — Execute — https://policylayer.com/tools/mapi-agent-memory/apply-escalation-reactions.md
- `apply_memory_lifecycle_remediation` — Execute — https://policylayer.com/tools/mapi-agent-memory/apply-memory-lifecycle-remediation.md
- `apply_memory_pointer_lifecycle_remediation_execution` — Execute — https://policylayer.com/tools/mapi-agent-memory/apply-memory-pointer-lifecycle-remediation-execution.md
- `backfill_semantic_embeddings` — Execute — https://policylayer.com/tools/mapi-agent-memory/backfill-semantic-embeddings.md
- `gemma_lms_load` — Execute — https://policylayer.com/tools/mapi-agent-memory/gemma-lms-load.md
- `gemma_lms_unload` — Execute — https://policylayer.com/tools/mapi-agent-memory/gemma-lms-unload.md
- `gemma_worker_run_job` — Execute — https://policylayer.com/tools/mapi-agent-memory/gemma-worker-run-job.md
- `gemma_worker_run_task` — Execute — https://policylayer.com/tools/mapi-agent-memory/gemma-worker-run-task.md
- `git_push` — Execute — https://policylayer.com/tools/mapi-agent-memory/git-push.md
- `git_status` — Execute — https://policylayer.com/tools/mapi-agent-memory/git-status.md
- `preview_memory_pointer_lifecycle_remediation_execution_rollback` — Execute — https://policylayer.com/tools/mapi-agent-memory/preview-memory-pointer-lifecycle-remediation-execution-rollback.md
- `preview_undo_run` — Execute — https://policylayer.com/tools/mapi-agent-memory/preview-undo-run.md
- `query_sql` — Execute — https://policylayer.com/tools/mapi-agent-memory/query-sql.md
- `rollback_memory_hygiene_run` — Execute — https://policylayer.com/tools/mapi-agent-memory/rollback-memory-hygiene-run.md
- `rollback_memory_lifecycle_remediation` — Execute — https://policylayer.com/tools/mapi-agent-memory/rollback-memory-lifecycle-remediation.md
- `rollback_memory_supersession_run` — Execute — https://policylayer.com/tools/mapi-agent-memory/rollback-memory-supersession-run.md
- `run_conflicts_v1` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-conflicts-v1.md
- `run_consolidation_v1` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-consolidation-v1.md
- `run_escalation_check` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-escalation-check.md
- `run_powershell` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-powershell.md
- `run_pytest` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-pytest.md
- `run_sandman_ai` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-sandman-ai.md
- `run_sandman_gemma_hygiene` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-sandman-gemma-hygiene.md
- `run_sandman_v1` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-sandman-v1.md
- `run_workshop_action` — Execute — https://policylayer.com/tools/mapi-agent-memory/run-workshop-action.md
- `sandman_memory_chat` — Execute — https://policylayer.com/tools/mapi-agent-memory/sandman-memory-chat.md
- …and 221 more: https://policylayer.com/tools/mapi-agent-memory.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=mapi-agent-memory · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/mapi-agent-memory
