Skip to main content
Glama

claim_next_task

Atomically reserves the highest-priority pending task on a plan for a given role, returning a claim token or no-work signal so agents can start new work safely.

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

NameRequiredDescriptionDefault
RoleNo
PlanIdYes
as_agentNo
TtlOverrideNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations declare non-read-only, non-idempotent, non-destructive, but the description adds genuinely new behavior: the operation is atomic, it returns { task, claim_token } or no_work_available, and it has the side effect of assigning the bound Project V2 card to the calling actor's GitHub user. The claim TTL/expiry behavior implied by TtlOverride is left unexplained.

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 sentences, front-loaded with the action and selection rule, followed by validity constraint, return contract, usage trigger, and side effect. No filler and each sentence adds information an agent needs.

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 mutating claim tool with no output schema, the description supplies the return contract, atomicity, and the GitHub card side effect — more than most. Gaps remain around claim lifetime/TTL semantics and the enumerated valid roles per plan_type, which matter for correct invocation.

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 coverage is 0%, so the description must carry parameter meaning. It does well for Role ('must be valid for the plan's plan_type', with examples) and implies PlanId's role, but as_agent and TtlOverride — two of four parameters — are never explained, leaving their semantics undocumented anywhere.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('claim the highest-priority pending task on a plan') plus the selection rule, which separates it from claim_specific_task without naming that sibling. The role/plan_type coupling is also concrete. It stops short of explicitly naming the neighboring claim tools, so an agent must infer the boundary.

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 clear positive trigger, implicitly contrasting with picking a specific task. No explicit when-not-to-use or pointer to claim_specific_task, so it is clear context without exclusions.

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