FabricFabricSDK
Portal SDK

Workflows

Execute and monitor Temporal-backed workflows from MCP clients.

Workflows in the Fabric portal are durable Temporal executions. Where fabric_chat_with_agent is the one-shot trigger, workflow tools let you kick off multi-step deterministic processes and poll their state.

fabric_list_workflows

> What workflows can I trigger in this project?

Input:

{
  projectId?: string,
  limit?: number,
  cursor?: string
}

Output:

{
  workflows: Array<{
    id, slug, name, description,
    projectId,
    inputSchema,      // JSON Schema for the workflow's input
    lastExecutionAt
  }>,
  nextCursor?: string
}

fabric_get_workflow

Returns one workflow's metadata plus a sample of recent executions.

> Show me the "nightly-reconcile" workflow.

Input: { workflowIdOrSlug: string }

fabric_execute_workflow

Starts a new workflow execution. Returns immediately with an execution id — workflows are async, so use fabric_get_workflow_execution to poll.

> Run the nightly-reconcile workflow with closeOfBusiness=2026-05-13.

Input:

{
  workflowIdOrSlug: string,
  input: Record<string, unknown>,    // validated against the workflow's inputSchema
  idempotencyKey?: string            // dedupe — same key returns the existing execution
}

Output:

{
  executionId: string,
  workflowId: string,
  status: "queued",
  startedAt: string
}

fabric_get_workflow_execution

Poll for status, intermediate state, and the final result.

> What's the status of execution e_5f3a?

Input: { executionId: string }

Output:

{
  execution: {
    id, workflowId, status,        // "queued" | "running" | "completed" | "failed" | "cancelled"
    input, output?,
    startedAt, completedAt?,
    error?: { message, stack? },
    progress?: { stepsCompleted, stepsTotal, currentStep }
  }
}

Patterns

Long-running tasks: workflows can run for hours or days. Don't keep the MCP session open waiting — start the workflow, capture the executionId, then poll periodically.

Idempotent triggers: include an idempotencyKey (e.g. the calendar date for nightly jobs) so re-running the prompt doesn't kick off a duplicate workflow.

Composing with agents: agents (fabric_chat_with_agent) can themselves call fabric_execute_workflow when configured with that authority. That's the recommended pattern for "agent kicks off a deterministic backend process" — the workflow handles durability, retries, and audit logging.