Portal Community

Output Envelope

Every successful MCPToolCallNode execution produces a standard output envelope stored at $output.{nodeId}:

{
  "result": { ... },
  "toolName": "analyze-document",
  "serverId": "bfai-document-ai",
  "callId": "a1b2c3d4e5f6",
  "executedAt": "2026-05-25T10:05:30Z"
}

Output Fields

FieldTypeDescription
resultobject | array | stringTool-specific payload — structure defined by the MCP tool's output schema
toolNamestringName of the tool that was called
serverIdstringMCP server the tool was called on
callIdstringUnique identifier for this tool call (for correlation/debugging)
executedAtISO 8601 stringUTC timestamp when the tool call completed

Example: Document Analysis Result

// $output.analyzeDocument:
{
  "result": {
    "documentClass": "invoice",
    "confidence": 0.97,
    "entities": {
      "invoiceNumber": "INV-2026-00445",
      "totalAmount": 12500.00,
      "currency": "GBP",
      "vendorName": "Acme Supplies Ltd"
    },
    "pageCount": 3
  },
  "toolName": "analyze-document",
  "serverId": "bfai-document-ai",
  "callId": "a1b2c3d4e5f6",
  "executedAt": "2026-05-25T10:05:30Z"
}

Accessing Result Fields in Downstream Nodes

// Access the full result object:
$output.analyzeDocument.result

// Access nested fields:
$output.analyzeDocument.result.entities.invoiceNumber
$output.analyzeDocument.result.confidence
$output.analyzeDocument.result.documentClass

// Use in a condition node:
"$output.analyzeDocument.result.confidence > 0.9 && $output.analyzeDocument.result.documentClass === 'invoice'"

// Store in an entity:
"invoiceNumber": "$output.analyzeDocument.result.entities.invoiceNumber"
"vendorName":    "$output.analyzeDocument.result.entities.vendorName"

// Use in a message node:
"Document analyzed: {{$output.analyzeDocument.result.documentClass}} with {{$output.analyzeDocument.result.confidence * 100}}% confidence"

Tool-Level Errors

MCP tools can return errors in two ways. The first is a transport-level error (HTTP 4xx/5xx, network timeout), which the executor handles as a node failure with retry if configured. The second is a tool-level error — the server returns HTTP 200 but the MCP response contains isError: true:

// MCP error response (HTTP 200, but isError: true):
{
  "content": [{ "type": "text", "text": "Document format not supported: application/x-123" }],
  "isError": true
}

Tool-level errors are not retried. The node fails immediately, and the error text is available in the standard node error output for condition routing or logging.

Array results: Some tools return result as an array (e.g., a batch entity extractor returning one result per document). Use $output.analyzeDocuments.result[0].entities or pipe the result through a ForEachNode to process each item.