Skip to main content
Glama

claim_task

Claim a task for exclusive processing. Without a task ID, picks the highest-priority claimable task; with a task ID, claims that specific task. Lease duration is configurable.

Instructions

Claim a task for exclusive processing (work-queue semantics). Without task_id, atomically picks the highest-priority claimable task from the queue — open, unclaimed, and unassigned or assigned to you. With task_id, claims that specific task (e.g. one you found via list_tasks, or after a write was rejected with 'claim it first'); fails with a conflict if it is completed, assigned to another agent, or claimed with a live lease. Returns the claimed task, or reports an empty queue. The claim is a lease (default 300 seconds): extend it with heartbeat_task while working, requeue with release_task, or finish with complete_task. Hosted API only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idNoClaim this specific task instead of the next from the queue
project_idNoOnly claim tasks in this project (queue claim only)
labelsNoOnly claim tasks carrying all of these labels (queue claim only)
lease_secondsNoLease duration in seconds (30-3600, default 300)
Behavior4/5

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

Without annotations, the description carries full burden. It discloses the lease default (300s), extension via heartbeat, requeue via release, and completion via complete_task. It also mentions atomic picking and 'Hosted API only' limitation. Some details like rate limits are missing, but overall strong.

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 detailed yet efficient, with front-loaded purpose. Each sentence adds value. Could be slightly more structured (e.g., separating modes), but not verbose.

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 accounts for all parameters, explains return behavior ('Returns the claimed task, or reports an empty queue'), and situates the tool within a work-queue lifecycle. No output schema exists, but the description adequately covers what the agent needs to know.

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 descriptions cover all 4 parameters (100% coverage), so baseline is 3. The description adds value by explaining that project_id and labels apply only to queue claim and that lease_seconds sets the lease duration, enhancing 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 purpose: 'Claim a task for exclusive processing (work-queue semantics)'. It distinguishes two modes (queue claim vs specific task) and references the broader workflow with sibling tools like heartbeat_task, release_task, and complete_task.

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?

The description explains when to use each mode (without task_id for automatic pick, with task_id for specific claim) and failure conditions (completed, assigned elsewhere, live lease). It also references related tools (list_tasks, heartbeat_task) but does not explicitly compare to assign_task.

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/delega-dev/delega-mcp'

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