Skip to main content
Glama

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "schemaVersion": "<schemaVersion>",
      "userGoal": "<userGoal>",
      "sources": "<sources>"
    },
    "name": "compile_workflow"
  }
}

Input 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. Changed1 schema field changed
    • addedInput schema / properties / desiredOutput / properties / swimlane
      Added value: +{
      +  "description": "Optional swimlane layout toggle (defaults to automatic swimlanes when 2+ actor groups exist)",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare this is a non-read-only, non-idempotent generator, and the description adds real behavioral context beyond them: the output artifacts returned, that the tool may halt and ask for source-backed clarification, that it must not certify business procedures, and that autofix_workflow is the '$0 deterministic' healing path (implying this call is not free). It stops short of stating cost, latency, or whether repeated calls with the same inputs produce identical output.

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?

Well front-loaded: the purpose and outputs come first, followed by labeled INPUT SCOPE, HOW TO STRUCTURE TEXT INPUTS, and EDITING GUIDANCE sections that are easy to scan. Minor waste from restating schema facts (1..60 chunks, <=2000 chars) and from a fairly dense single paragraph, but every section carries actionable routing information.

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 tool with nested objects and no output schema, the description covers the important ground: what artifacts come back, the two input modes, the refusal boundary on images/unreviewed text, and the post-call editing workflow. The clarification/resume loop (jobId, priorAnswers, hostContext) is only implied and relies on the schema, which is the main remaining gap.

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 earns above baseline by explaining the mutually exclusive input modes ('Either pass sources ... OR pass raw text and Unseen will automatically segment it') and by stressing that excerpts must be verbatim with exact numbers/actors/thresholds preserved. Fields like jobId, priorAnswers, hostContext, and desiredOutput are left to the schema to explain.

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?

The description opens with a specific verb+resource+output set: 'Turn supplied document evidence or raw operational text into a publication-ready workflow diagram' with enumerated artifacts (SVG, Mermaid, Excalidraw, studioUrl). It also distinguishes itself from siblings by directing structural edits to autofix_workflow or revise_workflow, so the agent can place it in the toolchain without opening a schema.

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-to-use is given: 'Use reviewed written procedures only. Do not interpret scans, images, chart/diagram geometry or unlabeled arrows,' plus an instruction to ask for clarification instead of guessing. It also names the correct alternative path per edit type (cosmetic edits to SVG vs structural edits via spec + autofix_workflow/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.