Skip to main content
Glama

heartbeat_host

Idempotent

Refresh a host lock's liveness signal to prevent it from going stale mid-task, and update the phase as work progresses.

Instructions

Refresh your lock's heartbeat so it doesn't go stale mid-task. Heartbeating the SAME phase does not clear stuck-ness (that is the point); report a new phase as your work moves on.

Input Schema

NameRequiredDescriptionDefault
noteNoFree text for the dashboard
ownerYesWho is asking: workstream/session id, e.g. 'ws/occluder-wire', 'p-1a2b3c4d', 'coord-session'
phaseNoNew phase; pass the same value to keep it, a new one to reset the clock
host_idYesHost id from list_hosts, e.g. 'build-pc'

Output Schema

NameRequiredDescriptionDefault
noteNofree text from the owner, e.g. the current step
freshYesheartbeat within ttl (False = stale, can be taken over)
ownerYes
phaseNowhat the owner is doing ('', 'compile', 'test', ...); '' = not reported
stuckNofresh heartbeat but the phase has not moved past the server's threshold (liveness != progress)
age_secYesseconds since the last heartbeat
host_idYes
ttl_secYes
acquired_atYes
phase_sinceNowhen the current phase started (NULL when no phase)
heartbeat_atYes
stuck_reasonNowhy the server marked this lock stuck
phase_age_secNoseconds since the phase was last changed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so safety/idempotency is covered structurally. The description adds real value by disclosing that re-heartbeating the same phase intentionally does not clear stuck-ness and that a new phase resets the clock, but says nothing about lock expiry windows or failure behavior.

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?

Two short sentences with the purpose front-loaded and the phase caveat immediately after. Some residual indentation/backtick formatting is slightly noisy but nothing is wasted.

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?

With annotations covering idempotency and an output schema handling return values, the description covers the operational essentials an agent needs. Only lock-expiry timing and error conditions are left unaddressed.

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 owner, host_id and note are fully documented. The description's discussion of the phase parameter largely restates the schema's own note ('pass the same value to keep it, a new one to reset the clock'), adding only the stuck-ness framing, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Refresh your lock's heartbeat') and its goal ('so it doesn't go stale mid-task'), which distinguishes it from claim_host/release_host siblings. It doesn't explicitly name those siblings, which prevents a 5.

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?

Gives clear context for when to call (mid-task, to avoid a stale lock) and a concrete caveat about re-heartbeating the same phase versus reporting a new one. It stops short of explicitly naming alternatives like claim_host or release_host for lock lifecycle changes.

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