Skip to main content
Glama

Sweep Idle Sessions

session_sweep
Idempotent

Finalize idle unfinished sessions that have been inactive for at least 24 hours. Optionally prune stale corrupt session entries from the quarantine directory.

Instructions

Finalize unfinished sessions whose metadata has been idle for at least 24 hours. v3.7.5 (B1): opt-in prune_corrupt also removes stale entries from the corrupt_sessions/ quarantine directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
callerNooperator
reasonNostale
outcomeNoaborted
idle_minutesNo
prune_corruptNo
response_formatNojson
corrupt_min_age_daysNo
Behavior1/5

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

The description states that with prune_corrupt=true it 'removes stale entries from the corrupt_sessions/ quarantine directory,' implying a destructive action. However, the annotations declare destructiveHint=false, creating a contradiction. Per scoring rules, a contradiction yields a score of 1. Annotations already provide readOnlyHint=false and idempotentHint=true, but the description adds context that contradicts destructiveHint.

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?

The description is two sentences long and conveys the core purpose. The inclusion of a version number and 'opt-in' is slightly verbose but not overly so. It is front-loaded with the primary action. Could be more concise by removing version info.

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

Completeness2/5

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

Given 7 parameters, no output schema, and a behavioral contradiction, the description omits critical details. It does not explain return format, idempotent behavior (despite annotation), or constraints on the idle_minutes parameter. The tool's behavior regarding prune_corrupt and its relationship with corrupt_min_age_days is unclear. The description is incomplete for an agent to reliably invoke the tool.

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

Parameters2/5

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

Schema description coverage is 0% for 7 parameters. The description only mentions the idle_minutes condition (implied by '24 hours') and the prune_corrupt parameter explicitly. It does not explain caller, reason, outcome, response_format, or corrupt_min_age_days. With low coverage, the description fails to compensate, leaving agents uninformed about essential parameters.

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 states the tool finalizes unfinished sessions idle for at least 24 hours. It clearly identifies the action (finalize) and resource (unfinished sessions). It mentions an optional parameter for pruning corrupt entries. However, it does not explicitly differentiate from sibling tools like session_finalize or session_cancel_job, which could also handle sessions.

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

Usage Guidelines2/5

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

The description does not provide guidance on when to use this tool versus alternatives. It lacks any explicit when/when-not conditions or references to sibling tools. The agent is left to infer usage from the title and description alone.

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/LCV-Ideas-Software/cross-review'

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