{
  "schemaVersion": 1,
  "snapshotDate": "2026-10-23",
  "slug": "tool-onf-set-trigger",
  "title": "onf_set_trigger",
  "section": "MCP tool reference",
  "description": "Configure manual/webhook/schedule/poll/managed-websocket trigger and enabled state with revision protection. Enabled nonmanual graphs must validate. Activation can immediately connect and execute real code. WebSocket uses saved per-entry tr",
  "kind": "mcp",
  "url": "/wiki/tool-onf-set-trigger/",
  "markdown": "/wiki/tool-onf-set-trigger/index.md",
  "json": "/wiki/tool-onf-set-trigger/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_set_trigger",
    "description": "Configure manual/webhook/schedule/poll/managed-websocket trigger and enabled state with revision protection. Enabled nonmanual graphs must validate. Activation can immediately connect and execute real code. WebSocket uses saved per-entry transport settings and host-managed lifecycle. Read relevant workspace/workflow/frame context first; after a material edit, update concise purpose/wiring/operating notes with onf_update_context_documentation using its independent revision.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "workflowId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 120,
          "pattern": "^[A-Za-z0-9_.-]+$"
        },
        "expectedRevision": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991,
          "description": "Revision returned by get_workflow/get_graph. Stale revisions fail without overwriting."
        },
        "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
            }
          },
          "required": [
            "kind"
          ]
        },
        "enabled": {
          "type": "boolean"
        }
      },
      "required": [
        "workflowId",
        "expectedRevision",
        "trigger",
        "enabled"
      ]
    },
    "annotations": {
      "readOnlyHint": false,
      "destructiveHint": true,
      "idempotentHint": false,
      "openWorldHint": true
    },
    "source": {
      "file": "server/mcp-tools.ts",
      "line": 988
    }
  }
}
