Skip to main content
Glama

claim_next_task

Atomically claim the highest-priority pending task on a plan for a role, returning a task and claim token or no_work_available. Use when ready to start new work and let the system pick.

Instructions

Atomically claim the highest-priority pending task on a plan for the given role. The role must be valid for the plan's plan_type (e.g. 'developer' for dev plans, 'auditor' for audit). Returns { task, claim_token } on success or no_work_available if nothing is claimable. Use this when the orchestrator or developer is ready to start something new and the system should pick. Assigns the bound Project V2 card to the calling actor's GitHub user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
RoleNo
PlanIdYes
as_agentNo
TtlOverrideNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely succeeds: it discloses the atomic/concurrent-safe claim behavior, the success return shape ({ task, claim_token }), the no_work_available failure mode, and a real side effect (assigning the bound Project V2 card to the calling actor's GitHub user). It omits claim expiry/TTL behavior and what the token must be used for afterward (release_claim, refresh_claim, start_work), which matters in a claiming system.

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?

Four tight sentences, front-loaded with the core action, then the role constraint, then the return contract, then the usage cue and side effect. Every sentence adds information an agent needs to call this correctly; no padding or restatement of the tool name.

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?

There is no output schema and no annotations, and the description covers the return shape, the failure case, and the attribution side effect, which is what an agent needs to select and invoke it. Remaining gaps are the TTL/expiry semantics tied to TtlOverride and the lifecycle of the returned claim_token across the sibling release/refresh/start tools.

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 0%, so the description must compensate. It meaningfully explains Role (must be valid for the plan's plan_type, with examples) and PlanId implicitly, which is genuinely useful. However as_agent and TtlOverride are never mentioned, leaving half the parameters opaque in both schema and description.

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 with explicit selection semantics: "Atomically claim the highest-priority pending task on a plan for the given role." This distinguishes it from the sibling claim_specific_task, since it makes clear the system chooses the task rather than the caller naming one.

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?

"Use this when the orchestrator or developer is ready to start something new and the system should pick" gives a concrete triggering condition. It does not explicitly name claim_specific_task as the alternative for when the caller already knows which task to take, so the routing is implied rather than stated.

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