Skip to main content
Glama

Compile Workflow Diagram

compile_workflow

Converts supplied document evidence or raw operational text into source-referenced workflow diagrams with clean SVG, Mermaid, Excalidraw, and Studio deep links.

Instructions

Turn supplied document evidence or raw operational text into a publication-ready workflow diagram with source references, clean vector SVG, Mermaid, Excalidraw scene, and interactive Studio deep link (studioUrl). HOW TO STRUCTURE TEXT INPUTS: Either pass sources (array of 1..60 verbatim chunks {id, locator, excerpt} where each excerpt is <= 2000 chars with exact numbers/actors/thresholds preserved) OR pass raw text and Unseen will automatically segment it into source chunks. EDITING GUIDANCE: For cosmetic/styling/annotation edits, edit the returned <svg> XML directly. For structural/topological edits (adding/removing nodes or rerouting branches), edit spec (VisualSpec JSON) and call autofix_workflow ($0 deterministic connector healing + fresh SVG/Mermaid/Excalidraw) or revise_workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoOptional raw document or user text. If provided when `sources` is omitted or empty, Unseen automatically segments `text` into faithful `sources[]` chunks.
jobIdNoOptional job ID when resuming a workflow after clarification
sourcesYesArray of faithful source excerpts with locators from the input document (1..60 chunks, <=2000 chars each). Preserve exact thresholds, actors, and IF/ELSE branches.
userGoalYesThe overarching operational goal or process description (e.g. 'Driver Onboarding SOP' or 'Vendor Risk Assessment')
authTokenNoOptional session token (`utok_...`) obtained from `auth_verify_otp` or `auth_login` if not already supplied in the HTTP `Authorization: Bearer` header.
requestIdNoOptional client request correlation ID
hostContextNoOptional advisory context observed by the host agent
priorAnswersNoAnswers to prior Unseen clarification questions when resuming a compilation
desiredOutputNo
schemaVersionYesProtocol envelope version (must be '0.1')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

Score is being calculated.