Skip to main content
Glama

Apply reshelving

apply_reshelving
Destructive

Preview proposed reshelving from staged library assignments, then apply an approved, unexpired preview to current labels with stale-change and churn safeguards.

Instructions

Create a reshelving preview or apply an approved preview to current labels. Use after submit_library_result stages assignments; use pin_shelf for a user's individual shelf decision or undo_library_apply to reverse the latest apply. Preview needs a run and current projection revision; apply needs its preview_id, delta_hash and operation_key. Apply is disabled by default and stops at 15 percent churn without trusted human approval; expired or stale previews must be rebuilt.

Input Schema

NameRequiredDescriptionDefault
modeNopreview creates a proposal and requires run_id; apply requires preview_id, delta_hash and operation_key and must pass the local apply gate.
run_idNoLibrarian run identifier from list_library_work; omission selects the service's default run where allowed.
delta_hashNoExact proposed-change hash returned with the preview; prevents applying a different delta.
preview_idNoUnexpired preview identifier returned by apply_reshelving in preview mode.
operation_keyNoClient-generated key for an identical-operation retry; do not reuse it for different arguments.
activate_versionNoWhether the preview should activate this run's taxonomy version when applied.
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
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds real context: apply is disabled by default, halts at 15 percent churn without trusted human approval, and expired or stale previews must be rebuilt. It does not state whether a halted apply is atomic or what state labels are left in, so it stops short of full disclosure.

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 purpose, then sequencing, then mode parameters, then safety gating — a sensible order with no filler sentences. It is dense to the point of being tight; the churn-threshold and staleness rules are compressed into one long clause that a reader may need to re-parse.

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 7-parameter destructive tool with no output schema, the description covers the full decision path: prerequisites, mode-specific inputs, retry key semantics, failure/recovery cases (expired previews), and the human-approval gate. Nothing an agent needs before invoking it 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?

Schema coverage is 100%, so baseline would be 3, but the description adds mode-conditional requirements the schema only implies: preview needs run plus current projection revision, apply needs preview_id, delta_hash and operation_key. That mapping between mode and required fields is genuinely useful beyond the per-field 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?

Opens with a specific verb+resource pair ('Create a reshelving preview or apply an approved preview to current labels') and explicitly separates its two modes. It names the sibling tools it is not (pin_shelf, undo_library_apply), so an agent can route correctly 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 Guidelines5/5

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

Gives explicit ordering ('Use after submit_library_result stages assignments') and names alternatives with their selecting conditions: pin_shelf for an individual shelf decision, undo_library_apply to reverse the latest apply. Both when-to-use and when-to-use-something-else are present.

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