Skip to main content
Glama
songzhifei512

multi-agent-bridge

file_lock_acquire

Acquires an advisory file lock to prevent concurrent edits by multiple agents. Returns success or the current holder if locked; locks auto-expire to avoid deadlocks.

Instructions

Acquire an advisory file lock to prevent two agents editing the same file concurrently. Returns ok:true on success, or ok:false with the current holder if already locked. Locks auto-expire (default 30min) so a crashed agent can't hold a lock forever. Path is normalized to absolute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttl_secNo
file_pathYes
agent_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden — and it delivers. It discloses that the lock is advisory, non-blocking (returns ok:false with the current holder), auto-expires after 30 minutes by default, and normalizes paths to absolute.

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?

Four sentences, each adding a distinct fact: purpose, return contract, auto-expiry, and path normalization. No redundant phrasing or filler.

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?

The description covers purpose, return behavior, expiry, and normalization, which is strong for a tool with no output schema. It is missing explicit agent_name semantics and a hint about file_lock_release for early release, but these are minor gaps.

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 description coverage is 0%, so the description must compensate. It adds meaning for file_path (normalized to absolute) and ttl_sec (default 30min expiration), but it says nothing about agent_name, leaving that parameter's purpose ambiguous.

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 opens with 'Acquire an advisory file lock' — a specific verb and resource — and immediately states the concurrency-prevention purpose. It is clearly distinguishable from siblings like file_lock_release and file_lock_list, whose names alone signal different actions.

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?

The phrase 'prevent two agents editing the same file concurrently' gives a clear scenario for when this tool is appropriate. However, it does not explicitly name alternatives or state when not to use it, such as when shared memory would be a better coordination mechanism.

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