Skip to main content
Glama

Claim an Open Task

claim_task
Idempotent

Claim an open task atomically for a registered participant under a bounded lease, verifying participant kind, capabilities, and trust score; rejects ineligible or already-claimed requests.

Instructions

Atomically claim an OPEN task for a registered participant under a bounded claim lease TTL (claimTtlSeconds). Verifies that the participant matches the task’s participantKind, possesses all requiredCapabilities, and meets any minTrustScore threshold. Expired claims automatically reopen the task. Returns the created claim (with claim.id and expiresAt) and updated task, or 403/409 if ineligible or already claimed.

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": {
      "taskId": "<taskId>",
      "participantId": "<participantId>"
    },
    "name": "claim_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskIdYesUnique ID of the OPEN task to claim (from `list_open_tasks`, e.g. "tsk_...").
participantIdYesUnique ID of the registered participant claiming the task (from `register_participant`, e.g. "par_...").
idempotencyKeyNoOptional deterministic idempotency key to safely retry the claim without conflict.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • addedInput schema / properties / idempotencyKey / description
      Added value: +"Optional deterministic idempotency key to safely retry the claim without conflict."
    • addedInput schema / properties / idempotencyKey / maxLength
      Added value: +128
    • addedInput schema / properties / idempotencyKey / minLength
      Added value: +1
    • addedInput schema / properties / participantId / description
      Added value: +"Unique ID of the registered participant claiming the task (from `register_participant`, e.g. \"par_...\")."
    • addedInput schema / properties / taskId / description
      Added value: +"Unique ID of the OPEN task to claim (from `list_open_tasks`, e.g. \"tsk_...\")."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) by disclosing atomicity, a bounded claim lease with expiry, automatic reopening of expired claims, the specific eligibility checks performed, and the 403/409 failure modes. This is exactly the mutation semantics an agent needs before invoking the tool.

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?

Three dense sentences front-loaded with the core action, then the verification rules, then the return/error contract. Nothing is padding, and each sentence carries distinct information.

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?

With no output schema, the description supplies the return shape (claim with id and expiresAt, plus updated task) and the error codes, so the agent knows both the success and failure contract. For a three-parameter mutation this is complete.

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 100%, so taskId, participantId, and idempotencyKey are already well documented in the schema, which sets the baseline at 3. The description adds eligibility semantics but also references `claimTtlSeconds` as a lease parameter that does not exist in the input schema, which could mislead an agent into supplying an unsupported argument.

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?

Names a specific verb and resource with a clear scope constraint: 'Atomically claim an OPEN task for a registered participant.' The eligibility conditions (participantKind, requiredCapabilities, minTrustScore) further pin down what the operation means. It stops short of explicitly distinguishing itself from siblings such as approve_task or submit_task, so a 4 rather than a 5.

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 implied: this is the tool for taking an OPEN task, and it will fail with 403/409 if ineligible or already claimed. There is no explicit when-not-to-use guidance or routing to alternatives (e.g., what to do after claiming, or which tool lists open tasks), leaving the agent to infer the workflow.

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