Skip to main content
Glama

sweep_expired_defeated

Delete defeated beliefs after their grace period and probability decay, returning the number removed. Restrict the sweep to a project plus global beliefs or run it across everything.

Instructions

Delete defeated beliefs whose grace period has elapsed (attenuated deletion — a defeated belief is deleted only once its probability has decayed below prob_threshold AND grace_hours have passed since it was last defeated, giving a wrong record_defeat call time to be caught and reversed first). Returns count of beliefs deleted. If project is given, restricts the sweep to that project's beliefs plus untagged (global) beliefs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNoRestrict the sweep to this project's beliefs plus untagged (global) beliefs. Omit to sweep everything.
grace_hoursNoHours since the belief was last defeated before it can be deleted.
prob_thresholdNoProbability below which a defeated belief becomes eligible for deletion.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/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 that beliefs are permanently deleted, the AND-combined eligibility criteria, the attenuation safeguard, and the return value. It omits any statement about irreversibility or permission requirements, which keeps it from a 5.

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?

Front-loaded with the core action, followed by necessary qualifying detail. The long parenthetical is information-dense rather than wasteful, though it slightly delays the project-scoping note that an agent needs.

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?

For a destructive batch tool with no output schema and no annotations, the description covers what gets destroyed, the gating conditions, and the return value ('count of beliefs deleted'). Adequate, with the only gap being irreversibility/permission context.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds value by spelling out the AND relationship between prob_threshold and grace_hours and clarifying that project scope includes untagged global beliefs — semantics beyond the isolated per-parameter schema text.

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?

States a specific verb (delete) and resource (defeated beliefs) qualified by precise scope criteria (grace period elapsed, probability decayed). The conditional semantics self-distinguish it from single-item delete_belief and time-based decay_all, so an agent can route without opening schemas.

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?

Explains the triggering condition clearly, including the rationale for the grace period (letting a wrong record_defeat be reversed), which tells the agent when this sweep is appropriate. It stops short of explicitly naming delete_belief or decay_all as the alternative and giving exclusion rules.

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