Skip to main content
Glama

Stale decisions due for revisit

stale_decisions
Read-onlyIdempotent

Find decisions that need revisiting: expired, past revisit date, or invalidated by later changes. Deterministic rules surface stale reasons and active signals for follow-up.

Instructions

Decisions due for a revisit — expired, past their date, or with a triggered stale condition.

Three deterministic rules. Expiry-based (flag="expired"): events whose expires_when condition fired, evaluated from local state only — date: against now, entity:PATH:changes against the event log, library:NAME>=VERSION against installed dist metadata; the pattern kind that fired is in expired_pattern. A library: condition whose dependency isn't locally observable surfaces as flag="manual_review" instead of a guess; manual:LABEL never auto-fires. Date-based (flag="revisit_due"): events whose revisit_after has passed AND the entity is still live (queried via blame/diff/prior_attempts after the decision, or its changeset saw later activity) — pure age alone never surfaces. Condition-based (flag="review_suggested"): events whose stale_when text shares keywords with a LATER change event — the named invalidation evidence may have happened. Surfacing only: nothing is un-retired automatically; follow up with a supersede if the condition really was triggered.

Each result is the change event plus flag, revisit_due, days_overdue, active_use_signals, matched_terms, matched_event_id, expires_status, expired_pattern, expires_detail, and a one-line stale_reason. Date-due rows first, most-overdue leading; filter by entity_path, project, or agent. Templated and deterministic; no LLM call, no network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agentNoOptional filter to the agent that logged the decision.
limitNoMaximum number of results.
projectNoOptional filter to a specific project/repository.
entity_pathNoOptional filter to a single entity or path prefix — 'users' also covers 'users.email'. Empty = every entity.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.11
    • addedInput schema / properties / limit / maximum
      Added value: +1000
  2. Addedv0.3.8

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnly, idempotent, and non-destructive annotations, the description discloses significant behavior: it never auto-unretires, never guesses when dependency observation is unavailable (`manual_review`), never surfaces by age alone, is templated and deterministic, makes no LLM call, and uses no network. This is exemplary behavioral disclosure.

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?

The description is long but information-dense, front-loaded with a one-sentence summary followed by clearly separated rules and output details. Every sentence adds relevant, non-redundant context—no filler, no repetition.

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 tool with this complexity—three distinct rule families, nuanced edge cases, and return-field semantics—the description is complete. It covers rule mechanics, key caveats, follow-up action, filtering, ordering, and guarantees, so an agent can confidently invoke and interpret 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 description coverage is 100%, so the baseline is 3. The description adds marginal value by noting filters (entity_path, project, agent) and ordering, but does not introduce parameter semantics beyond the schema's own property descriptions.

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 purpose: surfacing decisions that are due for revisit, with three explicit deterministic triggers (expired, revisit_due, review_suggested). It clearly identifies the resource (stale decisions) and differentiates itself from generic history/search tools by emphasizing its deterministic, surfacing-only nature.

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?

The description gives strong context on when to use the tool: to find decisions whose revisit conditions have fired, with filters by agent/project/entity_path, and it advises follow-up with a `supersede` if a condition truly triggered. It doesn't explicitly contrast against the listed sibling tools or list exclusions, but the operational context is clear enough.

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