Skip to main content
Glama
JeanExtreme002

PyMemoryEditor

Official

open_process

Attach to a process by PID or name to get a session ID for reading, writing, and scanning its memory with other PyMemoryEditor tools.

Instructions

Attach to a process and return a session_id for the other tools.

:param pid: the process id to open. Preferred — it is unambiguous. :param name: a process name (or fragment) to resolve instead, matched case-insensitively as a substring. When several processes match, no process is opened and the candidates are returned for you to pick a pid from. Processes the policy denies are never among them, just as list_processes omits them.

Pass exactly one of the two. The returned session stays open until close_process or server shutdown; reuse its id rather than reopening the same target, since each open costs a handle and resets the cached region map.

At most max_open_sessions (see server_info) can be open at once; reaching it is refused, not rotated, so close_process a target you are done with.

Attaching to a process the operator has not pre-approved requires the user's approval, asked for at the moment you call this. Say which process you want and why; if the request is refused, report that rather than trying a different target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidNo
nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing session lifetime (until close_process or server shutdown), the cost of each open (a handle plus reset of the cached region map), the max_open_sessions cap being a refusal rather than rotation, and the requirement for user approval on non-pre-approved targets.

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

Conciseness4/5

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

Purpose and return value are front-loaded, and every paragraph adds operative detail (matching, session lifecycle, caps, approval). The ':param' documentation framing and dense multi-sentence paragraphs are slightly verbose, but nothing is wasted.

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?

With no output schema and zero param descriptions, the description compensates fully: it covers the returned session_id and candidate list, session re-use policy, concurrency limits, and the approval flow. An agent has everything needed to call it correctly.

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

Parameters5/5

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

Schema coverage is 0%, so the description carries the full burden and does so: pid is unambiguous and preferred, name is a case-insensitive substring match that returns candidates rather than opening when multiple match. This is far beyond what the bare integer/string schema conveys.

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?

States a specific verb+resource (attach to a process) and the concrete return value (a session_id for the other tools), which immediately distinguishes it from siblings like list_processes or close_process.

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

Usage Guidelines5/5

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

Explicitly says to pass exactly one of pid/name, names pid as preferred, explains what happens on ambiguous name matches, tells the caller to reuse the session rather than reopen, and routes to close_process when done. Names the alternative selection conditions directly.

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