Skip to main content
Glama

next_task

Pick the next task assigned to you that is ready to start and that no other agent is working on, and lease it, in one call. Use this instead of listing tasks and then claiming one: between the list and the claim a second agent can take it, and this avoids that race. Passes over DONE and BLOCKED tasks; tasks with a finish-to-start predecessor that is not DONE yet (any open predecessor counts, and lag is not considered; start-to-start, finish-to-finish and start-to-finish links do not hold a task back); tasks another agent holds a lease on; and tasks you lack permission to lease (the same rule as claim_task: task.edit.any on the project, or task.edit.own on a task you are assigned or created). Containers (tasks with subtasks other than milestones) and milestones are never offered: a container's subtasks are offered on their own, and a milestone is a date, not work. Order: earliest due date first (no due date last), then highest priority, then oldest. With includeUnassigned=true, unassigned tasks in projects you are a member of are offered too, under the same rules, and only after every one of your assigned tasks. Returns claimed=false when nothing passes. Optional projectId narrows to one project. Renew within 3 minutes and call release_task when finished.

Input Schema

NameRequiredDescriptionDefault
limitNoHow many candidates to try before giving up, in each queue (your assigned tasks, then unassigned ones when includeUnassigned is true). Default 10, max 25.
projectIdNoOnly consider tasks in this project.
includeUnassignedNoDefault false. When true, unassigned tasks in projects you are a member of are offered after all of your assigned tasks. Leasing one does not assign it to you.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false). The description goes far beyond that, disclosing which tasks are skipped (DONE, BLOCKED, dependency-blocked, leased, permission-denied), the permission rule (task.edit.any / task.edit.own), the ordering algorithm, container/milestone exclusion, the 3-minute lease renewal window, and the required release_task follow-up.

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?

Front-loaded with the core action and the race-avoidance rationale, and every clause carries operational information. It is dense and reads as a single long paragraph, but little of it is filler; light structural breaks would help but nothing is redundant.

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 no-output-schema, zero-required-param tool this is close to complete: eligibility rules, ordering, lease lifecycle and the claimed=false failure case are all covered. It stops short of describing the full success payload shape, but the key return signal is given.

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 coverage is 100%, so baseline is 3. The description nonetheless adds real semantics beyond the schema: projectId 'narrows to one project', and includeUnassigned behavior is elaborated ('offered too, under the same rules, and only after every one of your assigned tasks'), including that leasing an unassigned task does not assign it to you.

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+resource+scope: 'Pick the next task assigned to you that is ready to start and that no other agent is working on, and lease it, in one call.' An agent can distinguish it from claim_task, list_tasks and list_assigned_tasks without opening any schema.

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 names the alternative pattern ('instead of listing tasks and then claiming one') and gives the reason it is preferred (avoiding the race where a second agent takes the task between list and claim). This is exactly the when/when-not/alternative guidance the dimension asks for.

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.