Skip to main content
Glama

Unseen Workflow Compiler

Compile Workflow Diagram

compile_workflow

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). INPUT SCOPE: Use reviewed written procedures only. Do not interpret scans, images, chart/diagram geometry or unlabeled arrows, and do not certify business procedures. Ask for reviewed written process text or source-backed clarification. 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 observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations set readOnlyHint=false, idempotentHint=false, destructiveHint=false, but the description carries useful extras: it defines the input scope limits, explains that raw `text` is auto-segmented into `sources`, and describes the clarification/resume loop. It does not disclose cost/latency or whether artifacts persist, so it stops short of fully covering the non-read-only behavior the annotations imply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then clearly delimited by INPUT SCOPE / HOW TO STRUCTURE / EDITING GUIDANCE headers. It is dense and long, and the editing guidance arguably belongs with the sibling tools, but each section earns its place and nothing is padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter, nested-object tool with no output schema, the description does the heavy lifting: it names the returned artifacts (which substitutes for an output schema) and covers the resume path via jobId/priorAnswers. What is largely left to the schema is auth (authToken) and hostContext semantics.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 90%, so the baseline is 3. The description still adds meaning the schema does not: the mutual-exclusion rule between `sources` and `text`, the 1..60 chunk / <=2000 char constraints, excerpt fidelity, and the spec-vs-svg editing distinction for downstream calls.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource+output set: 'Turn supplied document evidence or raw operational text into a publication-ready workflow diagram' and enumerates the artifacts (SVG, Mermaid, Excalidraw, studioUrl). It also names the sibling tools it is not (autofix_workflow, revise_workflow) for editing tasks, so an agent can distinguish it from the rest of the family.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use and when-not: 'Use reviewed written procedures only. Do not interpret scans, images, chart/diagram geometry or unlabeled arrows.' It further routes editing work: cosmetic edits go to the returned SVG XML, structural/topological edits go to `spec` plus autofix_workflow or revise_workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.