Skip to main content

Scoped MCP metadata tools

These six tools belong to the updated local implementation. Use tools/list on the executable you launch. Launch-time exact-file approval and --mcp-share-metadata are required; request arguments cannot grant permission.

ToolRequired argumentsResult
list_dumpsEmpty objectApproved aliases such as dump_1; no local paths
analyze_heapdump_idNew analysis identity and bounded summary evidence; replaces previous state
get_summarydump_id, analysis_idSizes/counts and up to 15 retained-object descriptors
investigate_heapdump_id, analysis_id, actionOne bounded metadata read
get_evidencedump_id, analysis_id, evidence_idA previously returned record from this analysis
close_dumpdump_id, analysis_idReleases state and invalidates its evidence

Only object, fields, outbound, referrers, children and root_path are accepted actions. Field reads return names/types, not contents. Unknown operations, numeric IDs, extra arguments, arbitrary paths and legacy unrestricted tools fail closed.

Read an object​

Replace illustrative identities with ones actually returned for your dump:

{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"investigate_heap","arguments":{"dump_id":"dump_1","analysis_id":"A1","action":{"operation":"object","object_id":"512"}}}}

Tools return MCP text content containing JSON and an isError flag. Success data includes the analysis identity and evidence record; the record has an opaque ID, scope, operation and bounded data. Errors do not echo paths or submitted arguments. Missing evidence, exhausted search or an empty prefix does not prove absence.

Interpretation​

Handles establish provenance within one process and analysis, not causal truth or a cryptographic certificate. Class retained totals overlap across classes; retention is not proof of a leak. A snapshot cannot establish growth, intended lifetime or whether a repair works.

The external client owns its model reasoning and can still generate unsupported prose. HeapLens's built-in evidence-linked answer renderer is a separate host feature. See limits, size semantics and privacy.