Skip to main content
Glama

heartbeat_task

Extend the lease on a claimed task before it expires to prevent another agent from reclaiming it. Optionally report session state (working, waiting_input, errored).

Instructions

Extend the lease on a task you have claimed. Call this periodically (before lease_expires_at) while working on a long task so the claim is not reclaimed by another agent. Optionally report a session state at the same time (working / waiting_input / errored) so humans and orchestrators can see why the claim is held. Fails with 409 if you no longer hold an active claim — in that case, claim a task again rather than continuing. Hosted API only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoSession state to report alongside the heartbeat
detailNoFree-text detail for the state (max 500 chars, e.g. 'waiting for API key'). Requires state.
task_idYesThe claimed task ID
lease_secondsNoNew lease duration in seconds from now (30-3600, default 300)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.19.0
    • removedInput schema / properties / task_id / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "number"
      -  }
      -]
    • addedInput schema / properties / task_id / type
      Added value: +[
      +  "string",
      +  "number"
      +]
  2. Addedv1.18.2
  3. Removedv1.13.1
  4. Addedv1.9.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it exposes the reclaim-by-another-agent behavior, the 409 no-longer-holding-claim failure mode, the recovery action, and the hosted-API-only constraint. Auth/permission requirements and the success response shape are not stated, keeping it short of a 5.

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?

Front-loaded with the core action, then timing, then optional state rationale, then the failure path. Three dense sentences with no filler and nothing repeated from the schema.

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?

No output schema exists and no annotations are present, so the description must supply context; it covers timing, the 409 failure, recovery, and the hosted-only constraint. The one gap is what a successful call returns (new lease_expires_at), which an agent would benefit from knowing.

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 the baseline is 3 and the enum values (working/waiting_input/errored) are already in the schema. The description adds the *purpose* of the state field (so humans/orchestrators see why the claim is held), which is useful framing but not new syntax or constraints.

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+resource ('Extend the lease on a task you have claimed') that is unmistakably distinct from siblings like claim_task, release_task, and complete_task. An agent can tell exactly what this does without opening a schema.

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

Usage Guidelines5/5

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

Explicitly says to call it periodically before lease_expires_at while working on a long task, and gives a clear when-not path: on a 409, re-claim rather than continue. The trigger condition and the failure recovery are both named.

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