Skip to main content
Glama

Acquire lock

lock.acquire

Take a lease lock. Returns a fencing token. Call keys.create once. Pass caller_key on every later tools/call.

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": {
      "name": "<name>",
      "ttl_s": "<ttl_s>"
    },
    "name": "lock.acquire"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
ownerNo
ttl_sYes
caller_keyNopf_ key from keys.create. Pass this on tools/call when Authorization and X-Caller-Key are not set. A header key wins if both are set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / caller_key
      Added value: +{
      +  "description": "pf_ key from keys.create. Pass this on tools/call when Authorization and X-Caller-Key are not set. A header key wins if both are set.",
      +  "type": "string"
      +}
  2. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations only tell the agent this is a non-read-only, non-destructive operation, so the description carries most of the burden. It adds useful context (lease semantics, fencing token return, keys.create prerequisite, caller_key forwarding) but omits the behaviors that matter most for a lock: what happens if the lock is already held, whether acquisition blocks or errors, and what TTL expiry does.

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 short, front-loaded sentences with no filler. Each one conveys a distinct, actionable fact: the operation, its return value, and the auth/caller_key workflow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a distributed-lock primitive with four parameters, no output schema, and thin schema descriptions, the definition leaves critical gaps: contention behavior, error modes when the lock is held, lease expiry, and whether lock.release is required. Only the caller_key workflow is fully covered.

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?

Schema description coverage is only 25%, and the single documented parameter (caller_key) is merely echoed by the description. The meaning of name, owner, and ttl_s (units, maximum 3600, what happens at expiry) is never explained, so the description does not compensate for the low coverage.

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?

States a specific verb and resource: 'Take a lease lock', with the added detail that it returns a fencing token. It is distinguishable from lock.release by name and by the acquisition framing, though the description never explicitly contrasts the two.

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?

Provides real cross-tool sequencing guidance: call keys.create once first, then pass caller_key on every later tools/call. However, it gives no guidance on when to prefer this over alternatives like idem.begin or timer.set, and no exclusions or preconditions for the lock itself.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources