Skip to main content
Glama

actor_prune

Deletes actors with no rows anywhere and no activity in the last minute. Scans globally across all projects to avoid misreading inactive actors that own rows elsewhere. Preserves the caller's own actor.

Instructions

Delete every actor that owns no rows anywhere in the store and has not been active in the last minute: agents.actor_id, agents.parent_actor_id, todos.locked_by, todo_comments.author, kv.updated_by, leases.owner, pads.updated_by, wakes.owner, wakes.deliver_actor, agent_state_log.actor_id. The scan is global across every project, never scoped to the caller's: actors carry no project_id, so an actor can own rows in a project the caller cannot see, and a project-scoped scan would misread that actor as inert and delete it. Never prunes the caller's own actor. Refuses under HIVE_PROJECT_LOCK=1: this is a whole-store sweep. Run this after project_prune when sweeping the store: an empty project owns no agents rows either, so today the order cannot orphan an actor, but that stops being true the day project deletion ever covers a non-empty project, and this ordering is the one that stays safe if it does. Immediate, permanent: no dry-run mode.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorsNo
deletedYes
held_backYes
held_back_liveYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/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. It discloses global scope (never scoped to caller's project), the reason a project-scoped scan would be unsafe, that the caller's own actor is never pruned, the lock refusal, and that deletion is immediate and permanent with no dry-run mode.

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?

Although not short, the description is information-dense and every sentence contributes: scope, safety, lock behavior, ordering, and permanence. The most important action and criteria are front-loaded, and the length is justified because no annotations exist to cover destructive behavior otherwise.

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?

For a destructive global operation with zero parameters and no annotations, the description covers prerequisites, exclusions, broader context, and safety. An output schema exists, so not describing return values is acceptable. Nothing needed for correct invocation or risk awareness is missing.

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?

The tool has zero parameters and a vacuous schema, so the baseline of 4 applies; there is no parameter meaning left undocumented. The description's listed tables and field-by-field coverage add operational criteria rather than parameter details, which is appropriate here.

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 first sentence uses a precise verb ('Delete') and resource ('actor') and defines the exact pruning condition (owns no rows in listed tables and inactive for a minute). It also ties this to sibling project_prune, making its role in store sweeping unambiguous.

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

Usage Guidelines5/5

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

It explicitly instructs when to run it ('after project_prune when sweeping the store'), explains why the order is safe today and in the future, and states that it refuses under HIVE_PROJECT_LOCK=1. This gives the agent clear selection and sequencing guidance relative to its sibling.

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