Configuration
- Name and description — as with any tool; the description tells the model when to emit.
- Payload schema — a JSON Schema for the arguments. This is the contract: the model’s payload is validated against it, and consumers can rely on the shape.
What you get back
- On the run —
emittedon the run response: an ordered list of{ tool, payload }for every accepted emit. This is the authoritative record. The completion webhook carries only the run id and status, so fetch the run to reademitted. - On the stream — a
dataevent per emit as it happens, carrying the same{ tool, payload }. The browser SDK maintains these asruns[runId].data, so a chat renders cards the moment the model produces them.
Validation
PromptJuggler validates every payload against the schema before accepting it, and caps it at 64 KB. A payload that doesn’t conform (or is too large) is rejected back to the model as a tool error it can correct on the next turn — so the data your callers receive is always valid and bounded. Only accepted emits appear inemitted and on the stream; a rejected-then-retried call surfaces only the accepted retry.
Emit tools need API access, so they are available on all paid plans. See the chatbot guide for an end-to-end example.