Skip to main content
Glama

Refresh AI session heartbeat

ai_session_heartbeat
Idempotent

Refreshes one AI Session while the AI is still actively working but has no computer tool call to make. Use the ai_session_id/workflow_id returned by start_ai_session.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ai_session_id": "<ai_session_id>"
    },
    "name": "ai_session_heartbeat"
  }
}

Input Schema

NameRequiredDescriptionDefault
workflow_idNo
ai_session_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds the important context that this is a liveness-keepalive during idle gaps, but it omits what happens if a heartbeat is missed (does the session expire or get reaped?) and any cadence expectation, which is the behavior an agent most needs here.

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?

Two short sentences with the trigger condition front-loaded and no filler. The second sentence's slash construction "ai_session_id/workflow_id" is slightly ambiguous about whether both are needed, a minor wording cost.

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

Completeness3/5

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

An output schema and annotations are present, so return values and safety do not need describing. Still, for a lifecycle-management tool in a large multi-agent toolset, the missing heartbeat cadence and expiry consequences leave an agent without enough to use it correctly over a long session.

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 0%, so the description must carry the parameter burden; it partially does by naming both ai_session_id and workflow_id and tying them to start_ai_session. It never explains the relationship between the two — only ai_session_id is required, and the role of the optional workflow_id is left unstated.

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 ("Refreshes") and resource ("one AI Session") and adds the precise situational trigger. It is clearly distinguishable from start_ai_session, end_ai_session and get_ai_session_status, though it never names a sibling explicitly for contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete condition for use — the AI is actively working but has no computer tool call to make — and tells the agent where the identifiers come from (start_ai_session). It does not state when NOT to call it, e.g. that polling with get_ai_session_status is the alternative for reading state rather than refreshing liveness.

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