Skip to main content
Glama

Detect and clear orphaned sandboxes

sandbox_janitor

Detects orphaned headless Windows Sandbox sessions that hold the one-sandbox slot and, with fix enabled, stops them via client teardown or CmService restart, returning an elevated command.

Instructions

Detect a headless Windows Sandbox (vmmemWindowsSandbox alive without a client process - it holds the one-sandbox slot and ignores sandbox_stop). With fix:true: graceful platform stop for listed ids, client-process teardown, then a CmService restart fallback; if elevation is required it returns the exact elevated command instead of failing silently.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sandbox_janitor"
  }
}

Input Schema

NameRequiredDescriptionDefault
fixNoDefault false: report only.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0-alpha.3

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does well: it discloses detection criteria, the fix:true sequence (graceful stop, client-process teardown, CmService restart fallback), and elevation behavior that returns an exact command rather than failing silently. It does not detail side effects on other sandboxes, but the mutation path is unusually transparent.

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 sentences, front-loaded with the detection condition and then the fix behavior. The parenthetical is dense but necessary, and there is no filler.

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

Completeness3/5

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

The description covers detection and remediation well, but with no output schema it does not explain what the report-only mode returns or what 'listed ids' refers to. For a tool with no annotations and no output schema, that leaves a meaningful gap in understanding the result.

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 coverage is 100%, so the fix parameter is already documented; the description adds that fix:true triggers the stop/teardown/restart sequence while default false is report-only. However, 'for listed ids' references an id list that is not present in the input schema, which could confuse an agent about how targets are specified.

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 states a specific verb (detect/clear) and resource (headless Windows Sandbox/orphaned sandboxes), and explicitly distinguishes it from sandbox_stop by noting the orphan ignores sandbox_stop. An agent can identify the tool's role without opening the schema.

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 the triggering condition (vmmemWindowsSandbox alive without a client process, holding the one-sandbox slot) and the fix:true mode, and names sandbox_stop as the alternative that fails. It does not spell out when not to use it, but the context is clear.

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