Skip to main content
Glama

report_liveness

Restamp your agent's PID and process start-time (metadata-only) so the relay can probe liveness without rotating the session or re-registering.

Instructions

Restamp your own liveness anchor (agent_pid + process start-time) — a narrow, metadata-only presence self-report.

When to use: your hooks call this automatically (SessionStart + PostToolUse) so the relay can positively probe whether your process is alive. An old/existing session that registered before the anchor mechanism becomes probe-able without a full re-register — critical because register_agent rotates your session_id and can re-surface already-read mail, whereas this touches ONLY agent_pid + start-time (+ fills host_id when unset). You rarely call it by hand.

Behavior: updates agent_pid + agent_pid_start (and host_id if NULL) for your row. Does NOT rotate session_id, bump last_seen, or touch your read cursor. Idempotent — restamping the same values is a no-op. Auth: own agent token only.

Returns: { success: true, agent_name, agent_pid, note }.

Errors: NOT_FOUND (unknown agent_name), AUTH_FAILED, INVALID_INPUT, RATE_LIMITED.

Input Schema

NameRequiredDescriptionDefault
agent_pidYesThe agent CLI's own OS process id (from the hook's ancestry walk)
agent_nameYesYour agent name (must match your token)
agent_tokenNoYour agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header.
agent_pid_startNoThe process start-time token (TZ=UTC LC_ALL=C `ps -o lstart=`, plus the suffix ` UTC`), or null if unreadable — PID-liveness only in that case

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / agent_pid_start / description
      Previous value: -"The process start-time token (LC_ALL=C `ps -o lstart=`), or null if unreadable — PID-liveness only in that case"New value: +"The process start-time token (TZ=UTC LC_ALL=C `ps -o lstart=`, plus the suffix ` UTC`), or null if unreadable — PID-liveness only in that case"
  2. First observed

TDQS

A4.9/5.0
Behavior5/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 so thoroughly: it enumerates exactly what is mutated (agent_pid, agent_pid_start, host_id if NULL) and what is deliberately untouched (session_id, last_seen, read cursor). It also declares idempotency, auth scope ('own agent token only'), the return shape, and the error codes.

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?

Organized into clearly labeled 'When to use', 'Behavior', 'Returns', and 'Errors' blocks with the scoping statement front-loaded. Despite its length, every section carries information an agent needs for correct invocation, so nothing is padding.

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

Completeness5/5

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

For a 4-param mutation tool with no annotations and no output schema, the description supplies the missing safety profile (narrow scope, idempotency, token requirement), the return shape, and the full error set. Nothing an agent needs to call it correctly is absent.

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?

Schema coverage is 100%, so each parameter is already well documented, setting a baseline of 3. The description adds value beyond the schema by disclosing conditional behavior (host_id is filled only when NULL) and idempotency semantics for the restamp inputs, lifting it above baseline.

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?

States a specific verb and resource: 'Restamp your own liveness anchor (agent_pid + process start-time)' and characterizes it as a 'narrow, metadata-only presence self-report.' It explicitly distinguishes itself from register_agent, so an agent can tell them apart without opening either schema.

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?

Provides an explicit 'When to use' section: hooks call it automatically (SessionStart + PostToolUse), and it explains why an old session should use this instead of re-registering. It names the alternative (register_agent) and the concrete downside it avoids (session_id rotation, re-surfacing read mail), plus 'You rarely call it by hand.'

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