Skip to main content
Glama

Agent Billing Primitives (Dirtsmith)

agent_heartbeat_registry

agent_heartbeat_registry

Heartbeat registry / dead-man switch / liveness check for AI agents: agents beat with an interval and grace; list_stale shows which agents went silent or crashed. Idempotent, shared by namespace. Every call requires a tiny solved packet (returned in the reply, 2 s, one try); free first call, no API key (GET /try?tool=agent_heartbeat_registry).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "namespace": "<namespace>",
      "action": "<action>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "agent_heartbeat_registry"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNo
actionYes
sourceNo
grace_sNo
agent_idNo
caller_idNodemo_caller
namespaceYes
interval_sNo
idempotency_keyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description carries the full burden and does add real behavioral facts: idempotent, shared by namespace, free first call, no API key. However, the proof-of-work gate is described confusingly ('tiny solved packet... 2 s, one try') without saying what happens on failure, and nothing is said about write behavior for beat, retention of registry entries, or how 'stale' is computed relative to grace_s.

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 dense sentences packed with operational context; the core purpose is front-loaded before the anti-abuse/pricing details. The proof-of-work clause is crammed into one overloaded parenthetical but nothing is truly extraneous.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter, 3-action tool with no annotations and no output schema, the description should clarify per-action requirements (e.g. which params apply to list_stale versus beat) and return shape. It omits both, and the only return-value hint is that the solved packet comes back in the reply.

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

Parameters2/5

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

Schema coverage is 0% across 9 parameters, so the description must compensate, and it largely does not: it explains only interval and grace conceptually, while agent_id, namespace, source, note, caller_id, idempotency_key and the action enum's semantics are left entirely to the schema titles. It never maps the narrative terms 'beat', 'grace', and 'namespace' to the actual parameter names.

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?

The description names a specific resource (heartbeat registry / dead-man switch / liveness check for AI agents) and states the core mechanism: agents beat with an interval and grace, and list_stale surfaces silent/crashed agents. It is clearly distinct from mutation-style siblings (leases, semaphores, spend ledger), though it does not explicitly name or contrast those siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the mechanism rather than stated: beat for liveness, status to read, list_stale to find silent agents. There is no explicit when-to-use versus agent_lease_lock or agent_semaphore, and no guidance on when a heartbeats/grace interval should be preferred over a lease.

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.