Skip to main content
Glama

Add a heartbeat

add_heartbeat

Create a heartbeat for a job the user runs (cron job, backup script, scheduled task, CI job). Returns its ping URL: the job requests it when it succeeds (e.g. your-job && curl -fsS -m 10 --retry 3 <pingUrl>), and <pingUrl>/fail to report a failure (a POST body is kept with the ping). No ping within period + grace, or a failure, alerts the user at once; a new heartbeat waits for its first ping and never alerts before it. Adds the site's Heartbeats monitor with the first one. Plan limits per account: Free 2, Pro 20, Business 100, Agency 500.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tzNoThe cron expression's IANA time zone, e.g. Europe/Bucharest (default UTC)
cronNoInstead of a period: the job's cron expression (five fields, e.g. "0 3 * * *" or "*/15 * * * 1-5"; @daily, @hourly … work too). A ping is then due by each time it fires plus the grace
nameYesWhat the job is, e.g. "Nightly backup"
siteIdYesThe site's id
graceSecNoHow late a ping may be before it counts as missed, in seconds (60 to 604800 = 7 days; default 3600)
periodSecNoHow often the job runs, in seconds (60 to 2678400 = 31 days; default 86400 = daily). Ignored when `cron` is set

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the return value is a ping URL, the success/failure ping mechanics (including the curl example and /fail endpoint), the exact alerting rule (no ping within period + grace, or a failure, alerts immediately; a new heartbeat waits for its first ping), and per-plan creation limits. This is exactly the kind of context annotations cannot carry.

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?

A single dense paragraph that is front-loaded with the core purpose and return value. The failure-endpoint and plan-limit details are long but earn their place; the embedded curl example is the most expendable element.

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 creation tool with no output schema, it supplies the missing return value (ping URL), the alerting semantics, the side effect of adding a Heartbeats monitor, and the account limits. 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.

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 documents tz, cron, graceSec, periodSec, name, and siteId fully. The description reinforces period + grace behavior but adds no syntax or format detail beyond the schema, 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?

States a specific verb and resource ('Create a heartbeat for a job the user runs') and explains what a heartbeat is with concrete examples (cron job, backup script, CI job). The create verb implicitly separates it from list_heartbeats/update_heartbeat, but no sibling is named explicitly, so it stays at 4 rather than 5.

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 framing 'for a job the user runs,' but the description never states when to prefer this over update_heartbeat or list_heartbeats, nor any when-not condition. It explains the feature well but leaves tool selection to inference.

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.

Resources