Skip to main content
Glama

file_lock_acquire

Acquire an exclusive lock on a shared file to prevent concurrent edits. If another agent holds the lock, the call returns details about the holder and remaining time.

Instructions

Declare exclusive edit intent on a file to prevent concurrent modifications.

Call this before editing a shared file (types.py, models.py, etc.). If another agent already holds the lock, the call fails with details about who holds it and how long until it expires.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ttlNoLock lifetime in seconds (default 300 = 5 minutes). Auto-expires to prevent dead locks if you crash without calling file_lock_release.
file_pathYesAbsolute or relative path to the file to lock
agent_nameYesYour agent name (e.g. "prompt-dev", "event-dev")

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description must fully disclose behavior. It describes exclusive locking, failure details, and auto-expiry via ttl. It does not mention permissions or side effects, but the core behaviors are covered.

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?

The description is three sentences: purpose, when to call, and failure behavior. It is front-loaded with the key action and has no unnecessary words.

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

Completeness5/5

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

Given the tool's complexity and presence of an output schema, the description adequately covers purpose, prerequisites, conflict handling, and auto-expiry. It is complete for the task.

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 100%, and the description adds context about ttl auto-expiry and usage, but it doesn't add new meaning beyond what the schema provides. Baseline 3 is appropriate.

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's purpose: 'Declare exclusive edit intent on a file to prevent concurrent modifications.' It uses a specific verb and resource, distinguishing it from siblings like file_lock_release and file_lock_list.

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 description guides when to use the tool: 'Call this before editing a shared file' and explains failure behavior when another agent holds the lock. It does not explicitly state when not to use it but provides sufficient context.

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/CronusL-1141/AI-company'

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