Skip to main content
Glama

Prior attempts on an entity

prior_attempts
Read-onlyIdempotent

Check an entity's past change history before editing to see which similar changes were tried, reverted, or rejected, with reasons, so you can change your plan instead of repeating a failed approach.

Instructions

Prior change attempts on an entity, each with an inferred outcome.

Call this BEFORE editing an entity. If the same change was tried before and reverted, you get the prior reasoning and change_type plus an inferred outcome — so you can change your plan instead of repeating a rejected approach.

Each result is a change event plus the trail fields: outcome ("reverted" — a later removal on the path; "reopened" — closed but a later supersede re-opened it; "rejected" — a standalone reject event that closed no earlier attempt, surfaced as its own row whose reasoning IS the record; "active"), confidence ("exact" — the attempt was closed by an explicit revert/reject, or the row is a standalone rejection; "proximity_high" / "proximity_low" — the add->remove window heuristic for implicit removals), outcome_reasoning (WHY it was rejected), superseded_by + supersede_reasoning (the re-open, when present), and current_status — the entity's standing now. Treat "reverted" and "rejected" as "don't repeat this without a supersede"; "reopened" means the old verdict no longer stands. Together they read: tried → reverted → re-opened. Templated and deterministic — no LLM call; pull-only.

Conservative by design — min_confidence defaults to "proximity_high", so an empty list (nothing clearly tried-and-rejected) is the normal, preferred answer over a speculative false positive; "exact" rows always clear that default floor. Pass min_confidence="proximity_low" to widen recall. Rows carry match_type ("exact" / "substring" / "fuzzy") and similarity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fuzzyNoOptional semantic query: also return attempts on entities whose prior reasoning is similar to this text — catches renames (payment_token vs card_token). Rows are labeled match_type='fuzzy' with a similarity score; without the selvedge[semantic] extra it falls back to substring matching and says so in a leading note row.
limitNoMaximum number of results.
descriptionNoFree-text description of what you're about to do, when you don't have an exact entity_path. Matched as a substring against prior reasoning, diffs, and entity paths. Provide this OR `entity_path` (entity_path takes precedence if both are given).
entity_pathNoThe entity you're about to change. Exact path with prefix matching — 'users' also covers 'users.email'. Examples: 'src/auth.py::login', 'users.email', 'env/STRIPE_SECRET_KEY'. Provide this OR `description`.
min_confidenceNoConfidence floor. 'proximity_high' (default) returns the high-signal rows: attempts closed by an explicit revert/reject (confidence 'exact' — always clears this floor, including standalone rejections) plus attempts reverted within the window. Pass 'proximity_low' to also see the noisy tail (still-active changes and far-apart reverts).proximity_high
window_minutesNoProximity window in minutes for the add->remove revert heuristic — the tiebreaker for IMPLICIT removal types only. An attempt removed within this many minutes is 'proximity_high'; beyond it, 'proximity_low'. Attempts closed by an explicit revert/reject are 'exact' regardless of the window. Default 10080 (7 days).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / min_confidence / description
      Previous value: -"Confidence floor. 'proximity_high' (default) returns only attempts that were clearly tried and then reverted within the window — the high-signal 'rejected before' cases. Pass 'proximity_low' to also see the noisy tail (still-active changes and far-apart reverts)."New value: +"Confidence floor. 'proximity_high' (default) returns the high-signal rows: attempts closed by an explicit revert/reject (confidence 'exact' — always clears this floor, including standalone rejections) plus attempts reverted within the window. Pass 'proximity_low' to also see the noisy tail (still-active changes and far-apart reverts)."
    • changedInput schema / properties / window_minutes / description
      Previous value: -"Proximity window in minutes for the add->remove revert heuristic. An attempt removed within this many minutes is 'proximity_high'; beyond it, 'proximity_low'. Default 10080 (7 days)."New value: +"Proximity window in minutes for the add->remove revert heuristic — the tiebreaker for IMPLICIT removal types only. An attempt removed within this many minutes is 'proximity_high'; beyond it, 'proximity_low'. Attempts closed by an explicit revert/reject are 'exact' regardless of the window. Default 10080 (7 days)."
  2. Changed2 schema fields changedv0.3.11
    • addedInput schema / properties / limit / maximum
      Added value: +1000
    • addedInput schema / properties / window_minutes / maximum
      Added value: +1000
  3. Changed1 schema field changedv0.3.10
    • addedInput schema / properties / fuzzy
      Added value: +{
      +  "default": "",
      +  "description": "Optional semantic query: also return attempts on entities whose prior reasoning is similar to this text — catches renames (payment_token vs card_token). Rows are labeled match_type='fuzzy' with a similarity score; without the selvedge[semantic] extra it falls back to substring matching and says so in a leading note row.",
      +  "title": "Fuzzy",
      +  "type": "string"
      +}
  4. Addedv0.3.8

TDQS

A4.3/5.0
Behavior5/5

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

The description goes well beyond the annotations by stating 'Templated and deterministic — no LLM call; pull-only', 'Conservative by design', and explaining the confidence model, inferred outcomes, and the meaning of 'reopened'. It also discloses the fuzzy-search fallback and the normal empty-list behavior. Nothing in the description contradicts the readOnlyHint, idempotentHint, or destructiveHint annotations.

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 dense but well-structured, front-loading the critical 'call before editing' guidance and then layering outcome semantics, confidence behavior, and parameter adjustments. The length is justified by the tool's complexity. However, some details repeat the parameter-schema descriptions, such as the min_confidence floor and fuzzy fallback, making it slightly less economical than it could be.

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 six optional parameters, an output schema, and a nuanced outcome taxonomy, the description covers everything needed to invoke it correctly: when to call, how to interpret outcomes, how confidence works, what the default behavior is, and what an empty result means. It also explains the standalone rejection row and the 'tried → reverted → reopened' reading, leaving no significant gap.

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?

Input schema coverage is 100%, so the baseline is 3. The description adds useful integration semantics, such as the precedence between description and entity_path, the default min_confidence floor, and that the window heuristic applies only to implicit removals. Much of this is also present in the parameter descriptions, so the added value is moderate but real.

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 clearly identifies the tool as returning prior change attempts on an entity with inferred outcomes, and it gives a concrete operational purpose: 'Call this BEFORE editing an entity' to avoid repeating a rejected change. It is more than a tautology because it explains the resource and value proposition. However, it does not explicitly differentiate itself from sibling tools like history or stale_decisions, so it stops short of a 5.

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 is explicit about when to call the tool ('Call this BEFORE editing an entity') and how to interpret the results, including 'reopened' meaning the old verdict no longer stands. It also explains when to widen recall with min_confidence='proximity_low' and that an empty list is the normal, preferred answer. It does not compare itself against siblings or give explicit 'when not to use' instructions, so it is not a full 5.

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