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.
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": {
"file_path": "<file_path>"
},
"name": "file_lock_acquire"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl_sec | No | ||
| file_path | Yes | ||
| agent_name | No |