Skip to main content
Glama

MCPFax Agent Continuity

Dead-man switch

heartbeat
Idempotent

AN AGENT CANNOT DETECT ITS OWN DEATH — from the inside, 'I stopped' and 'I am about to do the next step' are the same thing. Only something outside the process can tell them apart. Each call records a beat and arms a durable alarm for expect_within_seconds. Beat again in time and the alarm simply re-arms. Miss it and the expiry actions run EXACTLY ONCE: release_leases (the same release path a live agent uses), queue_alert (one envelope into a mailbox address you nominate), mark_failed (so resume_packet reports the death as an OBSERVED fact, not a self-report). FREE — it is a write. The alert is billed only when it is collected, by the existing inbox_poll first-delivery rule; there is no second charge. FREE — this tool never charges. Authenticate with Authorization: Bearer , or pass agent_key as an argument if your host cannot set headers. Equivalent HTTP route: POST /v1/heartbeat.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeYesThe unit of work whose liveness this tracks. Namespace-scoped, and the scope resume_packet will report the death against. Example: 'permit-review-2026-08'.
disarmNoStop the switch instead of beating. Use this when the work finishes, or a completed job raises a false alarm. Default false. Example: 'false'.
agent_idNoOptional label for the beating instance, carried in the alert so a human can tell which worker died. <=64 chars. Example: 'worker-3'.
agent_keyNoYour agent_secret, if your MCP host cannot set the Authorization header. Prefer the header.
on_expiryNoWhich actions run if the next beat is late: any of 'release_leases', 'queue_alert', 'mark_failed'. Default ['mark_failed']. They always run in the order release_leases, mark_failed, queue_alert so the alert can report what was released. NOTE that release_leases can only reach leases taken with a `scope` — it reports its own blind spot rather than returning a silent empty list. Example: '["release_leases","queue_alert"]'.
notify_addressNoREQUIRED with 'queue_alert'. A registered address, 'agent:<id>' or 'agent:<id>/<box>'. WRITE-ONLY: we queue an envelope into it and never read it, exactly like send(). Example: 'agent:7k2p.../alerts'.
expect_within_secondsYesBeat again within this many seconds or the switch fires. Min 2, max 2592000 (30 days). Example: '300'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / agent_key / examples
      Added value: +[
      +  "the agent_secret that register returned"
      +]
  2. Changed6 schema fields changed
    • addedInput schema / properties / agent_id / examples
      Added value: +[
      +  "worker-3"
      +]
    • addedInput schema / properties / disarm / examples
      Added value: +[
      +  "false"
      +]
    • addedInput schema / properties / expect_within_seconds / examples
      Added value: +[
      +  300
      +]
    • addedInput schema / properties / notify_address / examples
      Added value: +[
      +  "agent:7k2p.../alerts"
      +]
    • addedInput schema / properties / on_expiry / examples
      Added value: +[
      +  "[\"release_leases\",\"queue_alert\"]"
      +]
    • addedInput schema / properties / scope / examples
      Added value: +[
      +  "permit-review-2026-08"
      +]
  3. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond annotations, it discloses critical behavior: expiry actions run EXACTLY ONCE, release_leases uses the same path as a live agent, mark_failed makes resume_packet report an observed death, and the alert is biled only on collection. It also clarifies authentication options. No contradiction with the idempotentHint annotation, since re-beating simply re-arms the same alarm.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a long, ALL-CAPS-heavy block with the core mechanism appearing only after two philosophical sentences. It repeats the 'FREE' point and is not front-loaded; a compact action-oriented opening would serve an agent better.

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?

It covers auth, costing, expiry side effects, re-arm behavior, and the durability of the alarm. With no output schema, it does not describe the return value shape, which is a minor gap, but overall the tool is well specified enough to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already covers all 7 parameters at 100%, so the baseline is 3. The description adds useful semantic color around on_expiry action ordering and the agent_key fallback, though much of the detail is also present in 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 explicitly says each call records a beat and arms a durable alarm for expect_within_seconds, which is a specific verb, resource, and mechanism. The dead-man-switch metaphor and scope semantics make it clearly distinct from liveness-adjacent sibling tools like lease_rene or checkpoint_put.

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?

It gives a strong use-case rationale: an agent cannot detect its own death, so an external heartbeat is needed. It explains re-arming and expiry behavior, which implies when to call repeatedly, but it does not explicitly name alternative tools or state when not to use it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources