Skip to main content
Glama

claim_task

Claim a task for exclusive processing. Without a task ID, it picks the highest-priority unclaimed task; with a task ID, it claims that specific task. The claim is a lease you can extend, release, or complete.

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
labelsNoOnly claim tasks carrying all of these labels (queue claim only)
task_idNoClaim this specific task instead of the next from the queue
project_idNoOnly claim tasks in this project (queue claim only)
lease_secondsNoLease duration in seconds (30-3600, default 300)
Behavior5/5

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

Despite no annotations, description fully discloses behavioral traits: work-queue semantics, atomic claim, lease duration (default 300s), conflict scenarios, and that it's hosted API only.

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?

Every sentence earns its place; efficiently organized with core function, modes, failures, lifecycle, and hosting note. No fluff.

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?

With no output schema, description mentions return value (claimed task or empty queue). Complete coverage of 4 parameters and all behaviors.

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

Parameters5/5

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

Schema coverage 100%, but description adds significant context: labels and project_id only for queue claim, task_id usage scenarios (list_tasks or after write rejection), lease_seconds range and default.

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?

Uses specific verb 'Claim a task for exclusive processing' and clearly identifies two modes: queue claim (without task_id) and specific claim (with task_id). Distinguishes from siblings by mentioning related tools like list_tasks, complete_task, etc.

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 each mode, failure conditions (conflict if completed/ assigned/ live lease), and lifecycle actions (heartbeat_task, release_task, complete_task). Provides clear alternative tools.

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