Skip to main content

Documentation Index

Fetch the complete documentation index at: https://magica.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

The workflow builder tools let AI assistants create, edit, and restructure workflows step-by-step. Each tool validates independently, so errors are caught early — your assistant gets a clear error and can self-correct.

Typical build flow

1

Discover nodes

Call list_node_types to see available node types and their ports.
2

Scaffold a workflow

Call create_workflow to create a workflow with Request and Response nodes.
3

Add processing nodes

Call add_node for each model (image generator, LLM, etc.).
4

Wire it together

Call connect_nodes to wire outputs to inputs — type-checked automatically.

Editing an existing workflow

Already built a workflow and need to tweak it? Use these tools:
  • update_node — change input values on an existing node
  • delete_node — remove a node; all connected edges are cleaned up automatically
  • disconnect_nodes — remove a single edge (by edge ID or source/target pair)
  • add_node + connect_nodes — rewire the workflow

Examples

Four common patterns. Switch tabs to see each one.
Generate an image with Flux, then describe it with a vision LLM.
list_node_types(category: "image") → sees flux_2_pro with out:result (image)
list_node_types(category: "llm") → sees gpt_5_4 with in:image_urls, out:output
create_workflow("Image + Describe") → gets workflowId + request/response node IDs
add_node(workflowId, "flux_2_pro") → gets flux node ID + ports
add_node(workflowId, "gpt_5_4") → gets LLM node ID + ports
connect_nodes(flux out:result → llm in:image_urls) → validated (image→image)
connect_nodes(llm out:output → response in:result) → validated (text→any)

Port names returned by add_node and list_node_types use the in: / out: prefix format expected by connect_nodes. The connect_nodes tool validates type compatibility (e.g. image→image), prevents cycles, and enforces single-input rules. Use disconnect_nodes to remove a connection, or delete_node to remove a node along with all its connections.