Skip to main content
Glama

entangled_acquire_lock

Acquire an exclusive mutex lock on a file, directory, or critical task to stop multiple agent CLIs from editing it at once and causing merge conflicts. Locks auto-expire via ttl.

Instructions

[ENTANGLED] Acquires an exclusive mutex lock on a file, directory, or critical task. Prevents multiple agent CLIs from editing the same file concurrently and causing merge conflicts. Locks automatically expire after ttl_seconds (default 30 minutes).

Input Schema

NameRequiredDescriptionDefault
agent_idYes
ttl_secondsNo
resource_pathYes
task_descriptionYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It usefully discloses exclusivity and automatic expiry after ttl_seconds (default 30 minutes), but says nothing about contention behavior (block, error, or return current holder), whether acquisition is idempotent for the same agent, or any permission requirements.

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?

Three tight sentences, front-loaded with the action before the rationale and the expiry detail. Slight noise from the '[ENTANGLED]' prefix, which duplicates the tool-name namespace.

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

Completeness3/5

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

An output schema exists and annotations do not, so the description is the sole source of behavioral context, yet it omits contention semantics and three of four parameter meanings. It covers purpose and lifetime adequately but is not complete for a locking primitive.

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 0% and the description only covers one of four parameters (ttl_seconds and its default, which merely restates the schema default). resource_path, agent_id, and task_description — all required — get no explanation of expected format or purpose.

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: 'Acquires an exclusive mutex lock on a file, directory, or critical task.' The acquire/release/list distinction from siblings like entangled_release_lock and entangled_list_locks is implicit in the verb but never called out.

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?

The merge-conflict rationale implies when to reach for this tool (before concurrent edits), but there is no explicit when-to-use, no mention of the release_lock counterpart that must eventually be called, and no guidance for the case where the lock is already held.

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