Skip to main content
Glama
martinbechard

MCP Agent Operations

claim_acquire

Atomically acquire file domains and exclusive resources for agent tasks, returning shared or isolated checkouts or conflict wait/recovery outcomes.

Instructions

Atomically acquire one file domain plus optional exclusive resources.

Project-files excludes backlog and supports isolation only beneath the primary worktree's canonical .worktrees/ root, with backlog omitted through worktree-specific sparse checkout. Backlog and all-files are primary-worktree-only. The three broad selectors are mutually exclusive; project-files and all-files require scope_reason. Schema-version-2 results return SHARED_CHECKOUT_ACQUIRED, ISOLATED_CHECKOUT_ACQUIRED, CLAIM_SCOPE_CONFLICT_WAIT_REQUIRED, SHARED_CHECKOUT_REQUIRED, SHARED_CHECKOUT_RELEASE_REQUIRED, ISOLATED_CHECKOUT_SETUP_REQUIRED, DIRTY_CHECKOUT_RECOVERY_AUTHORIZATION_REQUIRED, DIRTY_CHECKOUT_RECOVERY_ACQUIRED, or a structured rejection with the copied claim engine's stable exit code. Renamed outcomes also carry legacy_outcome.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseNoHEAD
taskYes
agentYes
filesNo
treesNo
branchNo
backlogNoSelect the complete primary-worktree-only backlog. Mutually exclusive with project_files and all_files; returns SHARED_CHECKOUT_RELEASE_REQUIRED when another claim owns the shared checkout, or SHARED_CHECKOUT_REQUIRED from another checkout.
claim_idYes
all_filesNoSelect the primary-worktree-only union of project files and backlog. Mutually exclusive with project_files and backlog; requires scope_reason.
resourcesNo
repositoryYes
root_task_idYes
scope_reasonNoBounded coordination-only reason required for tree, project_files, and all_files ownership.
project_filesNoSelect project files excluding backlog. Mutually exclusive with backlog and all_files; requires scope_reason. Eligible isolation is placed at the canonical primary-worktree .worktrees/<claim-id> path with backlog omitted by sparse checkout.
worktree_pathNo
allow_recoveryNo
parent_claim_idNo
compat_file_directoriesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
exit_codeYes
Behavior4/5

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

With no annotations provided, the description carries the full burden and does substantial work: it discloses atomicity, selector exclusivity, worktree isolation rules, dirty-checkout recovery outcomes, and legacy_outcome behavior. It omits authorization requirements and precise semantics of 'exclusive resources,' but the level of disclosure is well above minimal.

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 a dense but compact paragraph, front-loaded with a clear one-sentence summary followed by necessary constraints and outcome details. Each sentence adds information, though the long outcome-code enumeration could be formatted as a list for easier scanning.

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

Completeness2/5

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

Given 18 parameters, no annotations, and complex isolation semantics, the description is insufficient for reliable invocation. It fails to explain most parameter semantics, does not provide decision guidance for choosing acquisition modes, and leaves the agent with significant inference burden despite the output schema.

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

Parameters2/5

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

Schema description coverage is only 22%, and the description adds meaning for selectors like backlog, project_files, all_files, and scope_reason. However, required parameters including repository, claim_id, agent, task, and root_task_id are left unexplained, as are optional parameters like worktree_path, resources, parent_claim_id, and allow_recovery—requiring agents to infer meaning from names alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence uses a specific verb ('acquire') and names the resource ('one file domain plus optional exclusive resources'), clearly distinguishing it from sibling claim_status, claim_extend, and claim_release tools. However, 'file domain' is undefined jargon, and the initial purpose statement leans on later text for clarification.

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

Usage Guidelines3/5

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

The description provides constraints on selector usage (mutual exclusivity, scope_reason required, primary-worktree-only), which implies when certain modes are appropriate. It does not explicitly state when to use claim_acquire versus alternatives like claim_extend or claim_status, nor does it name exclusions.

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/martinbechard/mcp-agent-ops'

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