Every time a Paperclip agent executes, it creates a heartbeat run — a discrete execution record that captures the run’s status, timing, and a structured stream of events. Heartbeat runs are the primary unit of observability: when something goes wrong with an agent, you start by listing its runs to find a failed one, then drill into the event stream or raw log to trace exactly what happened. The environment variableDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/bruhsb/paperclip-mcp/llms.txt
Use this file to discover all available pages before exploring further.
PAPERCLIP_RUN_ID is injected into the agent’s context at execution time, so every mutation the agent makes — issue updates, approvals, comment posts — is automatically tagged to the current run, making causal tracing straightforward.
paperclip_list_heartbeat_runs
List heartbeat runs for the company, optionally filtered by agent.Company UUID, e.g.
"53caad5d-05d6-469d-b6eb-8961a71b615e".Filter runs to a specific agent UUID. Omit to list runs across all agents in the company.
Max runs per page (1–100, default 50).
Number of runs to skip for pagination (default 0).
Output format.
markdown (default) returns human-readable text; json returns a structured object.{ items: HeartbeatRun[], total, count, offset, limit, has_more, next_offset }. Each item contains id, agentId, status, startedAt, finishedAt.
Use when: Auditing recent agent execution runs or diagnosing agent heartbeat failures.
Don’t use when: You need the raw event stream for a specific run — use paperclip_list_run_events instead.
Errors:
401— Authentication failed → checkPAPERCLIP_API_KEY.403— Permission denied → this is a board-only endpoint; ensure you’re using a board API key.
paperclip_list_run_events
Stream structured events for a heartbeat run using a cursor-basedafterSeq approach.
Heartbeat run UUID to inspect, e.g.
"run_xyz789".Return only events with
seq > afterSeq. Use this as a cursor to resume streaming from where you left off. Defaults to 0 (start of run).Max events to return in one call (default 100). This is cursor-based, not page-based — there is no
offset.Output format.
markdown (default) or json.seq, type, data, createdAt. Use the highest seq from the returned batch as afterSeq in the next call to advance the cursor.
Use when: Streaming execution events for a live or recently completed heartbeat run.
Don’t use when: You need raw log bytes — use paperclip_get_run_log with offset/limitBytes instead.
Errors:
401— Authentication failed → checkPAPERCLIP_API_KEY.403— Permission denied → board-only endpoint; ensure you’re using a board API key.404— Run not found → verifyrunIdwithpaperclip_list_heartbeat_runs.
"afterSeq": 3.
paperclip_get_run_log
Read raw log bytes for a heartbeat run using a byte-offset cursor.Heartbeat run UUID whose log to retrieve, e.g.
"run_xyz789".Byte offset into the log to start reading from (default
0). Use nextOffset from the previous response to advance.Maximum bytes to return per call (default
16384 = 16 KiB).Output format.
markdown (default) or json.{ content: string, nextOffset: number, totalBytes: number }. Pass nextOffset as offset in the next call to read the following slice.
Use when: Reading raw execution log output for a heartbeat run — useful when the structured event stream lacks the detail you need.
Don’t use when: You need structured events — use paperclip_list_run_events with the afterSeq cursor instead.
Log reads are not paginated in the traditional sense — they use a byte-offset cursor. Each call returns at most
limitBytes bytes starting at offset. When nextOffset === totalBytes, you’ve reached the end of the log.401— Authentication failed → checkPAPERCLIP_API_KEY.403— Permission denied → board-only endpoint; ensure you’re using a board API key.404— Run not found → verifyrunIdwithpaperclip_list_heartbeat_runs.
nextOffset === totalBytes, so the full log has been read in one slice.
Debugging workflow
Use the three run tools together to trace an agent failure from first principles:Find the failing run
Call
paperclip_list_heartbeat_runs filtered by agentId. Look for runs with status: "failed" and note the id.Stream the event sequence
Call
paperclip_list_run_events with the failed runId and afterSeq: 0. Scan for type: "error" events to identify the failure point and sequence number.