Skip to main content
Glama

Query locks

lock_query
Read-onlyIdempotent

Lists active work-claim locks for the current git repository, with filters for text, scope, status, or agent. Finished locks are excluded by default; request status 'done' or 'all' to include them.

Instructions

Lists agent-locks work-claim locks for the current git repository (shared across all its worktrees). IMPORTANT: when status is omitted, this ONLY returns active locks — done/finished locks are excluded from the default view by design, so you see what is currently being worked on, not a full history. Pass status: "done" or status: "all" to include finished locks. Returns a compact summary per lock: {id, title, status, percentComplete, scope, agent_id, parent_agent_id}. percentComplete is computed from the ratio of checked to total tasks on that lock (a lock with zero tasks reports 100).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoFree-text, case-insensitive substring search across each lock's title and its Notes section.
scopeNoOne or more glob patterns. Only locks whose own scope glob-overlaps at least one of these patterns are returned. Uses the same overlap heuristic as lock_check_conflict (see that tool's description for its limitations).
statusNoWhich locks to include. Defaults to "active" (done locks are excluded unless you explicitly ask for them).
agent_idNoOnly return locks created with this exact agent_id.
Behavior5/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true; the description adds that locks are shared across worktrees, that done locks are excluded by default, and the exact percentComplete calculation (ratio of checked to total tasks, zero tasks = 100). No contradiction with annotations.

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 a single well-structured paragraph that front-loads the core purpose, then provides an IMPORTANT clarification, then the return format. Every sentence adds value without redundancy.

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 description explains the return fields and the percentComplete computation, which is important because no output schema exists. It also covers the default filtering behavior and worktree sharing. For a simple read-only query tool, this is complete.

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?

The schema covers all four parameters with full descriptions (100% coverage), so the baseline is 3. The description adds user-facing behavior context for the `status` parameter (default active, done/all to include finished locks) and clarifies the listing scope, earning a 4.

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 it 'Lists agent-locks work-claim locks for the current git repository' – a specific verb and resource. It distinguishes itself from siblings like lock_check_conflict and lock_create by focusing on listing locks, and adds useful context about shared worktrees.

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 explains the default behavior ('when status is omitted, this ONLY returns active locks') and explicitly instructs how to include finished locks ('Pass status: "done" or status: "all"'). While it does not explicitly name alternative tools, the sibling set makes it clear this is for querying rather than conflict-checking.

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