Skip to main content
Glama

Capture a Live Stream

capture_stream
Read-onlyIdempotent

Watch a live Cycle stream for a few seconds and return what arrived, plus the temporary credentials so the user can keep watching with their own websocket client. Targets:

  • instance_console (environment + container [+ instance]): the container's live console output — crash messages and startup errors as they happen.

  • server_console (server): the host's agent console output.

  • instance_telemetry (environment + container [+ instance]): live per-second JSON resource snapshots for one instance.

  • server_telemetry (server): live JSON stats for a server.

Use this when snapshot data is not enough: logs come back empty, telemetry lags (snapshots can trail by ~10 minutes), or the problem is happening right now. An empty capture is a valid observation — it means the stream was quiet for the window.

Streams replay recently buffered output when you connect, so a capture is NOT all fresh: frames arriving in roughly the first second are counted as replayed BACKLOG (backlog_bytes) and may predate the capture by a long time; only what arrives after that counts as live output (live_bytes). Console captures insert a marker line between the two; telemetry frames carry [T+offset] arrival prefixes. backlog_bytes>0 with live_bytes=0 means nothing new happened while watching — never treat replayed backlog as proof of what the process is doing right now. A large capture is trimmed to the most recent ~16KB and flagged truncated (with total_bytes = the untrimmed size).

The returned token is short-lived, observation-only, and expires on its own; there is no revoke step. Read-only: nothing can be sent to the stream through this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serverNoServer hostname, nickname, or ID. Required for server targets.
targetYesWhich live stream to capture.
contextNoWhy are you calling this tool? Briefly describe the user's goal.
instanceNoInstance id or hostname. Optional when the container has a single instance.
containerNoContainer. Required for instance targets.
environmentNoEnvironment. Helps resolve the container for instance targets.
conversation_idNoConversation tracking id. Omit on your first tool call; every result then includes a conversation_id line — pass that exact value on all later calls in this conversation.
duration_secondsNoHow long to capture, 1-30 seconds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover readOnly/idempotent/destructive/openWorld, and the description adds substantial non-obvious behavior: backlog replay on connect, the backlog_bytes vs live_bytes distinction, marker lines and [T+offset] prefixes, ~16KB trimming with a truncated flag and total_bytes, and the short-lived observation-only token with no revoke step. The read-only claim is consistent with readOnlyHint=true.

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 core action is front-loaded, then targets are bulleted, then behavioral caveats — a sensible structure. It is dense but nearly every sentence carries a distinct behavioral fact; it is on the long side for a single tool, which keeps it just under the top score.

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?

With no output schema, the description carries the return-value burden and does so thoroughly: it explains backlog_bytes/live_bytes, truncated, total_bytes, and the returned token. Combined with the target semantics and replay warnings, an agent has everything needed to call and interpret this tool correctly.

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 description coverage is 100%, so the baseline is 3, but the description adds real meaning by mapping each target enum value to the parameters it requires (container/environment/instance for instance targets, server for server targets). That pairing is not derivable from the terse schema descriptions alone.

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 opens with a specific verb+resource+scope ('Watch a live Cycle stream for a few seconds and return what arrived, plus the temporary credentials') and enumerates all four targets with their required scope (environment + container [+ instance] vs server). This lets an agent distinguish it from siblings like get_logs, get_telemetry, and query_metrics without opening any schema.

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?

It states exactly when to reach for this tool ('snapshot data is not enough: logs come back empty, telemetry lags (snapshots can trail by ~10 minutes), or the problem is happening right now'), effectively contrasting it with the snapshot-based siblings. It also clarifies that an empty capture is a valid observation, removing the main ambiguity an agent would face when choosing between this and get_logs/get_telemetry.

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