Skip to main content
Glama

claim

Reserve time-limited leases on files or directories before modifying them, preventing concurrent edits by multiple agents; if busy, returns the holder and duration.

Instructions

Vezmi si nájem na soubory nebo adresáře, které se chystáš měnit.

Buď dostaneš všechny, nebo žádnou. Když je něco obsazené, vrátí se, kdo to drží a na jak dlouho — počkej, vezmi si jinou práci, nebo se ozvi přes say. Nájem sám vyprší, takže spadlý agent repo nezablokuje.

Nájem na adresář pokrývá i soubory pod ním. Editace volného souboru si nájem vezme sama (hook), tohle je na rezervaci dopředu — typicky než pustíš skript, který sahá na víc souborů najednou.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathsYes
purposeNo
ttl_secondsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: all-or-nothing atomicity, self-expiring TTL so a crashed agent cannot deadlock the repo, directory leases being recursive, and holder+duration returned on conflict. It omits re-entrancy/idempotency (what happens if you re-claim a path you already hold) and any permission requirements, which keeps it short of a 5.

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 the core action, then behavior, then the conflict path, then the 'this is for pre-reservation' clarification. Four short paragraphs with little waste, though the final paragraph re-states ground already covered by the hook note.

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 3-param mutation-style tool with no annotations, the description covers atomicity, expiry, conflict reporting, and recursion semantics; the conflict return shape is even described despite an output schema existing. Nothing an agent needs to invoke it correctly is missing, aside from the undocumented `purpose` field.

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 0%, so the description must compensate. It implicitly explains `paths` (files or directories, recursively covered) and `ttl_seconds` (lease expires on its own; holder's remaining duration is reported), but the `purpose` parameter is never addressed and nothing maps the text onto the named fields.

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+resource: taking a lease ('nájem') on files or directories you intend to change, with clear scope (directory leases cover contained files). It is distinguishable from siblings like `release` (the counterpart) and `say` (the escalation channel) without opening any 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 when-to-use: reserve ahead when a script will touch many files at once, not for single-file edits since the hook auto-claims those. It also gives the conflict playbook — wait, pick up other work, or reach out via `say` — so the agent knows both the trigger and the fallback.

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