Skip to main content
Glama
t-rhex

mcp-obsidian-vault

by t-rhex

claim_task

Atomically assign a pending task to an agent, marking it claimed and recording the assignee. Prevents double assignment by rejecting concurrent claims and verifies dependency completion before acceptance.

Instructions

Atomically claim a pending task for an agent. Sets status to 'claimed' and records the assignee. Prevents race conditions — if two agents try to claim the same task, the second gets a clear error. Checks dependency completion before allowing claim.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesThe task ID to claim (e.g. 'task-2026-03-09-abc123').
assigneeYesIdentifier for the agent claiming this task (e.g. 'claude-code-1', 'agent-research').
worktree_pathNoFilesystem path to the worktree directory (e.g. '/repo/.claude/worktrees/feature-auth').
worktree_branchNoGit branch name for this agent's worktree (e.g. 'worktree-feature-auth'). Used to track parallel work across agents.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full disclosure burden and meets it: it reveals atomicity, the concrete mutation (status→claimed, assignee recorded), the concurrency failure mode (second claimer gets a clear error), and a precondition check (dependency completion). This is rich behavioral context well beyond a bare 'claim a task' statement.

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?

Three tightly packed sentences front-load the core action first, then side effects, then failure and precondition behavior. Every sentence earns its place; the only minor redundancy is 'atomically' versus 'prevents race conditions', which is acceptable since the latter adds the concrete error outcome.

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?

For a moderately complex concurrency-safe mutation tool, the description covers preconditions, side effects, and error behavior thoroughly, and the schema documents all parameters. The only gap is the absence of an output schema or any statement about the success response shape, which the description does not address.

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 reinforces the assignee parameter via 'records the assignee' but adds no meaning beyond what the schema already documents for task_id, worktree_path, or worktree_branch. It neither hurts nor materially enhances parameter understanding.

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?

"Atomically claim a pending task for an agent" names a specific verb (claim), a specific resource (pending task), and an actor (agent), with the side effect spelled out (sets status to 'claimed', records assignee). The claim verb clearly differentiates it from lifecycle siblings like create_task, update_task, and complete_task without needing to open their schemas.

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 implies usage — an agent claims a pending task, and the dependency-completion check indicates a precondition. However, it never explicitly names alternatives or exclusions (e.g., use create_task to make a task, complete_task to finish one), so routing among the lifecycle siblings is left to inference.

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