Skip to main content
Glama

heartbeat_task

Extend the lease on a claimed task to prevent reassignment by other agents. Report session state (working, waiting, errored) to communicate progress or delays during long operations.

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
task_idYesThe claimed task ID
lease_secondsNoNew lease duration in seconds from now (30-3600, default 300)
stateNoSession state to report alongside the heartbeat
detailNoFree-text detail for the state (max 500 chars, e.g. 'waiting for API key'). Requires state.
Behavior5/5

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

With no annotations, the description fully discloses behavioral traits: it extends the lease, can optionally report session state (working, waiting_input, errored), and fails with a specific HTTP 409 if the claim is lost. It also notes 'Hosted API only,' indicating an environment constraint. No contradictions.

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?

The description is four sentences, front-loaded with the primary action, then usage timing, error handling, and a hosting constraint. Every sentence serves a purpose with no redundancy. It is as concise as possible while covering all necessary guidance.

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 tool with 4 parameters and no output schema, the description covers the main purpose, when and how to call, optional state reporting, error cases, and hosting restriction. It does not describe the return value, but that is often unimportant for a heartbeat tool. The description is complete enough for an AI agent to select and invoke the tool correctly.

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%, with each parameter already having clear descriptions (e.g., lease_seconds: min/max, default; detail: maxLength, requires state). The description adds context about why the state is useful ('so humans and orchestrators can see why the claim is held') and that detail requires state, but this is already implied by the schema. The description adds marginal value beyond 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?

The description clearly states the specific action: 'Extend the lease on a task you have claimed.' It uses a specific verb (extend lease) and resource (task), and distinguishes from sibling tools like claim_task, release_task, and complete_task by explicitly noting it is for prolonging an existing claim.

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?

The description provides explicit when-to-use guidance: 'Call this periodically (before lease_expires_at) while working on a long task.' It also tells when-not-to-use: 'Fails with 409 if you no longer hold an active claim — in that case, claim a task again rather than continuing.' This clearly differentiates it from claiming a new task.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/delega-dev/delega-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server