Skip to main content
Glama

Claim library work

claim_library_work
Destructive

Claim up to twelve Librarian evidence packets to lease work, then renew, release, or cancel attempts with the returned work ID and attempt token.

Instructions

Lease Librarian evidence packets, or renew, release or cancel your current attempts. Use after list_library_work to acquire work; use submit_library_result to store an assignment. Claim returns up to twelve packets with attempt tokens. Renew/release/cancel require the work_id and attempt_token from that claim. Leases last 60-900 seconds, never beyond one hour from first claim; three attempts exhaust a row.

Input Schema

NameRequiredDescriptionDefault
actionYesclaim acquires packets; renew extends your lease; release returns your attempt; cancel cancels it. Non-claim actions require work_id and attempt_token.
reasonNoHuman-readable explanation for the requested action or non-assignment outcome.
run_idNoLibrarian run identifier from list_library_work; omission selects the service's default run where allowed.
work_idNoWork-row identifier returned by claim_library_work, distinct from the source item ID.
client_idYesStable identifier for your Librarian client; use the same value through claim, renew and submit.
max_itemsNoMaximum single-item packets to lease in this claim.
attempt_tokenNoOpaque token for your current leased attempt; copy from claim_library_work and do not invent it.
lease_secondsNoRequested lease duration in seconds; renewal cannot extend past the attempt's absolute lifetime.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.12.1

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond annotations: 60-900 second lease bounds, a hard one-hour absolute cap from first claim, three-attempt exhaustion of a row, and a twelve-packet claim ceiling. These are the operational facts that matter for a destructive, non-idempotent lease tool and are not derivable from destructiveHint/idempotentHint.

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?

Five tight sentences, front-loaded with the primary action and immediately followed by the sibling routing. No filler and no repetition of schema content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter destructive lease tool with no output schema, it covers prerequisites, token flow, limits and exhaustion behavior. What is thin is the return payload: "up to twelve packets with attempt tokens" does not say what a packet contains or what happens when no work is available, which matters since there is no output schema to fall back on.

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 the baseline is 3, but the description genuinely adds semantics: attempt tokens must come from the claim and must not be invented, the one-hour absolute lifetime caps lease_seconds beyond what the schema states, and max_items is framed as "up to twelve packets." It stops short of explaining run_id omission and reason requirements, which remain solely in schema text.

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 concrete verb set (lease, renew, release, cancel) and a concrete resource (Librarian evidence packets / current attempts). It explicitly positions itself relative to siblings list_library_work and submit_library_result, so an agent can distinguish it 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?

"Use after list_library_work to acquire work; use submit_library_result to store an assignment" gives explicit sequencing and names both flanking alternatives. It also states which actions require work_id and attempt_token, so the agent knows which branch of the action enum it can call.

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