Skip to main content
Glama

Undo library apply

undo_library_apply
DestructiveIdempotent

Reverse an applicable library apply by replaying its stored inverse as a new journal operation, restoring the prior projection revision; stale revisions are refused.

Instructions

Reverse the latest applicable library apply by replaying its stored inverse as a new journal operation. Use to undo the apply that produced the current projection revision; use apply_reshelving for a new proposal or pin_shelf for one item's shelf choice. Requires a dashboard user_intent_token. The inverse is itself reversible; identical operation_key retries replay the receipt, and stale revisions are refused.

Input Schema

NameRequiredDescriptionDefault
apply_idYesJournal apply identifier whose resulting projection revision is still current.
operation_keyYesClient-generated key for an identical-operation retry; do not reuse it for different arguments.
user_intent_tokenYesOperation-bound capability minted after local dashboard confirmation; agents cannot mint it or substitute an actor field.
expected_projection_revisionYesCurrent label-projection revision from the library response; stale writes are refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.12.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive=true and idempotent=true, but the description adds substantive context beyond them: the inverse is itself reversible, retries with an identical operation_key replay the stored receipt, stale projection revisions are refused, and the token must be minted by a human in the dashboard and cannot be substituted by an agent. These are exactly the failure modes an agent needs to anticipate for a destructive mutation.

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?

Three dense sentences, front-loaded with the action and mechanism, then alternatives, then preconditions and edge behavior. Slightly compressed phrasing ("replay the receipt") costs a little clarity, but nothing is redundant.

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 4-required-parameter destructive mutation with no output schema, the description covers the mechanism, authorization requirement, idempotency contract, staleness guard, and sibling alternatives. An agent has everything needed to call it correctly and to know when not to.

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 per-parameter descriptions already explain apply_id, operation_key retry semantics, user_intent_token provenance, and expected_projection_revision staleness. The prose echoes rather than extends that information ("identical operation_key retries replay the receipt" restates the schema's operation_key note). Baseline 3 is appropriate.

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 and resource ("Reverse the latest applicable library apply by replaying its stored inverse as a new journal operation") and immediately contrasts with the two closest siblings, apply_reshelving and pin_shelf. An agent can identify the operation and its mechanism without opening the schema.

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?

Explicit routing: use this to undo the apply that produced the current projection revision; use apply_reshelving for a new proposal and pin_shelf for a single item's shelf choice. It also states the prerequisite (a dashboard user_intent_token) up front, leaving nothing to inference.

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

Deploy Server

Other Tools