Skip to main content
Glama

lease

Request or release repository path reservations so agents edit only covered files; conflicting requests queue FIFO, and globs can free all your reservations.

Instructions

Request or release leases on repository paths (globs: , * and ?; no braces). You may edit only what your leases cover; .git metadata needs a lease that names it. A request that conflicts with another agent's lease is queued (FIFO), and the response names the holders: then escalate(with: "path_owner"). release takes lease ids or globs ("*" releases all of yours).

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": {
      "execution_id": "<execution_id>",
      "agent_token": "<agent_token>",
      "action": "<action>",
      "paths": "<paths>"
    },
    "name": "lease"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoDefault exclusive. Shared leases conflict only with exclusive ones.
pathsYes
actionYes
reasonNo
agent_tokenYesThe agent token join_execution returned (once).
execution_idYesThe heads-down run (exe-…).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: conflicting requests are queued FIFO rather than failing, the response names the current holders, and release accepts lease ids or globs with '**' releasing all of yours. The annotations (readOnlyHint=false, destructiveHint=false) only say it mutates non-destructively; the description explains what actually gets created, updated, and freed.

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?

Front-loaded with the verb and resource, then edge cases, then failure mode, then the release variant. Every clause carries enforceable information — glob dialect, .git* exception, FIFO queueing, escalate routing — with no filler.

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 6-parameter mutating tool with no output schema, it covers the hard parts: conflict behavior, who is reported back, and wildcard release semantics. The gap is that a successful request's return (presumably the lease ids needed later for release) is never stated, which an agent must know to close the loop.

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 50%, and the description compensates for the undocumented 'paths' parameter by defining the glob syntax (**, *, ?, no braces) and what the argument means differently for request versus release. It leaves 'reason' and the request-versus-release return contract unexplained, so the compensation is partial rather than complete.

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 concrete verbs and resource: 'Request or release leases on repository paths', with the glob dialect spelled out. It also carves out its own niche against siblings by routing conflicting requests to 'escalate(with: "path_owner")' rather than leaving the agent to guess.

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 real usage policy: you may edit only what your leases cover, and .git* metadata requires a lease naming it, plus the escalation path when a request is queued behind another holder. It does not state when to prefer lease over adjacent coordination tools (e.g., claim_task or amend_contract), so it stops short of full when/when-not guidance.

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