Skip to main content
Glama
songzhifei512

multi-agent-bridge

task_heartbeat

Keep long-running tasks alive by sending a heartbeat and appending milestone notes to the progress log, preventing premature termination. Requires the current attempt ID to avoid late overrides.

Instructions

心跳 worker/主控里程碑汇报:给一个 running 任务刷 last_heartbeat_at + heartbeat_n,并把 note 追加进 progress_log(里程碑)。注意:服务端已对每个 run_* 子进程自动心跳(进程活着就跳,无需调用),本工具供能调 MCP 的主控/worker 在生产阶段主动上报里程碑(如『方案已出,等决策』),或手动续活一个进程仍活着但长期无 stdout 的长任务。需持当前 attempt_id(claim 签发;旧/伪造令牌拒绝),防迟到覆盖。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo里程碑说明,追加到 progress_log
task_idYes
attempt_idNo当前能力令牌(claim 签发);交接后被撤权者用旧令牌被拒

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that the tool mutates state (refreshes heartbeat fields, appends a note), requires a current claim-issued attempt_id, rejects old/forged tokens, and prevents late overwrites. These are meaningful behavioral details beyond a generic 'heartbeat' label.

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?

The description is dense but not bloated: each of the three sentences contributes purpose, usage boundaries, or token/race semantics. It is front-loaded with the core actionasia. Minor structure improvements could be made but no sentence 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?

Given no output schema and no annotations, the description covers the essential selection and invocation information: what it does, when to call it, required attempt_id auth, and side effects. It does not describe return values or error behavior for non-running tasks, but for a mutation-style heartbeat tool the provided context is sufficient for safe use.

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 67%, with note and attempt_id already described in the schema. The description adds value by explaining attempt_id as a claim-issued capability token that is rejected if stale or forged, and by clarifying note is a milestone appended to progress_log. task_id has no schema description, but the tool description implies it identifies the running task, so this is mostly compensated.

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 states a specific verb and resource: heartbeating a running task by refreshing last_heartbeat_at and heartbeat_n, and appending the note to progress_log. It clearly differentiates this from the server's automatic run_* subprocess heartbeat, and the mention of milestone reporting separates it from other task_* siblings.

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?

The description explicitly says when to use the tool: for active milestone reporting by a master/worker, or to manually keep alive a long task with no stdout. It also explicitly says when not to use it: the server already auto-heartbeats running run_* processes. This is clear context and an explicit exclusion, leaving no ambiguity.

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