Tool Permissions and Safety
No tool ever changes the heap snapshot it analyzes, and most tools only read it. Two groups of tools are exceptions: the ones that run JavaScript, and the ones with side effects outside the heap.
Every tool declares MCP annotations (readOnlyHint, destructiveHint,
idempotentHint, openWorldHint and a title). A client that honors them
can approve the read-only tools automatically and keep asking about the
others.
Tools That Run JavaScript
Do not auto-approve these tools
These tools run JavaScript that the assistant passes in, or that they read from a round directory, with the full privileges of the MCP server process:
memlab_evalandmemlab_eval_acrossmemlab_live_eval, which runs its code in your live page, with the page's sessionmemlab_for_eachmemlab_hypothesismemlab_ladder_probeandmemlab_replicatememlab_judges,memlab_calibrate_judgesandmemlab_switch_matrixmemlab_ab_comparememlab_analysis_battery, when the round has aninvariants.json
memlab_batch and memlab_start_job can call any of them.
These tools use node:vm to limit the globals they provide, but
node:vm is not a security sandbox: code
can reach the filesystem, the network and the shell. A heap snapshot's
contents can come from an attacker, so a prompt injection hidden in a
snapshot could steer the assistant into running harmful code.
- Keep these tools on manual approval.
- Don't allowlist
mcp__memlab__*with a wildcard: it approves these tools too. - To turn them off completely, start the server with
MEMLAB_DISABLE_CODE_TOOLS=1.
Tools with Side Effects
These tools don't run your code, but they do more than read the snapshot:
memlab_captureconnects to a running Chrome and writes snapshots.memlab_prune_runcompresses or deletes a round's snapshot files. By default it only reports what it would do.memlab_anonymize_snapshotandmemlab_analysis_batterywrite files.memlab_finding_index,memlab_metricandmemlab_ladderkeep small state files in your home directory.
Approve the Read-Only Tools You Use
To stop your assistant from asking on every call, while keeping the tools
above on manual approval, allowlist the read-only tools you use by name. In
Claude Code, add them to ~/.claude/settings.json (for every project) or
.claude/settings.json (for one project):
{
"permissions": {
"allow": [
"mcp__memlab__memlab_tools",
"mcp__memlab__memlab_load_snapshot",
"mcp__memlab__memlab_snapshot_header",
"mcp__memlab__memlab_snapshots",
"mcp__memlab__memlab_app_heap",
"mcp__memlab__memlab_snapshot_summary",
"mcp__memlab__memlab_class_histogram",
"mcp__memlab__memlab_retainer_trace"
]
}
}