{"name":"unseen-workflow-compiler","description":"Agent-first visual workflow compiler: turn supplied document evidence, raw operational text, or a Host-LLM VisualSpec v0.1 JSON into publication-ready workflow diagrams with verbatim source references, SVG, Mermaid, Excalidraw, and interactive Studio deep links.","version":"1.0.0","protocolVersion":"1.0","url":"https://staging.unseendocs.in","documentationUrl":"https://staging.unseendocs.in/agents","provider":{"organization":"Six Ideas Technology Pvt Limited","url":"https://staging.unseendocs.in"},"supportedInterfaces":[{"url":"https://staging.unseendocs.in/mcp","protocolBinding":"MCP_STREAMABLE_HTTP","protocolVersion":"2025-11-25"},{"url":"https://staging.unseendocs.in/mcp/chatgpt","protocolBinding":"MCP_STREAMABLE_HTTP_OAUTH2","protocolVersion":"2025-11-25"},{"url":"https://staging.unseendocs.in/api/openapi.json","protocolBinding":"OPENAPI_REST","protocolVersion":"3.1.0"}],"skills":[{"id":"compile-workflow","name":"Compile Source-Grounded Workflow Diagram","description":"Compile operational SOPs, policies, raw text, or a Host-LLM VisualSpec v0.1 JSON ($0 credits) into SVG, Mermaid, Excalidraw, and interactive Studio deep links with verbatim source citations.","tags":["flowchart","workflow","sop","diagram","svg","mermaid","excalidraw","mcp"]},{"id":"enhance-workflow","name":"TypeSafe Jev Semantic Audit & Repair","description":"Audit a VisualSpec against its cited source excerpts for missing branches or unsupported claims and apply bounded repairs.","tags":["verification","audit","jev","compliance"]},{"id":"autofix-workflow","name":"Deterministic Connector Autofix ($0 Free)","description":"Heal disjointed edges and re-render orthogonal SVG, Mermaid, and Excalidraw layouts deterministically at $0 cost.","tags":["layout","autofix","svg"]}],"capabilities":{"streaming":true,"pushNotifications":false,"tools":[{"name":"compile_workflow","description":"Turn supplied document evidence, raw operational text, OR a Host-LLM VisualSpec v0.1 JSON (`spec`) into a publication-ready workflow diagram with source references, clean vector SVG, Mermaid, Excalidraw scene, and interactive Studio deep link (`studioUrl`). THREE INPUT MODES: (1) HOST-LLM NATIVE MODE ($0 free, unlimited once signed in, <50ms — ALWAYS PREFER THIS WHEN YOU HAVE A HOST LLM): Construct `spec` (VisualSpec v0.1 JSON: `{schemaVersion:'0.1', kind:'flowchart', title, summary, sources:[{id,locator,excerpt}], nodes:[{id,label,role:'step'|'decision'|'concept',actor?,detail?,sourceIds:[...]}], edges:[{from,to,label?,sourceIds:[...]}]}` where outgoing edges from `decision` nodes MUST have a `label`) using your own LLM and pass `{ spec }`. Unseen deterministically validates citations, heals connectors, and renders SVG/Mermaid/Excalidraw/studioUrl at $0 Unseen credits even when server-AI credits are 0 (returning exact validation errors if anything needs self-correction). (2) RAW TEXT MODE (PAID / USES ALLOWANCE): Passing ONLY `{ text: '...' }` without `spec` uses Unseen's server-side AI pipeline and returns HTTP 402 if free monthly slots/credits are 0 — if that happens, switch to Mode 1 (`{ spec }`) for $0. (3) STRUCTURED SOURCES MODE (PAID / USES ALLOWANCE): Passing ONLY `{ sources: [{id, locator, excerpt}, ...] }` without `spec` uses Unseen's server-side AI pipeline (requires free monthly slot or credits). EDITING GUIDANCE: For cosmetic edits, edit `<svg>` XML directly. For structural edits, edit `spec` JSON and call `compile_workflow({ spec })` or `autofix_workflow({ spec })` ($0 free).","inputSchema":{"type":"object","properties":{"schemaVersion":{"type":"string","enum":["0.1"],"description":"Protocol envelope version (defaults to '0.1')"},"spec":{"type":"object","description":"Optional Host-LLM pre-synthesized VisualSpec v0.1 JSON (`{schemaVersion:'0.1', kind:'flowchart', title, summary, sources, nodes, edges}`). When supplied, Unseen skips server-LLM generation ($0 credits, <50ms) and deterministically validates citations, heals connectors, and compiles SVG + Mermaid + Excalidraw + studioUrl."},"requestId":{"type":"string","description":"Optional client request correlation ID"},"jobId":{"type":"string","description":"Optional job ID when resuming a workflow after clarification"},"userGoal":{"type":"string","description":"The overarching operational goal or process description (defaults to `spec.title` or the first line of `text`/`sources` if omitted)"},"text":{"type":"string","description":"Optional raw document or user text. If provided when `sources` is omitted or empty, Unseen automatically segments `text` into faithful `sources[]` chunks."},"authToken":{"type":"string","description":"Optional session token (`utok_...`) obtained from `auth_verify_otp` or `auth_login` if not already supplied in the HTTP `Authorization: Bearer` header."},"renderFormat":{"type":"string","enum":["full","preview","compact","svg","mermaid"],"description":"Optional output size control (defaults to 'full'). Use 'preview' for compact metadata + svgUrl + mermaid without large inline Excalidraw/SVG blobs, or 'svg'/'mermaid' for a single format."},"includeSvg":{"type":"boolean","description":"Explicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid')."},"includeExcalidraw":{"type":"boolean","description":"Explicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full')."},"maxPreviewWidth":{"type":"number","description":"Target preview width bound in px for responsive preview metadata (default 1200)."},"maxPreviewHeight":{"type":"number","description":"Target preview height bound in px for responsive preview metadata (default 900)."},"desiredOutput":{"type":"object","properties":{"orientation":{"type":"string","enum":["portrait","landscape","choose"],"description":"Desired visual orientation"},"depth":{"type":"string","enum":["macro","detailed","choose"],"description":"Desired workflow abstraction depth"},"granularity":{"type":"string","enum":["overview","subprocess","all"],"description":"Target scope level: 'overview' for parent lifecycle summary (~8-12 steps), 'subprocess' when paired with focusSourceIds, or 'all'."},"swimlane":{"type":"boolean","description":"Optional swimlane layout toggle (defaults to automatic swimlanes when 2+ actor groups exist)"}}},"focusSourceIds":{"type":"array","description":"Optional subset of source IDs to focus on when compiling a specific subprocess or phase returned by detect_workflows.","items":{"type":"string"}},"sources":{"type":"array","description":"Array of faithful source excerpts with locators from the input document (1..60 chunks, <=2000 chars each). Preserve exact thresholds, actors, and IF/ELSE branches.","items":{"type":"object","required":["id","locator","excerpt"],"properties":{"id":{"type":"string","description":"Unique chunk ID (e.g. 's1', 's2')"},"name":{"type":"string","description":"Document or file name"},"locator":{"type":"string","description":"Heading, page, or section locator"},"excerpt":{"type":"string","description":"Faithful document excerpt (do not rewrite)"},"modality":{"type":"string","enum":["text","image","diagram","table"],"description":"Optional evidence modality ('text', 'image', 'diagram', or 'table')."},"confidence":{"type":"string","enum":["verbatim","reviewed","inferred"],"description":"Optional evidence grounding confidence ('verbatim', 'reviewed', or 'inferred')."}}}},"evidenceCoverage":{"type":"object","description":"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`.","properties":{"pagesExamined":{"type":"number"},"totalPages":{"type":"number"},"textExtracted":{"type":"boolean"},"tablesExtracted":{"type":"boolean"},"embeddedDiagramsDetected":{"type":"number"},"omittedMedia":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"}}},"hostContext":{"type":"object","description":"Optional advisory context observed by the host agent","properties":{"actors":{"type":"array","items":{"type":"string"}},"ambiguities":{"type":"array","items":{"type":"string"}},"contradictions":{"type":"array","items":{"type":"string"}},"assumptions":{"type":"array","items":{"type":"string"}},"userContext":{"type":"array","items":{"type":"string"}}}},"priorAnswers":{"type":"array","description":"Answers to prior Unseen clarification questions when resuming a compilation","items":{"type":"object","required":["questionId","answer","source"],"properties":{"questionId":{"type":"string"},"answer":{"description":"User's answer to the clarification question"},"source":{"type":"string","enum":["user","document","host-context"]}}}}}}},{"name":"revise_workflow","description":"Apply explicit node label/role changes or node removal using node IDs, or request connector autofix. For other changes, including new steps or edges, edit the returned spec with confirmed source evidence and call autofix_workflow. Unsupported instructions return an error; this tool does not perform general natural-language rewrites.","inputSchema":{"type":"object","required":["spec","instruction"],"properties":{"spec":{"type":"object","description":"The existing VisualSpec object to revise"},"instruction":{"type":"string","description":"Clear revision instruction (e.g. 'Change node-2 role to decision and label to Finance Approval?', 'Remove orphan node-4', 'Autofix layout connections')"},"additionalSources":{"type":"array","description":"Optional additional source evidence excerpts to support the revision","items":{"type":"object","required":["id","locator","excerpt"],"properties":{"id":{"type":"string","description":"Unique chunk ID"},"locator":{"type":"string","description":"Heading or section locator"},"excerpt":{"type":"string","description":"Faithful document excerpt"}}}},"authToken":{"type":"string","description":"Optional session token (`utok_...`) if not passed via Authorization header."},"renderFormat":{"type":"string","enum":["full","preview","compact","svg","mermaid"],"description":"Optional output size control (defaults to 'full'). Use 'preview' for compact metadata + svgUrl + mermaid without large inline Excalidraw/SVG blobs, or 'svg'/'mermaid' for a single format."},"includeSvg":{"type":"boolean","description":"Explicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid')."},"includeExcalidraw":{"type":"boolean","description":"Explicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full')."},"maxPreviewWidth":{"type":"number","description":"Target preview width bound in px for responsive preview metadata (default 1200)."},"maxPreviewHeight":{"type":"number","description":"Target preview height bound in px for responsive preview metadata (default 900)."}}}},{"name":"autofix_workflow","description":"Deterministic connector healing and full visual re-rendering ($0 compute cost, instant, unlimited). Cleans exact duplicate edges and empty sequence labels, recomputes deterministic orthogonal layout, and returns fresh `spec`, `svg`, `mermaid`, `excalidraw`, and `studioUrl`. Missing steps or branches require source-backed edits to the spec; this tool preserves graph meaning and does not perform semantic verification. Use this tool after making direct structural edits to `VisualSpec` JSON (`nodes` / `edges`), or when a user asks to autofix connectors.","inputSchema":{"type":"object","required":["spec"],"properties":{"spec":{"type":"object","description":"The VisualSpec JSON object to deterministically heal and re-render into SVG, Mermaid, and Excalidraw."},"orientation":{"type":"string","enum":["portrait","landscape","choose"],"description":"Optional layout orientation (defaults to topology auto-orientation)."},"swimlane":{"type":"boolean","description":"Optional swimlane layout toggle (defaults to automatic swimlanes when 2+ actor groups exist)."},"authToken":{"type":"string","description":"Optional session token (`utok_...`) if not passed via Authorization header."},"renderFormat":{"type":"string","enum":["full","preview","compact","svg","mermaid"],"description":"Optional output size control (defaults to 'full'). Use 'preview' for compact metadata + svgUrl + mermaid without large inline Excalidraw/SVG blobs, or 'svg'/'mermaid' for a single format."},"includeSvg":{"type":"boolean","description":"Explicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid')."},"includeExcalidraw":{"type":"boolean","description":"Explicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full')."},"maxPreviewWidth":{"type":"number","description":"Target preview width bound in px for responsive preview metadata (default 1200)."},"maxPreviewHeight":{"type":"number","description":"Target preview height bound in px for responsive preview metadata (default 900)."}}}},{"name":"enhance_workflow","description":"Bundled free semantic verification and repair powered by TypeSafe Jev. Audits the VisualSpec against its cited `sources[]` for unsupported claims, missing decision branches, and role accuracy, applies targeted repair if actionable issues are found, and returns the enhanced `spec`, `svg`, `mermaid`, `excalidraw`, `studioUrl`, and Jev quality metrics.","inputSchema":{"type":"object","required":["spec"],"properties":{"spec":{"type":"object","description":"The current VisualSpec JSON object (including its `sources` array) to audit and enhance."},"visualId":{"type":"string","description":"The `jobId` or `visualId` returned when the workflow was compiled."},"authToken":{"type":"string","description":"Optional session token (`utok_...`) if not passed via Authorization header."},"renderFormat":{"type":"string","enum":["full","preview","compact","svg","mermaid"],"description":"Optional output size control (defaults to 'full'). Use 'preview' for compact metadata + svgUrl + mermaid without large inline Excalidraw/SVG blobs, or 'svg'/'mermaid' for a single format."},"includeSvg":{"type":"boolean","description":"Explicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid')."},"includeExcalidraw":{"type":"boolean","description":"Explicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full')."},"maxPreviewWidth":{"type":"number","description":"Target preview width bound in px for responsive preview metadata (default 1200)."},"maxPreviewHeight":{"type":"number","description":"Target preview height bound in px for responsive preview metadata (default 900)."}}}},{"name":"detect_workflows","description":"Discover distinct operational workflows from multi-section documents or raw text before compiling. Returns candidate workflows (`id`, `title`, `description`, `sourceIds`) audited by TypeSafe Jev.","inputSchema":{"type":"object","properties":{"sources":{"type":"array","description":"Array of source excerpts `{id, locator, excerpt, modality?, confidence?}` from the document.","items":{"type":"object","required":["id","locator","excerpt"],"properties":{"id":{"type":"string","description":"Unique chunk ID (e.g. 's1', 's2')"},"name":{"type":"string","description":"Document or file name"},"locator":{"type":"string","description":"Heading, page, or section locator"},"excerpt":{"type":"string","description":"Faithful document excerpt (do not rewrite)"},"modality":{"type":"string","enum":["text","image","diagram","table"],"description":"Optional evidence modality ('text', 'image', 'diagram', or 'table')."},"confidence":{"type":"string","enum":["verbatim","reviewed","inferred"],"description":"Optional evidence grounding confidence ('verbatim', 'reviewed', or 'inferred')."}}}},"evidenceCoverage":{"type":"object","description":"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`.","properties":{"pagesExamined":{"type":"number"},"totalPages":{"type":"number"},"textExtracted":{"type":"boolean"},"tablesExtracted":{"type":"boolean"},"embeddedDiagramsDetected":{"type":"number"},"omittedMedia":{"type":"array","items":{"type":"string"}},"notes":{"type":"string"}}},"text":{"type":"string","description":"Optional raw document text if `sources` is not pre-segmented."},"granularity":{"type":"string","enum":["overview","subprocess","all"],"description":"Hierarchy detail hint: 'overview' (parent + phases summary), 'subprocess', or 'all' (default)."},"authToken":{"type":"string","description":"Optional session token (`utok_...`) if not passed via Authorization header."}}}},{"name":"get_workflow","description":"Retrieve an existing VisualSpec workflow by jobId or visualId, returning the spec, SVG layout, and Mermaid diagram.","inputSchema":{"type":"object","required":["id"],"properties":{"id":{"type":"string","description":"The jobId or visualId of the workflow to retrieve"},"authToken":{"type":"string","description":"Optional session token (`utok_...`) if not passed via Authorization header."},"renderFormat":{"type":"string","enum":["full","preview","compact","svg","mermaid"],"description":"Optional output size control (defaults to 'full'). Use 'preview' for compact metadata + svgUrl + mermaid without large inline Excalidraw/SVG blobs, or 'svg'/'mermaid' for a single format."},"includeSvg":{"type":"boolean","description":"Explicitly include or omit inline SVG XML (defaults to true for 'full' and 'svg', false for 'preview'/'compact'/'mermaid')."},"includeExcalidraw":{"type":"boolean","description":"Explicitly include or omit inline Excalidraw scene JSON (defaults to true only for 'full')."},"maxPreviewWidth":{"type":"number","description":"Target preview width bound in px for responsive preview metadata (default 1200)."},"maxPreviewHeight":{"type":"number","description":"Target preview height bound in px for responsive preview metadata (default 900)."}}}},{"name":"get_account_status","description":"Check the authenticated user's Unseen credit balance, free monthly server-AI generation allowance, uniform 100-page safety limit per visual (Host-LLM spec compilation uses 0 credits), and 1-click prepaid credit refill link (`https://unseendocs.in/#pricing`). Call this before server-AI compilations or when credits are low.","inputSchema":{"type":"object","properties":{"authToken":{"type":"string","description":"Optional session token (`utok_...`) if not passed via Authorization header."}}}},{"name":"auth_request_otp","description":"Step 1 of Agent & Human Login (Email + OTP): Sends a 6-digit Login OTP (`UNSEEN_LOGIN_OTP`) to the user's email address. This is a passwordless Login OTP (NOT a password reset). Once called, the agent can either read the 6-digit `UNSEEN_LOGIN_OTP` directly from the user's email (when the user has granted email access) or ask the user in chat for the 6-digit code, then call `auth_verify_otp`.","inputSchema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"The user's email address to receive the 6-digit Login OTP."}}}},{"name":"auth_verify_otp","description":"Step 2 of Agent & Human Login (Email + OTP): Verifies the 6-digit Login OTP sent to `email` and returns `{ token: 'utok_...', user }` (30 free credits / 3 visuals per month on new accounts). Pass the returned `token` as `Authorization: Bearer <token>` or in the `authToken` argument of subsequent MCP tool calls.","inputSchema":{"type":"object","required":["email","otp"],"properties":{"email":{"type":"string","description":"The user's email address."},"otp":{"type":"string","description":"The 6-digit Login OTP read from the user's email (`UNSEEN_LOGIN_OTP`) or supplied by the user."}}}},{"name":"auth_login","description":"Legacy sign-in for an existing password account. Account creation and password setup require verified browser sign-in. ChatGPT/Codex plugin connections use browser OAuth instead of this tool.","inputSchema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","description":"The user's email address."},"password":{"type":"string","description":"Account password (min 8 characters)."},"register":{"type":"boolean","description":"Deprecated. Registration through this tool is rejected; use verified browser sign-in."},"name":{"type":"string","description":"Optional display name when registering."}}}},{"name":"send_feedback","description":"Report a bug, a missing capability, or an improvement idea about Unseen's tools or output to the Unseen team. No sign-in needed and free. Use it whenever a tool errors, behaves unexpectedly, or you had to work around something. Describe the problem in your own words (what you called, what you expected, what happened). Never include document contents, personal data or credentials.","inputSchema":{"type":"object","properties":{"kind":{"type":"string","enum":["bug","improvement","worked_well"],"description":"Type of feedback (defaults to 'improvement')."},"tool":{"type":"string","description":"Optional tool name the feedback is about, e.g. compile_workflow."},"message":{"type":"string","description":"What happened and what you would change (max 1500 characters). No document contents."},"errorCode":{"type":"string","description":"Optional short error code or errorKind observed (e.g. 'unsupported_edit', 'not_found')."},"expectedBehavior":{"type":"string","description":"Optional concise description of what you expected (max 300 chars, no document contents)."},"observedBehavior":{"type":"string","description":"Optional concise description of what happened instead (max 300 chars, no document contents)."},"buildVersion":{"type":"string","description":"Optional client/deployment version or environment hint (max 64 chars)."},"jobId":{"type":"string","description":"Optional related workflow jobId/visualId (max 80 chars)."}},"required":["message"]}}],"supportedEvidence":["WorkflowEvidenceEnvelope v0.1","faithful source chunks with locators","raw text auto-segmentation","Host-LLM VisualSpec v0.1 deterministic compilation ($0 credits)"],"protocols":["mcp-jsonrpc-2.0"],"a2aDelegation":false,"localFirstPrivacy":true,"dataRetentionDays":0},"endpoints":{"agentCard":"/.well-known/agent-card.json","mcpCard":"/.well-known/mcp.json","mcpServerCard":"/.well-known/mcp/server-card.json","agentSkillsIndex":"/.well-known/agent-skills/index.json","skillMd":"/skills/unseen-workflow-compiler/SKILL.md","mcp":"/mcp","mcpChatgpt":"/mcp/chatgpt","mcpOauth":"/mcp/oauth","llmsTxt":"/llms.txt","llmsFullTxt":"/llms-full.txt","agentsMd":"/agents.md","generate":"/api/generate","enhance":"/api/enhance","detectWorkflows":"/api/detect-workflows","classifyDiscourse":"/api/classify-discourse","authOtpRequest":"/api/auth/otp/request","authOtpVerify":"/api/auth/otp/verify","authLogin":"/api/auth/login","authRegister":"/api/auth/register","oauthProtectedResource":"/.well-known/oauth-protected-resource","oauthAuthorizationServer":"/.well-known/oauth-authorization-server","oauthAuthorize":"/oauth/authorize","oauthToken":"/oauth/token","oauthRegister":"/oauth/register"}}