Skip to main content
Glama

hub_presence

Check live agent presence across mesh nodes, including which node observed each heartbeat and snapshot coverage, so an unreported role is not mistaken for a dead one.

Instructions

The fleet roster as far as it can honestly be seen from here: this node's live registry plus every other node's published snapshot (presence..json, one small file per node, refreshed on heartbeat and on any tool call there, at most every 5 minutes). Each row carries observedOn — WHICH node saw that heartbeat — and alsoOn when one agent name turns up on several. Read coverage before believing any absence: it lists every current mesh member with the age of its snapshot, or null when it has published none, and blindTo/note say so outright. That distinction is the reason this tool exists in this shape — one role read as 383 minutes since heartbeat on one node and 5.9 days on another, nothing was stale and nothing had diverged, the registries were simply of different machines, and an orchestrator escalated "worker is dead" four times over 92 hours while the worker worked. A role nobody reports is invisible, which is NOT the same as dead.

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": "hub_presence"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoonly agents whose heartbeat cwd is this directory or under it — "who is in this checkout"
fullNoreturn everything, uncapped. By default long lists are trimmed (and, where the description says so, long texts cut) to fit an agent context, and what was left out is reported in `truncated`.
roleNofilter to agents heartbeating under this role
projectNoonly agents whose heartbeat cwd resolves to this project (marker, sync path or folder name)
aliveOnlyNodrop stale (TTL-expired) records, default false
memberDaysNoa node counts as a mesh member if it wrote within N days, default 30 — retired node names drop out of `coverage` on their own

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.9.88
    • changedInput schema / properties / full / description
      Previous value: -"return everything, uncapped. By default long lists are trimmed to fit an agent context and what was left out is reported in `truncated`."New value: +"return everything, uncapped. By default long lists are trimmed (and, where the description says so, long texts cut) to fit an agent context, and what was left out is reported in `truncated`."
  2. Changed2 schema fields changedv0.9.15
    • addedInput schema / properties / cwd
      Added value: +{
      +  "description": "only agents whose heartbeat cwd is this directory or under it — \"who is in this checkout\"",
      +  "type": "string"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "only agents whose heartbeat cwd resolves to this project (marker, sync path or folder name)",
      +  "type": "string"
      +}
  3. Changed1 schema field changedv0.9.14
    • addedInput schema / properties / memberDays
      Added value: +{
      +  "description": "a node counts as a mesh member if it wrote within N days, default 30 — retired node names drop out of `coverage` on their own",
      +  "type": "integer"
      +}
  4. Changed1 schema field changedv0.9.0
    • addedInput schema / properties / full
      Added value: +{
      +  "description": "return everything, uncapped. By default long lists are trimmed to fit an agent context and what was left out is reported in `truncated`.",
      +  "type": "boolean"
      +}
  5. Addedv0.5.0

TDQS

A3.8/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: it discloses the snapshot file mechanism, the refresh cadence (heartbeat and any tool call, at most every 5 minutes), per-node snapshot age in `coverage`, null for nodes that have published nothing, `blindTo`/`note` caveats, and default truncation reported via `truncated`. It also explicitly warns about the central failure mode — an unreported role being invisible rather than dead — which is exactly the behavioral context an agent needs.

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

Conciseness3/5

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

The purpose is front-loaded, but the body is dense narrative prose with a multi-clause 92-hour escalation anecdote. The anecdote does justify the `coverage`/`blindTo` design and warns against misreading absence, yet the same point is already made in the final sentence, so some of the length is not strictly earning its place.

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?

There is no output schema, and the description compensates well by explaining the row fields (`observedOn`, `alsoOn`), the `coverage` list contents with snapshot ages, and truncation reporting. For a 6-parameter, cross-node tool this is close to complete; only a fuller enumeration of row contents (e.g. role, cwd, status) is left implicit.

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%, so the schema already defines all six parameters; the description mostly reinforces them (default trimming and the `truncated` escape hatch tied to `full`, the membership notion behind `memberDays`). It adds little parameter-level meaning beyond syntax, so the baseline of 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?

"The fleet roster as far as it can honestly be seen from here: this node's live registry plus every other node's published snapshot" states a specific resource and scope, and the mention of `observedOn`/`alsoOn` makes clear what each entry represents. It is unambiguous what the tool returns, though it never contrasts itself with likely-adjacent siblings such as hub_heartbeat or other listing tools.

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 rather than stated: "Read `coverage` before believing any absence" tells the agent how to interpret results, and the escalation anecdote implies the tool is for verifying whether a role is truly gone. There is no explicit when-to-use / when-not-to-use rule and no named alternative for writing or claiming a heartbeat.

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