# setBroadcast tool

Lets the user turn the live screen-share broadcast (Go-Live) on or off by voice
or text, e.g. "방송 켜줘 / 화면 보여줘" or "방송 꺼줘". The LLM picks the intent
and calls the tool (no hardcoded phrase matching), so it works in any language.

## Contract

- Input: `{ "action": "start" | "stop" }`.
- The brain cannot drive the Discord broadcast itself (the bot owns it). The
  tool records the directive in request-scoped state
  (`jarvis/reply/turn_state.request_broadcast`); `bridge/server.py` returns it as
  `broadcast_action` in the `/converse` (and `/text`) response, and the bot
  (`voice.ts` -> `index.ts` `onBroadcastAction`) calls `streamer.start/stop`.
- Mode gate: when `cfg.stream_browser` is false (`STREAM_BROWSER=false`)
  broadcasting is disabled — the tool refuses with a spoken explanation and
  records no directive. This is the same capability flag that makes `/stream`
  refuse and forces real-time search to Gemini.

## Principles

- Tool returns raw intent/result; it performs no broadcast itself and makes no
  LLM call.
- Idempotent at the bot edge: `start` is a no-op if already live, `stop` a no-op
  if already off (`streamer.isActive()` guard).
- Fail-safe: a missing/invalid action records nothing; the bot only acts on an
  explicit `"start"`/`"stop"` directive.

See `docs/stream_browser_modes.md` for how this fits the broadcast-coupled
search routing.
