Skip to main content
Glama

lease_acquire

Take a named lease on shared state such as a checkout, dev database, or port without blocking. Re-taking your own lease extends it; leases expire automatically.

Instructions

Try to take a named lease on state another session could also change, such as a shared checkout, a dev database or a port (non-blocking). Re-taking your own lease extends it. Leases expire on their own.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesStable and specific, like "db:dev".
project_idNoDifferent project override. Use ONLY when the user explicitly asks for another project by name; otherwise stay in the current scope, even when results are empty.
ttl_secondsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
held_byNo
acquiredYes
extendedNo
expires_atNo
project_idYes
hive_noticeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.0
    • changedInput schema / properties / key / description
      Previous value: -"Stable and specific, like \"file:src/api/routes.ts\"."New value: +"Stable and specific, like \"db:dev\"."
  2. Changed1 schema field changedv1.2.2
    • addedOutput schema / properties / hive_notice
      Added value: +{
      +  "type": "string"
      +}
  3. First observedv1.0.0

TDQS

A3.7/5.0
Behavior4/5

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

Adds genuinely useful traits beyond the annotations: non-blocking acquisition, re-acquiring your own lease extends it, and leases self-expire. The annotations only cover the safety profile, so the contention and expiry semantics are meaningful added context. What happens on a failed acquire (error vs. false return) is not stated.

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 short sentences, front-loaded with the purpose, and the parenthetical placement of '(non-blocking)' is efficient. No filler or repetition.

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 explanation, and annotations carry the safety profile. The description covers the acquisition/extension/expiry semantics an agent needs; only the failure mode and ttl meaning are left unstated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description never mentions key, ttl_seconds, or project_id. With schema coverage at only 67%, ttl_seconds in particular is undocumented in both the schema and the prose, so the description does nothing to compensate for the gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb ('take a named lease') plus resource and the kind of state it guards, with concrete examples (shared checkout, dev database, port). It is clearly the acquisition half of the lease pair, though it never names the sibling lease_release to sharpen the contrast.

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?

States the situation that calls for it (state another session could also change) and flags that it is non-blocking, so the agent knows it fails rather than queues. No explicit when-not-to-use or pointer to the alternative tool (lease_release, or a lock-free path).

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