Skip to main content
Glama

get_memory_map

Read-onlyIdempotent

Breaks down a process's memory region by region like VMMap, showing committed, resident, and private usage, largest allocations, and executable private memory after opening the process.

Instructions

A process' memory region by region, in the manner of VMMap: how much of it is the program and its DLLs, mapped files, heaps, thread stacks and private data, each with what is committed and what is in RAM now (and of that what only this process uses), and its largest allocations with what each is. Private memory that may be executed is marked (often a JIT, sometimes injected code). OPENS THE PROCESS to read its address space: the first call is refused with the risks; call again with force=true only if the user agreed. Call it twice a while apart to see what grows: get_leaks says which processes keep growing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pid": "<pid>"
    },
    "name": "get_memory_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidYesThe process ID.
topNoHow many of its largest allocations (1 to 200, default 20).
forceNoTrue only after the user agreed to the risk this tool described.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the read-only/idempotent annotations, it discloses the critical non-obvious behavior: the tool opens the target process, the first invocation is refused with a risk explanation, and force=true must only be used after user agreement. It also flags that executable private memory is marked because it may be a JIT or injected code, which affects interpretation of results.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

All content is relevant, but the opening sentence is a single long chain of nested clauses that is hard to parse on first read, and the capitalized warning is buried mid-paragraph rather than front-loaded. It could be reorganized into shorter, scannable statements without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex, no-output-schema tool with only three parameters, the description conveys what the returned breakdown contains, how to interpret the executed-memory marker, the consent flow for force, and the two-call comparison workflow. Nothing an agent needs in order to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so pid and top are already documented in the schema, putting the baseline at 3. The description adds only modest meaning – 'largest allocations with what each is' clarifies top, and the force consent gate is restated from the schema – without format or sizing guidance beyond that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the exact resource and granularity: a process's memory broken down region by region (program/DLLs, mapped files, heaps, thread stacks, private data) in the manner of VMMap, including committed vs. resident amounts and largest allocations. It also distinguishes itself from the sibling get_leaks by assigning growth-over-time tracking to that tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete usage patterns – call twice a while apart to see growth, and use get_leaks to identify which processes keep growing – plus a hard precondition that the first call is refused until force=true is passed with user consent. It does not explicitly say when to prefer get_memory or get_thread_stacks over this tool, so the alternative routing is partial.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.