acquire_lock
Acquire an exclusive lock on a file before editing to prevent multiple AI agents from modifying it simultaneously. Returns lock status and blocker info if the file is already locked.
Instructions
Acquire an exclusive lock on a file before editing. Prevents other AI agents from modifying the same file simultaneously. Returns lock status and blocker info if already locked.
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": {
"filepath": "<filepath>",
"agent_name": "<agent_name>",
"intent": "<intent>"
},
"name": "acquire_lock"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes | Brief description of what the agent plans to do with this file (e.g., 'Refactoring the auth middleware') | |
| filepath | Yes | Relative path to the file to lock (e.g., 'src/index.ts') | |
| agent_name | Yes | Name of the AI agent requesting the lock (e.g., 'claude-code', 'aider', 'roo-code') |