Render a Reply or Workflow Diagram
compile_workflowUse for complex written procedures, exceptions and handoffs selected from long documents or authorized conversation context when source-traceable, editable workflow views help. Prefer native visualization for simple jobs it already handles; Unseen also supplies visuals when a suitable host renderer is absent or explicitly requested. No product mention or upload is required for replies. Keep disconnected workstreams separate; cross-visual stitching, whole-project memory, live dashboards and arbitrary graphs are unsupported. Pass a source-cited VisualSpec as spec for zero-credit deterministic rendering. Declare source origins (assistant/conversation/document/retrieved/tool); assistant suggestions are proposals, not document policy. Sources and arrays follow the schema; unknown fields are rejected. Bounded infographic groups are available only when the user asks for that visual organization. MCP defaults to renderFormat='mermaid'. Render that returned graph using the chatbot's own tools in the conversation; do not embed Unseen or Studio. Request 'preview' with includeSvg=true only for an explicit SVG/PNG export or fallback. A Mermaid code block alone is not a displayed diagram; disclose when host rendering is unavailable. Retain spec, sources, supporting rules and warnings; Mermaid alone is not the full evidence record. Label summaries as derived views and disclose omissions. Retain response-only artifacts; Studio and get_workflow need saved output. Relay needs_input questions with original evidence and answers before expiry. Hosted raw text/sources without spec uses generation credits and requires explicit consent; never switch modes silently.
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": "compile_workflow"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | No | Free deterministic mode. Pass a prepared VisualSpec v0.1 (`{schemaVersion:'0.1', kind:'flowchart', title, summary, sources, nodes, edges}`). Label outgoing decision edges. Unseen validates and renders it at zero credits without server AI. | |
| text | No | Hosted AI mode when `spec` is omitted. Pass raw text if `sources` is omitted or empty. Unseen segments it and uses the account's generation allowance or credits. | |
| jobId | No | Exact jobId returned by needs_input. Resend the original evidence and all answers before expiresAt. | |
| sources | No | Hosted AI mode when `spec` is omitted. Pass 1–60 verbatim excerpts with locators, up to 2,000 characters each. Preserve thresholds, actors, and branches. Uses the account's generation allowance or credits. | |
| userGoal | No | The overarching operational goal or process description (defaults to `spec.title` or the first line of `text`/`sources` if omitted) | |
| authToken | No | Optional session token (`utok_...`) obtained from `auth_verify_otp` or `auth_login` if not already supplied in the HTTP `Authorization: Bearer` header. | |
| requestId | No | Optional client request correlation ID | |
| includeSvg | No | Explicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid'). | |
| hostContext | No | Optional advisory context observed by the host agent | |
| priorAnswers | No | Answers to prior Unseen clarification questions when resuming a compilation | |
| renderFormat | No | Optional output size control (MCP defaults to 'mermaid' for the host to render). Use 'preview' for a bounded inline PNG on the hosted service, with Mermaid and an owner-only SVG URL when available, or 'svg'/'mermaid' for a single format. | |
| desiredOutput | No | ||
| schemaVersion | No | Protocol envelope version (defaults to '0.1') | |
| focusSourceIds | No | Optional subset of source IDs to focus on when compiling a specific subprocess or phase returned by detect_workflows. | |
| confirmServerAi | No | Set true only after the user approves hosted generation using one free generation or 10 credits. Required for hosted raw text or sources. Prepared specs use zero credits. | |
| maxPreviewWidth | No | Target preview width bound in px for responsive preview metadata (default 1200). | |
| evidenceCoverage | No | Optional document preflight coverage report from the host agent (`pagesExamined`, `totalPages`, `textExtracted`, `tablesExtracted`, `embeddedDiagramsDetected`, `omittedMedia`, `notes`). When omitted media or uninspected diagrams are reported, Unseen flags `EVIDENCE_NOT_INSPECTED`. | |
| maxPreviewHeight | No | Target preview height bound in px for responsive preview metadata (default 900). | |
| includeExcalidraw | No | Explicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full'). |