Skip to main content
Glama

Create a lock

lock_create

Claim a work item by writing an active lock file that lists your tasks, enabling conflict-free coordination across git worktrees without touching git history.

Instructions

Claims a piece of work by writing a new active lock file. Use this after you have decided to proceed (optionally having checked lock_query / lock_check_conflict first). tasks are created as a plain unchecked checklist; call lock_update as you complete each one. agent_id / parent_agent_id: pass your OWN id here only if you already know it from your own context (some orchestration harnesses hand a subagent an explicit id when dispatching it) — this server has no way to detect either value automatically (no MCP transport mechanism exposes a session/agent id to a stdio server subprocess). Omit them (or pass null) if you do not know them; they will be recorded as null, never fabricated. parent_agent_id specifically means "the id of whatever spawned you," if you are a subagent and happen to know it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesGlob patterns describing the files/paths this lock claims.
tasksYesPlain-text descriptions of the tasks you plan to do. All are created unchecked.
titleYesShort human-readable title for this lock.
agent_idNoYour own agent id, ONLY if you already know it from your context. Omit or pass null otherwise — never guess.
parent_agent_idNoThe id of whatever spawned you, ONLY if you already know it. Omit or pass null otherwise — never guess.
Behavior4/5

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

Annotations already indicate readOnlyHint=false (write) and destructiveHint=false. The description adds valuable behavioral details: lock file creation, tasks created unchecked, and the handling of agent_id/parent_agent_id being recorded as null if unknown. This goes beyond the annotation hints, though it does not cover potential error cases or return values.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is fairly detailed but each sentence provides value. The explanation about MCP transport is slightly verbose but justified. It is well-structured moving from purpose to usage to parameter caveats.

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?

Given the tool's complexity (5 params, no output schema), the description covers the main behavior, usage sequence, and the nuanced handling of optional IDs. It doesn't describe duplicate lock handling, but sibling lock_check_conflict exists. Overall, it is complete enough for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all params are defined. The description adds extra meaning, particularly for agent_id and parent_agent_id, explaining they should only be passed if already known and will never be fabricated. Tasks are described as 'plain unchecked checklist,' enriching the schema.

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 function: 'Claims a piece of work by writing a new active lock file.' This is a specific verb+resource and distinguishes it from siblings like lock_query, lock_check_conflict, lock_update, and lock_finish. It also clarifies that tasks are created unchecked.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use it: 'Use this after you have decided to proceed (optionally having checked lock_query / lock_check_conflict first).' It also provides sequential guidance with lock_update and mentions alternatives for checking conflicts.

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/luohoa97/agent-locks'

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