Skip to main content
Glama

heartbeat_task

Extend your claim on a task to prevent reclamation while working, and optionally report session state for visibility.

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)
Behavior4/5

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

Describes extension, state reporting, and failure mode (409) well. Missing annotations means description carries full burden; it does not explicitly mention idempotency or side effects, but the behavior is sufficiently disclosed for an agent.

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?

Two sentences cover main action, usage, optional behavior, and error handling. Efficiently front-loaded with no redundancy.

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 usage, error handling, and state reporting. No output schema, so return value is unspecified, but the core functionality is well-explained. Distinguishes from related tools.

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 baseline 3. Description adds minimal beyond schema: clarifies lease_seconds purpose and ties state/detail to session reporting, but does not significantly enhance parameter meaning.

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?

Clearly states the tool extends a task lease (verb+resource) and distinguishes from siblings like claim_task, release_task, and complete_task by focusing on lease renewal.

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 advises calling periodically before lease_expires_at, optionally reporting state, and how to handle 409 errors ('claim a task again'), providing clear when-to-use and when-not-to-use guidance.

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