Skip to main content
Glama

Claim next task

claim_next_task

Claim the next priority todo task and set it to in-progress, prioritizing root tasks before their children. Optional type, user, or tag filters narrow the pool; preview with dryRun.

Instructions

Claim the highest-priority todo task and set it to in-progress: the returned object IS the claimed task. Roots first: a todo ROOT is claimed before any child — the root is the unit of work, so work through its children after claiming it. When no todo root is claimable, falls back to the highest-priority matching todo child of live work (parent chain todo/in-progress/review) and says so explicitly (a CHILD_CLAIM notice naming the parent); children of backlog/done parents are refused, never sliced off. Optional type/user/tag filters narrow the pool (tags every-match); pass dryRun to preview the claim without moving the task. An empty board — or a valid filter matching nothing — is a SUCCESS with a null result, the same as 'vibeflow tasks --next --json' reporting task:null with exit 0. Use it to pull the next unit of work; use list_tasks to browse without claiming, and get_task to inspect a task you already hold.

Input Schema

NameRequiredDescriptionDefault
tagNoOnly claim a task carrying every listed tag (AND). Omit for no tag filter.
typeNoOnly claim a task of this type. Omit to claim across all types.
userNoOnly claim a task assigned to this user (matched against the task author). Omit to claim anyone's work.
dryRunNoPreview only: name the task that WOULD be claimed without moving it to in-progress.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.22.0
    • addedInput schema / properties / dryRun / description
      Added value: +"Preview only: name the task that WOULD be claimed without moving it to in-progress."
    • addedInput schema / properties / tag / description
      Added value: +"Only claim a task carrying every listed tag (AND). Omit for no tag filter."
    • addedInput schema / properties / type / description
      Added value: +"Only claim a task of this type. Omit to claim across all types."
    • addedInput schema / properties / user / description
      Added value: +"Only claim a task assigned to this user (matched against the task author). Omit to claim anyone's work."
  2. Changed1 schema field changedv0.21.1
    • addedInput schema / additionalProperties
      Added value: +false
  3. First observedv0.20.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag it as a non-readonly, non-destructive, non-idempotent mutation; the description adds substantial context beyond that: the root-before-child ordering rule, the fallback behavior and its explicit notice, the refusal of orphaned children, and the empty-board-is-success-with-null semantics. No contradiction with readOnlyHint=false since it genuinely mutates state.

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 return-value guarantee, and most sentences carry distinct information (root-first, fallback, refusals, dryRun). It runs long and repeats the filter idea already in the schema, but nothing is wasted enough to penalize heavily.

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?

No output schema exists, and the description compensates by explaining the return semantics (the object is the task; empty/filtered-out yields null success equivalently to the CLI with exit 0). Combined with the ordering and fallback rules, an agent has enough to invoke it correctly.

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 description coverage is 100% and all four parameters (tag AND-matching, type enum, user, dryRun preview) are already documented in the schema. The description adds only light framing (filters 'narrow the pool') without new syntax or format detail, so the baseline 3 applies.

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 (claim) and resource (highest-priority todo task) and the resulting state change (set to in-progress), plus clarifies the returned object IS the claimed task. It also explicitly differentiates itself from siblings by naming list_tasks for browsing and get_task for inspecting an already-held task.

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?

Explicit when-to-use (pull the next unit of work) and when-to-use alternatives (list_tasks to browse without claiming, get_task to inspect a held task). It also spells out the root-first preference, the child fallback condition with CHILD_CLAIM notice, and the refusal of children under backlog/done parents.

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