Skip to main content
Glama

get_process_state

Retrieve the internal state of a GenServer process to see the exact data it holds, passing its PID or registered name.

Instructions

Get the DATA a GenServer is holding — its internal state (the value in the GenServer's loop).

WHEN TO USE: You want to see the actual data/state inside a process — what it's storing, its current values. NOT FOR: Process metadata like memory/links/stacktrace (use get_process_info). Process dictionary entries (use get_process_dictionary). Note: may timeout if the process is busy or doesn't support :sys messages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pidYesPID string (e.g. "<0.123.0>") or registered name (e.g. "MyApp.Worker")
timeoutNoTimeout in milliseconds (default: 5000)
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds a critical caveat that the operation may timeout if the process is busy or doesn't support :sys messages, which is valuable for invocation planning. It doesn't cover all potential behaviors (e.g., side effects or process suspension), but for a read-only state retrieval that is sufficient.

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

Conciseness5/5

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

The description is well-structured with a concise lead sentence, then clearly labeled WHEN/NOT FOR sections, and a final note. Every sentence adds value and the text is front-loaded with the core purpose.

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?

Given the tool's low complexity (two params, one output concept), the description is complete. It explains what data is returned, when to use it, when not to, and a limitation. No output schema is needed since 'state' is self-explanatory.

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

Parameters4/5

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

The input schema already fully describes both parameters (pid and timeout), providing a baseline of 3. The description adds behavioral context for the timeout parameter by noting it may timeout if the process is busy, connecting the parameter to real-world behavior. This elevates the score above baseline.

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 clearly states the tool retrieves the internal state/data held by a GenServer process, using a specific verb ('Get') and resource (GenServer's loop state). It distinguishes itself from sibling tools like get_process_info and get_process_dictionary by explicitly narrowing scope to the internal data value.

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?

The description provides explicit 'WHEN TO USE' and 'NOT FOR' sections with concrete alternatives, telling the agent when to use this tool versus get_process_info or get_process_dictionary. This directly addresses usage guidance and avoids ambiguity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JediLuke/BeamScope-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server