Skip to main content
Glama

list_handles

Read-onlyIdempotent

List a process's open handles by type, name, and target to identify files, registry keys, events, or processes it holds open. Requires user approval before opening the process.

Instructions

The handles a process holds, by type, with the names of files, registry keys, events and other objects; for processes held open, which process each one is. OPENS THE PROCESS (handles are duplicated out of it to read their names): the first call is refused with the risks; call again with force=true only if the user agreed.

Input Schema

NameRequiredDescriptionDefault
pidYesThe process ID.
kindNoOnly handles of this type (File, Key, Event, Process, Thread, Section...).
nameNoOnly handles whose name contains this (any case).
forceNoTrue only after the user agreed to the risk this tool described.
limitNoAt most this many (default 200, at most 2000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.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 and idempotent annotations, it discloses that the target process is opened and that handles are duplicated out of it to read their names. The initial refusal, risk disclosure, and explicit consent gate surface important potentially intrusive behavior that the annotations alone would conceal.

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?

Two dense sentences front-load the returned information and then the critical operational risk and consent workflow. The capitalization emphasizes the surprising behavior, and every clause earns its place without filler.

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?

Despite having no output schema, the description supplies the essential result content: handles by type, object names, and process-handle targets, while the schema documents filtering and truncation controls. Together with the risk-discovery and consent sequence, this gives an agent enough context to invoke the tool correctly; exact risks are intentionally supplied by the first call.

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?

All five parameters already have schema descriptions, including the filters, result limit, and force consent condition. The description usefully places force within the two-call workflow, but otherwise adds little parameter-specific meaning or syntax beyond the fully documented schema.

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

Purpose4/5

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

The description identifies the resource precisely: handles held by a process, grouped by type, with file, registry-key, event, and other object names, plus the targets of process handles. This naturally distinguishes it from general process-inspection siblings, although it does not explicitly contrast it with tools such as get_process or list_modules.

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 provides a concrete invocation protocol: the first call is refused and returns the risks, then the agent may retry with force=true only after the user agrees. It does not explain when handle inspection is preferable to sibling tools, so its guidance is stronger for safe invocation than for tool selection.

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