Skip to main content
Glama

lease

Acquire, renew, release, or list named advisory locks with TTLs so concurrent agent sessions coordinate safely; renew before each protected step and wait for held locks when needed.

Instructions

Advisory locks by name: acquire, renew, release or list. A lease ends at its ttl (default 60 s) unless renewed, even while this session is offline, and another session may then take it: renew it (or list and check the holder and token) before every step it protects, and stop if that fails. wait: wait for a held lease, up to wait_s (default the ttl).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "lease"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
waitNo
ttl_sNo
actionYes
wait_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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: it discloses ttl expiry (default 60s), that expiry happens even while offline, that another session can take over, and the required renew-check-stop discipline. It leaves some behavior unstated, such as what acquire returns when the lease is already held without wait, and only hints at the holder/token concept.

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?

Dense but front-loaded with the core purpose and lifecycle; every clause carries information. The trailing 'wait: wait for a held lease...' is a fragment trailing the main flow, slightly loosening structure but adding needed meaning.

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 a 5-param, no-annotation, no-output-schema mutation tool, this covers the lifecycle, expiry risk, contention, and the renew-before-each-step discipline an agent needs to call it correctly. Remaining gaps (failed-acquire semantics, token/holder details) are modest but real.

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?

Despite 0% schema description coverage, the description explains the action enum values, ttl_s (default 60 s), wait ('wait for a held lease'), and wait_s (up to wait_s, default the ttl), compensating strongly. The 'name' parameter is only implicitly covered via 'by name', leaving minor residual ambiguity.

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?

Opens with a precise verb+resource: 'Advisory locks by name' and enumerates the four actions (acquire, renew, release, list). The purpose is unmistakable, but it never positions itself against the sibling 'wait' tool or other alternatives, so it stops short of full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It gives operative usage guidance ('renew it ... before every step it protects, and stop if that fails'), which tells the agent how to use it safely in a critical section. It does not state when to prefer this over alternatives or when not to use it, so guidance is implied rather than explicit.

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