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. Added

TDQS

B3.3/5.0
Behavior3/5

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

Annotations only say readOnlyHint=false and destructiveHint=false, so the description must carry the rest; it usefully discloses lease semantics (TTL-bounded) and that a fencing token is returned, plus the auth/prerequisite path via keys.create. It does not disclose contention behavior (block vs. error), what happens at lease expiry, whether the lock must be released manually, or any rate limits.

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?

Four short sentences, front-loaded with the action and return value, then the prerequisite. The telegraphic style costs a little readability but nothing is padding.

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 mutating lock-acquisition tool with no output schema, four parameters at 25% coverage, and siblings like lock.release, the definition should explain lock lifetime, contention/expiry behavior, and the TTL parameter. The return value and auth path are covered, but the operational gaps are substantial.

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 coverage is only 25% — caller_key is the sole documented parameter and the description merely repeats it. The meaningful parameters name, owner, and especially ttl_s (bounded 1–3600) get no explanation of semantics, uniqueness scope, or ownership transfer implications.

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" — and adds a concrete return artifact (a fencing token). It is clearly distinguishable from lock.release/lock_release by the verb, though it never names the counterpart it pairs with.

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 an explicit prerequisite and ordering: call keys.create once, then pass caller_key on every later tools/call. That is actionable workflow guidance. It stops short of exclusions — nothing about what to do when the lock is already held, whether to release before re-acquiring, or how to pick a TTL.

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