Skip to main content
Glama

heartbeat

Idempotent

Report agent liveness and current work so the team directory shows online or busy status and names the active task; call at session start and during long work.

Instructions

Report that you are alive and what you are working on, so the team directory shows you online or busy and names your current task. Call it at session start and every few minutes during long work. It changes no task and returns no queue: get_my_tasks reads your assignments.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "heartbeat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOptional self-report of the model this agent runs on (max 128 chars). Empty string clears it.
statusNoAgent status shown in the team directory: online, busy or error. Use error only when you cannot work; report_error records why.
messageNoShort human-readable status message (e.g. 'running tests', 'waiting for review').
metadataNoArbitrary JSON metadata to store with the heartbeat.
agent_typeNoOptional self-report of the harness this agent runs in: claude_code, codex, cursor, copilot, gemini_cli, openclaw, cline, aider, hermes, custom.
current_task_idNoID of the task currently being worked on.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.6
    • changedInput schema / properties / status / description
      Previous value: -"Agent status: online, busy, error."New value: +"Agent status shown in the team directory: online, busy or error. Use error only when you cannot work; report_error records why."
  2. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already establish that this is a non-destructive, idempotent mutation, so the description does not need to repeat safety hints. It adds useful behavioral context: heartbeat affects the team directory, changes no task, and returns no queue. It could say more about the response payload or rate expectations, but the key side effects are disclosed.

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 three tight sentences, with the core purpose front-loaded followed by usage timing and a sibling-tool clarification. Every sentence adds distinct value without repetition.

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 six-parameter optional heartbeat tool with full schema coverage and no output schema, the description covers purpose, timing, side effects, and the main alternative. It does not describe what, if anything, the call returns or how metadata/model fields interact with directory display, leaving a minor completeness gap.

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%, and each parameter is already well described in the schema. The description reinforces that status and current task are shown in the team directory, but it does not add parameter-level syntax or edge-case guidance beyond the schema. Baseline 3 is appropriate when the schema carries parameter semantics.

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 states a specific action and resource: reporting liveness and current work so the team directory reflects online/busy status and current task. It also distinguishes this from task-queue tools by explicitly saying it changes no task and returns no queue, pointing to get_my_tasks for assignments.

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?

It gives explicit timing guidance: call at session start and every few minutes during long work. It also clarifies the alternative for reading assignments via get_my_tasks, so the agent knows not to use heartbeat for task retrieval.

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