Skip to main content
Glama
JeanExtreme002

PyMemoryEditor

Official

open_process

Attach to a running process by PID or name and get a session ID for other memory tools. If multiple processes match, candidate PIDs are returned for selection.

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.

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?

Annotations only cover safety hints (readOnly=false, openWorld=true). The description adds substantial beyond-schema behavior: each open costs a handle, resets the cached region map, sessions persist until close_process or shutdown, the max_open_sessions cap is refused rather than rotated, and attaching to unapproved processes requires live user approval. This is exactly the operational context an agent needs.

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?

Front-loaded with the core action and return value, then constraints. Every sentence carries unique information, though the approval paragraph and session-limit paragraph make it slightly dense for a two-parameter tool.

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?

No output schema exists, yet the description names the returned session_id and even the ambiguous-match candidate return. For a stateful, approval-gated open operation, no relevant behavior is left unstated.

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 description coverage is 0%, so the description carries the full burden and does so: pid is the process id and preferred; name is matched case-insensitively as a substring, and ambiguous matches return candidates rather than opening anything. Both params are given meaning the schema lacks.

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 names the concrete return value ('session_id'), which immediately distinguishes it from read-only siblings like process_info and from the terminating 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 'pass exactly one of the two', prefers pid as unambiguous, explains the ambiguous-name fallback, and instructs to reuse the session id rather than reopening. It also names close_process as the paired alternative and the condition for using it.

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