Skip to main content
Glama

memkernel_acquire_lease

Acquire an exclusive, time-limited lease on a file before editing to prevent conflicting changes; returns a fencing token or the current holder and lease expiry.

Instructions

Acquire an exclusive, time-limited lease on a file before editing it.

timeout_seconds is the lease TTL; renew it with memkernel_heartbeat_lease. Returns acquired=true and a fencing_token on success; on contention returns acquired=false with the current holder and how long until it expires.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes
timeout_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 mostly delivers: exclusivity, time-limitation, TTL semantics, renewal path, and the two outcome branches (acquired=true with fencing_token, or acquired=false with holder and remaining expiry). It omits permission/prerequisite requirements and whether contention should be retried.

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?

Three tight sentences, front-loaded with the core action, then the parameter meaning, then the return contract. No filler or restatement of the tool name.

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 not be spelled out, yet the description usefully summarizes both outcome branches. Combined with the sibling naming, an agent has almost everything needed; only concurrency/retry guidance and prerequisites are absent.

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 description coverage is 0%, so the description must compensate. It explains timeout_seconds as the lease TTL (not just a timeout) and ties renewal to it; file_path's meaning is conveyed by "a lease on a file." It does not document format constraints or edge values (e.g. minimum TTL).

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 precise verb (Acquire) and resource (exclusive, time-limited lease on a file), plus the intent behind it (before editing it). This is clearly distinguishable from siblings like memkernel_release_lease, memkernel_heartbeat_lease, and memkernel_checkout 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 Guidelines4/5

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

Gives the triggering context ("before editing it") and routes renewal to the sibling memkernel_heartbeat_lease. It does not explicitly state when-not to use it (e.g. read-only work) or contrast with memkernel_checkout, so it falls short of full alternative coverage.

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