Skip to main content
Glama

claim

Reserve files or directories before editing to coordinate with other agents. All-or-nothing leases prevent concurrent changes and expire automatically.

Instructions

Lease the files or directories you are about to change.

All or nothing: you get every path or none. If something is taken you get back who holds it and for how long — wait, take other work, or ask via say/send. Leases expire on their own, so a crashed agent cannot block the repo.

A lease on a directory covers everything under it. Editing a free file claims it automatically (hook); use this to reserve ahead — typically before running a script that touches several files.

Input Schema

NameRequiredDescriptionDefault
pathsYes
purposeNo
ttl_secondsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden and does so well: it discloses atomic all-or-nothing acquisition, that failures return the current holder and remaining duration, that leases self-expire preventing deadlock from crashed agents, and that a directory lease covers its entire subtree. This is exactly the behavioral context an agent needs before calling.

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 core action and atomicity guarantee are front-loaded in the first line. The blocked-case advice reads slightly informally ('wait, take other work, or ask via say/send') but each sentence adds usable information with little waste.

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?

An output schema exists, so return values need no elaboration, and the description still usefully previews the failure payload. For a 3-parameter mutation-style tool it is nearly complete, missing only guidance on purpose/ttl usage and a pointer to release for giving a lease back.

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 explains `paths` thoroughly (files or directories, directories cover everything beneath) and hints at `ttl_seconds` via lease expiry, but never explains `purpose` or how a caller sets/extends the lease duration.

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: 'Lease the files or directories you are about to change.' An agent can immediately distinguish this from siblings like release, say, or send, and the all-or-nothing semantics sharpen the identity further.

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?

Gives clear context for use ('reserve ahead — typically before running a script that touches several files') and names alternatives for a blocked case (say/send to ask the holder). It also explains that editing a free file auto-claims via a hook, so explicit claiming is not always needed. The natural counterpart tool, release, is never mentioned, which is the one gap.

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