Skip to main content
Glama

claim_task

Claim an unowned task or renew an expired lease atomically, using the observed lease generation to win races and prevent conflicting work in multi-agent coordination.

Instructions

Atomically take the lease on a TASK. Succeeds only if the task is unowned, its lease expired, or the caller already owns it. Pass the lease_generation you observed; a stale one loses the race.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes
binding_tokenNoOpaque token returned by this agent's join_session or plan_session. Required for reliable identity when logical agents share an MCP connection.
lease_secondsNoLease length; clamped to [60, 7200].
lease_generationNoGeneration you observed. Omit to claim against the current one.

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?

With no annotations provided, the description carries the full disclosure burden. It conveys atomicity, the conditional success outcomes, and the handling of a stale lease. This goes beyond a simple 'claims' statement and gives the agent actionable behavioral details, though it does not mention error messages or side effects like lease duration behavior.

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 tightly written sentences; every phrase packs information. The core action, success conditions, and parameter guidance are front-loaded with no redundancy or filler.

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 small suite of 4 parameters and no return schema, the description covers the essential behavior and the key failure race. It does omit prerequisites (e.g., identity binding) and the response payload, but the tool's complexity is low, so these gaps are minor.

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 75%, so the schema already describes binding_token, lease_seconds, and lease_generation. The description adds value to lease_generation by explaining the race condition ('a stale one loses the race'), but it does not clarify task_id or the other parameters further. This is a modest complement to the schema.

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?

Description states a specific action 'atomically take the lease on a TASK' and defines success conditions, making it distinct from claim_resource (resource vs. task), renew_lease, and release_task. The ambiguity is resolved directly by naming 'TASK' and the ownership semantics.

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?

The description implies when to use the tool (when a task is unowned or lease expired) but does not explicitly contrast it with sibling tools like renew_lease or release_task. It provides clear usage context for the success conditions, yet lacks explicit 'instead of X' guidance.

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