Skip to main content
Glama

Cleanup Stale

cleanup_stale

Closes idle tabs and shuts down browsers with no remaining tabs using an idle_seconds threshold to reclaim resources.

Instructions

Manually reap tabs idle ≥ idle_seconds + browsers with no remaining tabs.

Ex: cleanup_stale(idle_seconds=300) → {"closed_tabs":["t2"],"closed_browsers":[]}

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": "cleanup_stale"
  }
}

Input Schema

NameRequiredDescriptionDefault
idle_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the burden: it does disclose that tabs are closed and browsers are closed when emptied, and gives a concrete result payload, which clarifies destructiveness and scope. It does not state irreversibility, whether live sessions/state are lost, or whether the operation is rate-limited or scoped per session.

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 tight lines: the behavioral rule first, then a compact input→output example. No filler, and the critical condition is front-loaded.

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

Completeness4/5

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

An output schema exists, so the example's return keys are bonus rather than necessity. For a destructive, no-annotation tool the description covers scope and trigger condition well; only the default value and the fate of in-flight session state are unaddressed.

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 description coverage is 0% for the single parameter, so the description must compensate. It names idle_seconds in the threshold formula and shows idle_seconds=300 in the example, which conveys the semantics, but units and the default of 600 are left to the schema/name alone.

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?

States a specific verb (reap) applied to precise resources (tabs, browsers) with the exact condition (idle ≥ idle_seconds, browsers with no remaining tabs). An agent can tell this apart from kill_all or close_browser by the idleness condition, though no sibling is named.

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

Usage Guidelines3/5

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

The word 'Manually' hints that an automatic reaper already exists and this is the on-demand variant, and the example shows the intended call shape. But there is no explicit statement of when to prefer this over kill_all, close_browser, or close, nor any when-not guidance.

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