Skip to main content
Glama

webcam_stream

Destructive

Start, stop, or check a local relay that re-serves one printer camera feed as a shared MJPEG stream for multiple print-monitor viewers, with status reporting and camera-address checks.

Instructions

Control the local live-video relay for the print monitor.

ONE connection to the printer's camera, re-served as an MJPEG stream on
this machine so every viewer shares it.  Reads an HTTP MJPEG webcam
(OctoPrint, Moonraker, a camera you registered) or a Bambu A1 / P1
camera's own port-6000 feed.  The reply's ``capability`` says whether
this printer can be relayed and, when not, why — an X1 / P2S / H2
camera streams RTSPS, which the relay does not carry (snapshots still
work).  ``stream`` carries the frame's age and the measured frame rate:
``live`` is false when the picture may be frozen.

Local-only: the relay reads the camera over your LAN and serves on
loopback, so on the hosted server it says so instead of starting.
Snapshots (``printer_snapshot``, ``monitor_print``) are unchanged.

A refused start on a printer type that has a camera check carries
``check_available: true``; ``action="check"`` then looks at what that
printer's likely camera addresses actually serve.

Args:
    printer_name: Target printer.  Omit for the default printer.
    action: One of ``"start"``, ``"stop"``, ``"status"``, or
        ``"check"``.  ``"check"`` runs only when asked: it tries each
        address this printer type's camera is known to answer on, on
        the printer's own host, with one GET each (a printer that gives
        out its camera address on request is asked for it first, as a
        start does), and replies with
        ``checks`` (what each served — a live stream, a still, a WebRTC
        page, a web page, an error, or nothing — and where the address
        comes from), a ``summary`` and a ``next_step``.  It registers
        nothing; when it finds a live stream, ``next_step`` says how to
        register that address as the printer's camera.  Local-only,
        like ``"start"``.
    port: Local port for the stream server (default 8081).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "webcam_stream"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoLocal port for the stream server (default 8081). Default: 8081.
actionNoOne of ``"start"``, ``"stop"``, ``"status"``, or ``"check"``. ``"check"`` runs only when asked: it tries each address this printer type's camera is known to answer on, on the printer's own host, with one GET each (a printer that gives out its camera address on request is asked for it first, as a start does), and replies with ``checks`` (what each served — a live stream, a still, a WebRTC page, a web page, an error, or nothing — and where the address comes from), a ``summary`` and a ``next_step``. It registers nothing; when it finds a live stream, ``next_step`` says how to register that address as the printer's camera. Local-only, like ``"start"``. Default: "status".
printer_nameNoTarget printer. Omit for the default printer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.5.1
    • changedInput schema / properties / action / description
      Previous value: -"Default: \"status\"."New value: +"One of ``\"start\"``, ``\"stop\"``, ``\"status\"``, or ``\"check\"``.  ``\"check\"`` runs only when asked: it tries each address this printer type's camera is known to answer on, on the printer's own host, with one GET each (a printer that gives out its camera address on request is asked for it first, as a start does), and replies with ``checks`` (what each served — a live stream, a still, a WebRTC page, a web page, an error, or nothing — and where the address comes from), a ``summary`` and a ``next_step``.  It registers nothing; when it finds a live stream, ``next_step`` says how to register that address as the printer's camera.  Local-only, like ``\"start\"``. Default: \"status\"."
    • changedInput schema / properties / port / description
      Previous value: -"Default: 8081."New value: +"Local port for the stream server (default 8081). Default: 8081."
    • addedInput schema / properties / printer_name / description
      Added value: +"Target printer.  Omit for the default printer."
  2. Changed5 schema fields changedv1.5.0
    • removedInput schema / properties / action / default
      Removed value: -"status"
    • addedInput schema / properties / action / description
      Added value: +"Default: \"status\"."
    • removedInput schema / properties / port / default
      Removed value: -8081
    • addedInput schema / properties / port / description
      Added value: +"Default: 8081."
    • removedInput schema / properties / printer_name / default
      Removed value: -null
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=false, but the description adds substantial unstated context: the relay is local-only and bound to loopback, it refuses on the hosted server, and the reply exposes 'capability' (with a reason when relay is impossible) plus 'stream' with frame age and measured frame rate where live=false signals a frozen picture. It never directly explains what the destructive hint covers (presumably tearing down a running relay), which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The prose is front-loaded and organized (capability behavior, then locality constraint, then args), but it is long and duplicates the schema's action description word for word. Details such as the parenthetical about asking the printer for its camera address on start and the parenthetical about the X1/P2S/H2 RTSPS caveat could be tightened without losing meaning.

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?

There is no output schema, yet the description documents the meaningful return fields an agent must interpret: capability, stream.live/frame age/frame rate, check_available, and the checks/summary/next_step structure of the check action. That is close to complete for a three-parameter tool; only error shapes and what 'port' changes at runtime are left implicit.

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 coverage is 100%, and the description's per-argument text is essentially a verbatim copy of the schema's own parameter descriptions, including the full 'check' explanation and the 'omit for default printer' note. It adds no meaning beyond the schema, so the baseline 3 for a fully documented schema is the correct ceiling.

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 opening line names a specific verb and resource ('Control the local live-video relay'), and the follow-up explains the architecture precisely: one connection to the printer's camera re-served as an MJPEG stream shared by all viewers. It also names the concrete feed types it consumes (OctoPrint, Moonraker, registered camera, Bambu A1/P1 port-6000) and explicitly distinguishes itself from printer_snapshot and monitor_print, which it says are unchanged.

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?

It gives real routing guidance: RTSPS cameras (X1/P2S/H2) cannot be relayed so snapshots should be used instead, hosted-server deployments get a refusal rather than a start, and 'check' runs only when explicitly asked. What's missing is direct guidance on choosing between 'start'/'stop'/'status' in a live-print workflow, and no mention of vision-oriented siblings like watch_print or monitor_print_vision.

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

Deploy Server

Other Tools