Skip to main content
Glama

lock

Idempotent

Acquire an advisory lock on a path for 5 minutes to signal other agents you're editing it. Calling again renews it; locks never block reads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to lock, relative to the workspace root. The file need not exist yet.
workspaceNoWorkspace slug. Optional, defaults to "temp".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations provide readOnlyHint=false, idempotentHint=true, destructiveHint=false. The description adds valuable behavioral details: 5-minute expiry, renewal on repeated calls, and that locks never block reads. These go beyond the annotations without contradicting them.

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?

Two sentences convey the core behavior, duration, renewal, and non-blocking nature. It is front-loaded with the verb 'Acquire' and contains no fluff.

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?

The tool is simple and the description covers all essential aspects: purpose, duration, renewal, and non-blocking behavior. No output schema is needed for a lock operation, and the description is self-sufficient alongside the annotations.

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%, so the baseline is 3. The description does not add additional parameter semantics beyond the schema; it merely references 'a path' which is already described in the schema. No extra value is provided.

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 action: 'Acquire an advisory lock on a path for 5 minutes to signal other agents you're editing it.' It specifies the verb, resource, and purpose, and distinguishes itself from sibling 'unlock'.

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?

It gives clear context on when to use: 'to signal other agents you're editing it.' It also mentions renewal and non-blocking behavior. However, it doesn't explicitly state when not to use it or mention alternatives beyond implicit contrast with 'unlock'.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.