Skip to main content
Glama

tasks_claim

Atomically claim a task for a session, moving it to in_progress with a renewable lease. Prevents duplicate work; refused claims name the cause (already claimed, blocked, gated, or closed).

Instructions

Atomically claim a task for the current session, moving it to in_progress with a lease: 900 seconds unless lease_seconds sets another, at most 14400 seconds (4 hours). While its lease is live a claim keeps its session live: the idle reaper does not end a session that holds one, however long its work goes quiet. A refused claim names its cause: held by another live claim ('task already claimed'), waiting on unfinished dependencies ('task blocked', naming the blockers -- finish those first), waiting on people ('task gated': a task of kind gate is never claimed, and a step whose own gate is open waits until it is cleared), or already done/dropped ('task closed'). Re-claiming a task you already hold refreshes (heartbeats) the lease; a task whose lease has expired can be reclaimed, and a session that loses a claim that way, or by the owner's release, is told once, in its next Seamless tool result or prompt. Release it with tasks_release or by closing it (tasks_update done/dropped); session_end releases all of a session's claims.

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": {
      "id": "<id>"
    },
    "name": "tasks_claim"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYestask id to claim
sessionNothe acting agent's session: the cc/<id> or cx/<id> on your briefing's 'Seam session' line, another session name, or a session ULID. Defaults to this connection's session -- bound automatically for Claude Code and Codex agents -- then a sole active ambient. Pass it when a call reports the agent as ambiguous: the bare call then fails rather than guesses.
session_idNothe acting agent's session ULID; takes precedence over session and the bound session
lease_secondsNolease duration in seconds before the claim lapses and the task becomes reclaimable (default 900, at most 14400)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.1
    • changedInput schema / properties / lease_seconds / description
      Previous value: -"lease duration in seconds before the claim lapses and the task becomes reclaimable (default 900)"New value: +"lease duration in seconds before the claim lapses and the task becomes reclaimable (default 900, at most 14400)"
  2. Changed1 schema field changedv0.7.4
    • changedInput schema / properties / session / description
      Previous value: -"the acting agent's session: the cc/<id> or cx/<id> on your briefing's 'Seam session' line, or a session name. Defaults to the connection's bound session, then a sole active ambient. Pass it whenever you have not run session_start and several agents are active -- the bare call is then ambiguous and fails rather than guesses."New value: +"the acting agent's session: the cc/<id> or cx/<id> on your briefing's 'Seam session' line, another session name, or a session ULID. Defaults to this connection's session -- bound automatically for Claude Code and Codex agents -- then a sole active ambient. Pass it when a call reports the agent as ambiguous: the bare call then fails rather than guesses."
  3. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses lease duration semantics, that a live claim prevents the idle reaper from ending the session, the exact refusal message strings and their causes, heartbeat-on-reclaim behavior, and that a lost claim is reported once in the next tool result. The annotations only say non-read-only, non-destructive, non-idempotent, so this detail is the description's own contribution.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the action and its effect in the first clause, then layers refusal causes and release paths. It is dense and one long paragraph; the enumerated refusal causes are useful but borderline verbose, and splitting the release guidance into its own sentence would improve scanability.

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?

Covers the full behavior surface for a 4-parameter mutating tool with no output schema: state transition, lease, concurrency outcomes, and cleanup. The one gap is what a successful claim returns to the caller, which matters since no output schema exists to answer that.

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 id, session, session_id, and lease_seconds are already documented. The description restates the lease default of 900s and the 14400s ceiling that the schema already gives, and does not add new meaning such as how lease_seconds interacts with an existing claim held by the same session.

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 plus its effect: 'Atomically claim a task for the current session, moving it to in_progress with a lease.' The claim/release/close lifecycle description makes it clearly distinct from tasks_release and tasks_update, which are named in context.

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?

Explains when to claim (to work a task under a lease), when a claim is refused and for which causes, and how to undo it via tasks_release, tasks_update done/dropped, or session_end. It never states why one would claim rather than directly flipping status with tasks_update, so the alternative path is only implied.

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