Skip to main content
Glama

Forkit

claim_task

Atomically claim a pending task for an agent. Race-condition-safe — only one agent wins when two claim the same task simultaneously.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "task_id": "<task_id>",
      "agent_id": "<agent_id>"
    },
    "name": "claim_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
task_idYesID of the task to claim
agent_idYesIdentifier for the claiming agent (e.g. "claude-code" or a UUID)
enforce_assigneeNoWhen true, rejects the claim if the task assignee does not match agent_id. Defaults to false.

Output Schema

NameRequiredDescriptionDefault
idYesTask ID
statusYesNew status after claiming (in_progress)
claimed_byYesAgent identifier that claimed the task

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare openWorldHint=false, idempotentHint=false and destructiveHint=false, so the safety profile is partly covered. The description adds the genuinely useful, non-annotated trait of atomicity/race safety — only one agent wins a simultaneous claim. It stops short of describing what the loser of the race receives, whether the task becomes assigned on success, or whether a retry is appropriate, which is a meaningful gap for a non-idempotent mutation.

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?

Two tight sentences with no filler: the action is front-loaded and the atomicity guarantee is the second beat. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and annotations cover the safety hints. However, for a non-idempotent claim operation the definition omits the failure path (task already taken) and any permission or assignment prerequisites, leaving the agent to discover contention behavior at call time.

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%, so task_id, agent_id and enforce_assignee are already documented in the schema, including the default and rejection behavior of enforce_assignee. The description adds nothing beyond that and does not mention the assignee enforcement option at all. Baseline 3 applies when the schema carries the parameter semantics.

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: 'Atomically claim a pending task for an agent.' An agent can tell this apart from wait_for_task or ready_tasks by the word 'claim' and the requirement of task_id + agent_id. It does not, however, explicitly name which sibling to use instead when the intent is simply to wait or list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the tool applies to pending tasks the caller wants to take ownership of, and the race-condition sentence signals it is the right choice under concurrent contention. There is no explicit when-not guidance (e.g. if the task is already assigned to you, or if you only want to observe progress) and no alternative routing to sibling tools.

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