{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "tool-onf-test-definition",
  "title": "onf_test_definition",
  "section": "MCP tool reference",
  "description": "Execute a published asset or an unpublished draft, bounded to 45 seconds for LAN proxy compatibility. For longer jobs create/run a workflow asynchronously. This is real trusted code with possible external actions. For types, inputs.value is",
  "kind": "mcp",
  "url": "/wiki/tool-onf-test-definition/",
  "markdown": "/wiki/tool-onf-test-definition/index.md",
  "json": "/wiki/tool-onf-test-definition/index.json",
  "headings": [
    {
      "id": "inputs",
      "title": "Inputs",
      "depth": 2
    },
    {
      "id": "exact-input-schema",
      "title": "Exact input schema",
      "depth": 2
    },
    {
      "id": "mcp-annotations",
      "title": "MCP annotations",
      "depth": 2
    },
    {
      "id": "calling-this-tool",
      "title": "Calling this tool",
      "depth": 2
    }
  ],
  "sources": [
    "server/mcp-tools.ts"
  ],
  "contract": {
    "name": "onf_test_definition",
    "description": "Execute a published asset or an unpublished draft, bounded to 45 seconds for LAN proxy compatibility. For longer jobs create/run a workflow asynchronously. This is real trusted code with possible external actions. For types, inputs.value is tested; executors use config.testCode.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "definitionId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120,
          "pattern": "^[A-Za-z0-9_.-]+$"
        },
        "version": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "draft": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            },
            "kind": {
              "type": "string",
              "enum": [
                "node",
                "trigger",
                "executor",
                "type"
              ]
            },
            "description": {
              "default": "",
              "type": "string",
              "maxLength": 10000
            },
            "documentation": {
              "description": "Versioned Markdown documentation. Empty string clears it; omission preserves it when publishing. Reading documentation never upgrades runtime dependency pins.",
              "type": "string",
              "maxLength": 100000
            },
            "category": {
              "default": "Custom",
              "type": "string",
              "maxLength": 80
            },
            "color": {
              "default": "#58afa6",
              "type": "string",
              "maxLength": 30
            },
            "icon": {
              "type": "string",
              "maxLength": 120
            },
            "inputs": {
              "default": [],
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "^[A-Za-z0-9_.-]+$"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Primitive any/string/number/boolean/object/array/control, or a custom type definition ID."
                  },
                  "typeVersion": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "default": {},
                  "description": {
                    "type": "string",
                    "maxLength": 10000
                  }
                },
                "required": [
                  "id",
                  "name",
                  "type"
                ]
              }
            },
            "outputs": {
              "default": [],
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "pattern": "^[A-Za-z0-9_.-]+$"
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "type": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 120,
                    "description": "Primitive any/string/number/boolean/object/array/control, or a custom type definition ID."
                  },
                  "typeVersion": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "default": {},
                  "description": {
                    "type": "string",
                    "maxLength": 10000
                  }
                },
                "required": [
                  "id",
                  "name",
                  "type"
                ]
              }
            },
            "code": {
              "default": "",
              "description": "Async TypeScript/JavaScript function BODY. Uses inputs, config and context; returns an object keyed by output IDs. Not a module.",
              "type": "string",
              "maxLength": 250000
            },
            "runtime": {
              "type": "string",
              "enum": [
                "typescript",
                "javascript",
                "python",
                "powershell"
              ]
            },
            "runtimeOperation": {
              "type": "string",
              "enum": [
                "wait.timer",
                "wait.event",
                "wait.approval",
                "route.send",
                "route.receive",
                "error.report",
                "join.all",
                "join.first-completion",
                "join.first-success",
                "merge.selected"
              ]
            },
            "collection": {
              "type": "object",
              "properties": {
                "bodyDefinitionId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "bodyDefinitionVersion": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "itemInput": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "indexInput": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "resultOutput": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "concurrency": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 16
                },
                "errorMode": {
                  "type": "string",
                  "enum": [
                    "stop",
                    "collect"
                  ]
                },
                "maxItems": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1000
                }
              },
              "required": [
                "bodyDefinitionId",
                "bodyDefinitionVersion",
                "itemInput",
                "resultOutput",
                "concurrency",
                "errorMode",
                "maxItems"
              ]
            },
            "repeat": {
              "type": "object",
              "properties": {
                "bodyDefinitionId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "bodyDefinitionVersion": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "carryInput": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "resultOutput": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "stopOutput": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "indexInput": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "pattern": "^[A-Za-z0-9_.-]+$"
                },
                "maxIterations": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1000
                }
              },
              "required": [
                "bodyDefinitionId",
                "bodyDefinitionVersion",
                "carryInput",
                "resultOutput",
                "stopOutput",
                "maxIterations"
              ],
              "additionalProperties": false
            },
            "subflow": {
              "type": "object",
              "properties": {
                "nodes": {
                  "minItems": 1,
                  "maxItems": 500,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "variableBinding": {
                        "type": "object",
                        "properties": {
                          "variableId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120,
                            "pattern": "^[A-Za-z0-9_.-]+$"
                          },
                          "workspaceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120,
                            "pattern": "^[A-Za-z0-9_.-]+$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120
                          },
                          "type": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 120,
                            "pattern": "^[A-Za-z0-9_.-]+$"
                          },
                          "typeVersion": {
                            "type": "integer",
                            "exclusiveMinimum": 0,
                            "maximum": 9007199254740991
                          }
                        },
                        "required": [
                          "variableId",
                          "workspaceId",
                          "name",
                          "type"
                        ],
                        "additionalProperties": false
                      },
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "definitionId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "definitionVersion": {
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "hiddenInputs": {
                        "maxItems": 1000,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        }
                      },
                      "hiddenOutputs": {
                        "maxItems": 1000,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        }
                      },
                      "hiddenInputWires": {
                        "maxItems": 1000,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        }
                      },
                      "position": {
                        "type": "object",
                        "properties": {
                          "x": {
                            "type": "number"
                          },
                          "y": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "x",
                          "y"
                        ]
                      },
                      "config": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "inputs": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {}
                      },
                      "trigger": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "manual",
                              "webhook",
                              "schedule",
                              "poll",
                              "websocket"
                            ]
                          },
                          "websocket": {
                            "type": "object",
                            "properties": {
                              "url": {
                                "type": "string",
                                "maxLength": 8192
                              },
                              "urlSecret": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120,
                                "pattern": "^[A-Za-z0-9_.-]+$"
                              },
                              "protocols": {
                                "maxItems": 10,
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 120
                                }
                              },
                              "subscribeSecret": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120,
                                "pattern": "^[A-Za-z0-9_.-]+$"
                              },
                              "heartbeatSecret": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 120,
                                "pattern": "^[A-Za-z0-9_.-]+$"
                              },
                              "heartbeatIntervalSeconds": {
                                "type": "integer",
                                "minimum": 5,
                                "maximum": 3600
                              },
                              "idleTimeoutSeconds": {
                                "type": "integer",
                                "minimum": 5,
                                "maximum": 86400
                              },
                              "connectTimeoutMs": {
                                "type": "integer",
                                "minimum": 100,
                                "maximum": 30000
                              },
                              "maxMessageBytes": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 1048576
                              },
                              "maxQueueMessages": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100
                              },
                              "maxQueueBytes": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 4194304
                              },
                              "maxPendingRuns": {
                                "type": "integer",
                                "minimum": 1,
                                "maximum": 100
                              },
                              "reconnectMinMs": {
                                "type": "integer",
                                "minimum": 100,
                                "maximum": 30000
                              },
                              "reconnectMaxMs": {
                                "type": "integer",
                                "minimum": 100,
                                "maximum": 300000
                              }
                            }
                          },
                          "intervalSeconds": {
                            "type": "integer",
                            "minimum": 5,
                            "maximum": 31536000
                          },
                          "cron": {
                            "type": "string",
                            "maxLength": 200
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "kind",
                          "enabled"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "definitionId",
                      "definitionVersion",
                      "position",
                      "config",
                      "inputs"
                    ]
                  }
                },
                "edges": {
                  "maxItems": 2000,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "source": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "sourceHandle": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "target": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "targetHandle": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "reroutePoints": {
                        "maxItems": 100,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "x": {
                              "type": "number"
                            },
                            "y": {
                              "type": "number"
                            }
                          },
                          "required": [
                            "x",
                            "y"
                          ]
                        }
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 80
                      }
                    },
                    "required": [
                      "id",
                      "source",
                      "sourceHandle",
                      "target",
                      "targetHandle"
                    ]
                  }
                },
                "frames": {
                  "maxItems": 500,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "label": {
                        "type": "string",
                        "maxLength": 200
                      },
                      "position": {
                        "type": "object",
                        "properties": {
                          "x": {
                            "type": "number"
                          },
                          "y": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "x",
                          "y"
                        ]
                      },
                      "width": {
                        "type": "number",
                        "minimum": 160,
                        "maximum": 100000
                      },
                      "height": {
                        "type": "number",
                        "minimum": 96,
                        "maximum": 100000
                      },
                      "color": {
                        "type": "string",
                        "maxLength": 30
                      },
                      "nodeIds": {
                        "maxItems": 500,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120,
                          "pattern": "^[A-Za-z0-9_.-]+$"
                        }
                      },
                      "lockAutoArrange": {
                        "description": "True excludes this frame and all member positions from UI/MCP Arrange. Omitted/false allows arrangement; manual edits remain available.",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "position",
                      "width",
                      "height",
                      "nodeIds"
                    ]
                  }
                },
                "inputs": {
                  "maxItems": 1000,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "portId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "nodeId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "handleId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      }
                    },
                    "required": [
                      "portId",
                      "nodeId",
                      "handleId"
                    ]
                  }
                },
                "outputs": {
                  "maxItems": 1000,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "portId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "nodeId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      },
                      "handleId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 120,
                        "pattern": "^[A-Za-z0-9_.-]+$"
                      }
                    },
                    "required": [
                      "portId",
                      "nodeId",
                      "handleId"
                    ]
                  }
                }
              },
              "required": [
                "nodes",
                "edges",
                "inputs",
                "outputs"
              ]
            },
            "executorId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "pattern": "^[A-Za-z0-9_.-]+$"
            },
            "executorVersion": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991
            },
            "configSchema": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            },
            "schema": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {}
            }
          },
          "required": [
            "name",
            "kind"
          ]
        },
        "inputs": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "config": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "input": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {}
        },
        "timeoutMs": {
          "default": 30000,
          "type": "integer",
          "minimum": 100,
          "maximum": 45000
        }
      }
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "idempotentHint": false,
      "openWorldHint": true
    },
    "source": {
      "file": "server/mcp-tools.ts",
      "line": 715
    }
  }
}
