Skip to main content
Glama

Acquire a lock / lease (free — workspace op)

coord_lock

Acquire an exclusive lease on a key so only one agent acts at a time. The lease auto-expires to prevent deadlocks from crashed agents.

Instructions

LOCK: "only one agent does this irreversible thing." Returns a leaseId, or 409 with who holds it. The lease AUTO-EXPIRES after ttlSeconds, so a crashed agent can never deadlock your fleet. Call coord_release when done (or just let it expire).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYeswhat you are locking, e.g. "deploy" or "wallet:0xabc"
holderNowho you are — echoed in 409s so debugging works
secretNo
ttlSecondsNo
workspaceIdYes
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses auto-expiry after ttlSeconds, the 409 behavior with holder info, and the consequence for crashed agents (no deadlock), which is strong behavioral context. It doesn't detail renewal or permission requirements, but that's minor for a lock tool.

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 sentences, front-loaded with the core purpose ('LOCK'), and every sentence adds value—behavior, return, and usage handoff. No wasted words.

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 lock tool, the response format and expiration behavior are covered. It doesn't discuss renewal or retry logic, but given its simplicity, the description is adequate, especially with the sibling release tool named for the 'done' case.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 40%, but the description explains the purpose of ttlSeconds (auto-expiry) and the meaning of leaseId/409. However, it doesn't clarify workspaceId, holder, or secret parameters, so it doesn't fully compensate for the schema gaps.

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?

The description clearly states the tool acquires a lock/lease ('LOCK'), specifying it returns a leaseId or 409, and distinguishes it from siblings like coord_release and coord_barrier by its mutual-exclusion role.

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?

It gives explicit context: use it for 'only one agent does this irreversible thing' and recommends 'Call coord_release when done (or just let it expire).' This names the complementary tool, though it doesn't discuss when a barrier or other coordination tool would be more appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gitwormq/datasieve-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server