Skip to main content
Glama

Claim the next available task

pull_next_task

Atomically claim the next task waiting for this worker — work assigned to it by name first (status 'assigned', with or without a role), then unclaimed queued work matching its roles. Returns the leased task; call get_task next for the full context bundle before starting work. API reference: https://tango.applayer.io/docs/api/tools/pull_next_task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
worker_idNoOptional. Defaults to the worker bound to this MCP connection (one worker per harness).
lease_secondsNoLease duration in seconds (default 2700 = 45 min, max 14400 = 4 h).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only tell the agent this is not read-only and not destructive; the description adds real value by disclosing the claim is atomic and that the result is leased rather than permanently owned. It stops short of explaining what happens when no task is available or what occurs at lease expiry, which are the two behaviors an agent most needs to know.

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 sentences, front-loaded with the action and the selection algorithm, then the required follow-up and a documentation link. No filler, and each sentence adds a distinct piece of information.

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?

With no output schema, the description correctly compensates by naming the return value ('the leased task') and routing the agent to get_task. The notable omission is the no-work-available case and whether the lease can be extended via the renew_lease sibling, which matters for a polling loop.

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 description coverage is 100%, so the baseline is 3, but the description adds semantics the schema does not: worker_id determines the identity used for name-based assignment and role-matched queue lookup, and the returned task is leased under the semantics common to both parameters.

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?

States a specific verb and resource ('Atomically claim the next task') and goes further by spelling out the selection order: assigned-by-name work first (with or without a role), then unclaimed queued work matching the worker's roles. That detail distinguishes it from the sibling claim_task, which is presumably id-targeted.

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?

Clear context for when to call it (this is the pull-based worker loop) and an explicit next step: 'call get_task next for the full context bundle before starting work.' It does not, however, explicitly contrast itself with claim_task or list_my_tasks, so the agent must infer the boundary from sibling names alone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources