{
 "documentation_revision": 10,
 "api_revision": 58,
 "source": "Commands + ToolSchemas + PlatformApi.openApi",
 "operation": {
  "path": "/v2/call",
  "method": "POST",
  "mcp_tool": "bridgit_workflow_propose",
  "idempotency_required": true,
  "documentation": "https://bridgit.cc/learn/operations/v2-workflow.propose.json",
  "operation_url": "https://bridgit.cc/learn/operations/v2-workflow.propose.json",
  "required_arguments": [
   "idempotency_key",
   "name",
   "trigger",
   "steps"
  ],
  "http": {
   "path": "/v2/call",
   "headers": {
    "Authorization": "Bearer <your key>",
    "Idempotency-Key": "Required: one UUID per logical action; preserve it on retries"
   },
   "instructions": "Send JSON {tool, arguments}. HTTP retry identity belongs in the Idempotency-Key header, never arguments.idempotency_key; MCP uses idempotency_key inside its tool arguments.",
   "method": "POST",
   "arguments_schema": {
    "additionalProperties": false,
    "type": "object",
    "properties": {
     "ui": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
       "template": {
        "type": "string",
        "enum": [
         "button",
         "status",
         "help"
        ]
       },
       "text": {
        "type": "string",
        "maxLength": 1024
       },
       "title": {
        "type": "string",
        "maxLength": 120
       }
      },
      "required": ["template"]
     },
     "name": {
      "type": "string",
      "maxLength": 120
     },
     "trigger": {
      "description": "geofence needs latitude and longitude",
      "additionalProperties": false,
      "type": "object",
      "properties": {
       "mapping": {
        "additionalProperties": false,
        "type": "object",
        "properties": {
         "occurred_at": {
          "description": "Dotted source object path",
          "type": "string",
          "maxLength": 256
         },
         "device_name": {
          "description": "Dotted source object path",
          "type": "string",
          "maxLength": 256
         },
         "device_id": {
          "description": "Dotted source object path",
          "type": "string",
          "maxLength": 256
         },
         "text": {
          "description": "Dotted source object path",
          "type": "string",
          "maxLength": 256
         },
         "type": {
          "description": "Dotted source object path",
          "type": "string",
          "maxLength": 256
         },
         "title": {
          "description": "Dotted source object path",
          "type": "string",
          "maxLength": 256
         }
        },
        "required": []
       },
       "package": {
        "description": "Required for notification transport",
        "type": "string",
        "maxLength": 256
       },
       "adapter": {
        "type": "string",
        "enum": [
         "generic",
         "tapo"
        ]
       },
       "radius_m": {
        "description": "For geofence (default 200)",
        "maximum": 10000,
        "type": "integer",
        "minimum": 100
       },
       "latitude": {
        "maximum": 90,
        "description": "Required for geofence",
        "type": "number",
        "minimum": -90
       },
       "transport": {
        "type": "string",
        "enum": [
         "webhook",
         "notification"
        ]
       },
       "type": {
        "type": "string",
        "enum": [
         "button",
         "interval",
         "charging",
         "geofence",
         "applet.event",
         "application.event"
        ]
       },
       "application_id": {
        "description": "Legacy alias for applet_id; if both are supplied they must agree",
        "type": "string",
        "maxLength": 80
       },
       "seconds": {
        "description": "For interval (default 900)",
        "maximum": 86400,
        "type": "integer",
        "minimum": 30
       },
       "event_type": {
        "description": "Only dispatch this normalized event type; omitted accepts all",
        "type": "string",
        "maxLength": 80
       },
       "cooldown_seconds": {
        "description": "Per device and normalized type (default 30)",
        "maximum": 86400,
        "type": "integer",
        "minimum": 0
       },
       "source_id": {
        "description": "Required for applet.event (and legacy application.event)",
        "type": "string",
        "maxLength": 80
       },
       "applet_id": {
        "description": "Applet identifier for applet.event",
        "type": "string",
        "maxLength": 80
       },
       "longitude": {
        "maximum": 180,
        "description": "Required for geofence",
        "type": "number",
        "minimum": -180
       }
      },
      "required": ["type"]
     },
     "steps": {
      "minItems": 1,
      "maxItems": 32,
      "type": "array",
      "items": {
       "additionalProperties": false,
       "type": "object",
       "properties": {
        "seconds": {
         "description": "For ring",
         "maximum": 30,
         "type": "integer",
         "minimum": 1
        },
        "destinations": {
         "minItems": 1,
         "maxItems": 3,
         "description": "Required for alert: 1-3 owner-approved destination ids",
         "type": "array",
         "items": {"type": "string"}
        },
        "text": {
         "description": "Required for speak, alert and event",
         "type": "string",
         "maxLength": 4096
        },
        "type": {
         "type": "string",
         "enum": [
          "notice",
          "speak",
          "ring",
          "alert",
          "event"
         ]
        },
        "title": {
         "description": "Required for notice",
         "type": "string",
         "maxLength": 120
        }
       },
       "required": ["type"]
      }
     }
    },
    "required": [
     "name",
     "trigger",
     "steps"
    ]
   },
   "request_schema": {
    "additionalProperties": false,
    "type": "object",
    "required": [
     "tool",
     "arguments"
    ],
    "properties": {
     "arguments": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
       "ui": {
        "additionalProperties": false,
        "type": "object",
        "properties": {
         "template": {
          "type": "string",
          "enum": [
           "button",
           "status",
           "help"
          ]
         },
         "text": {
          "type": "string",
          "maxLength": 1024
         },
         "title": {
          "type": "string",
          "maxLength": 120
         }
        },
        "required": ["template"]
       },
       "name": {
        "type": "string",
        "maxLength": 120
       },
       "trigger": {
        "description": "geofence needs latitude and longitude",
        "additionalProperties": false,
        "type": "object",
        "properties": {
         "mapping": {
          "additionalProperties": false,
          "type": "object",
          "properties": {
           "occurred_at": {
            "description": "Dotted source object path",
            "type": "string",
            "maxLength": 256
           },
           "device_name": {
            "description": "Dotted source object path",
            "type": "string",
            "maxLength": 256
           },
           "device_id": {
            "description": "Dotted source object path",
            "type": "string",
            "maxLength": 256
           },
           "text": {
            "description": "Dotted source object path",
            "type": "string",
            "maxLength": 256
           },
           "type": {
            "description": "Dotted source object path",
            "type": "string",
            "maxLength": 256
           },
           "title": {
            "description": "Dotted source object path",
            "type": "string",
            "maxLength": 256
           }
          },
          "required": []
         },
         "package": {
          "description": "Required for notification transport",
          "type": "string",
          "maxLength": 256
         },
         "adapter": {
          "type": "string",
          "enum": [
           "generic",
           "tapo"
          ]
         },
         "radius_m": {
          "description": "For geofence (default 200)",
          "maximum": 10000,
          "type": "integer",
          "minimum": 100
         },
         "latitude": {
          "maximum": 90,
          "description": "Required for geofence",
          "type": "number",
          "minimum": -90
         },
         "transport": {
          "type": "string",
          "enum": [
           "webhook",
           "notification"
          ]
         },
         "type": {
          "type": "string",
          "enum": [
           "button",
           "interval",
           "charging",
           "geofence",
           "applet.event",
           "application.event"
          ]
         },
         "application_id": {
          "description": "Legacy alias for applet_id; if both are supplied they must agree",
          "type": "string",
          "maxLength": 80
         },
         "seconds": {
          "description": "For interval (default 900)",
          "maximum": 86400,
          "type": "integer",
          "minimum": 30
         },
         "event_type": {
          "description": "Only dispatch this normalized event type; omitted accepts all",
          "type": "string",
          "maxLength": 80
         },
         "cooldown_seconds": {
          "description": "Per device and normalized type (default 30)",
          "maximum": 86400,
          "type": "integer",
          "minimum": 0
         },
         "source_id": {
          "description": "Required for applet.event (and legacy application.event)",
          "type": "string",
          "maxLength": 80
         },
         "applet_id": {
          "description": "Applet identifier for applet.event",
          "type": "string",
          "maxLength": 80
         },
         "longitude": {
          "maximum": 180,
          "description": "Required for geofence",
          "type": "number",
          "minimum": -180
         }
        },
        "required": ["type"]
       },
       "steps": {
        "minItems": 1,
        "maxItems": 32,
        "type": "array",
        "items": {
         "additionalProperties": false,
         "type": "object",
         "properties": {
          "seconds": {
           "description": "For ring",
           "maximum": 30,
           "type": "integer",
           "minimum": 1
          },
          "destinations": {
           "minItems": 1,
           "maxItems": 3,
           "description": "Required for alert: 1-3 owner-approved destination ids",
           "type": "array",
           "items": {"type": "string"}
          },
          "text": {
           "description": "Required for speak, alert and event",
           "type": "string",
           "maxLength": 4096
          },
          "type": {
           "type": "string",
           "enum": [
            "notice",
            "speak",
            "ring",
            "alert",
            "event"
           ]
          },
          "title": {
           "description": "Required for notice",
           "type": "string",
           "maxLength": 120
          }
         },
         "required": ["type"]
        }
       }
      },
      "required": [
       "name",
       "trigger",
       "steps"
      ]
     },
     "tool": {
      "description": "Dotted tool name, e.g. screen.observe (x-bridgit-tools lists the MCP names: drop the bridgit_ prefix and use dots)",
      "type": "string",
      "enum": ["workflow.propose"]
     }
    }
   }
  },
  "mcp_input_schema": {
   "additionalProperties": false,
   "type": "object",
   "properties": {
    "ui": {
     "additionalProperties": false,
     "type": "object",
     "properties": {
      "template": {
       "type": "string",
       "enum": [
        "button",
        "status",
        "help"
       ]
      },
      "text": {
       "type": "string",
       "maxLength": 1024
      },
      "title": {
       "type": "string",
       "maxLength": 120
      }
     },
     "required": ["template"]
    },
    "name": {
     "type": "string",
     "maxLength": 120
    },
    "idempotency_key": {
     "description": "Unique per logical request. Retries reuse the same key and exact input.",
     "type": "string"
    },
    "trigger": {
     "description": "geofence needs latitude and longitude",
     "additionalProperties": false,
     "type": "object",
     "properties": {
      "mapping": {
       "additionalProperties": false,
       "type": "object",
       "properties": {
        "occurred_at": {
         "description": "Dotted source object path",
         "type": "string",
         "maxLength": 256
        },
        "device_name": {
         "description": "Dotted source object path",
         "type": "string",
         "maxLength": 256
        },
        "device_id": {
         "description": "Dotted source object path",
         "type": "string",
         "maxLength": 256
        },
        "text": {
         "description": "Dotted source object path",
         "type": "string",
         "maxLength": 256
        },
        "type": {
         "description": "Dotted source object path",
         "type": "string",
         "maxLength": 256
        },
        "title": {
         "description": "Dotted source object path",
         "type": "string",
         "maxLength": 256
        }
       },
       "required": []
      },
      "package": {
       "description": "Required for notification transport",
       "type": "string",
       "maxLength": 256
      },
      "adapter": {
       "type": "string",
       "enum": [
        "generic",
        "tapo"
       ]
      },
      "radius_m": {
       "description": "For geofence (default 200)",
       "maximum": 10000,
       "type": "integer",
       "minimum": 100
      },
      "latitude": {
       "maximum": 90,
       "description": "Required for geofence",
       "type": "number",
       "minimum": -90
      },
      "transport": {
       "type": "string",
       "enum": [
        "webhook",
        "notification"
       ]
      },
      "type": {
       "type": "string",
       "enum": [
        "button",
        "interval",
        "charging",
        "geofence",
        "applet.event",
        "application.event"
       ]
      },
      "application_id": {
       "description": "Legacy alias for applet_id; if both are supplied they must agree",
       "type": "string",
       "maxLength": 80
      },
      "seconds": {
       "description": "For interval (default 900)",
       "maximum": 86400,
       "type": "integer",
       "minimum": 30
      },
      "event_type": {
       "description": "Only dispatch this normalized event type; omitted accepts all",
       "type": "string",
       "maxLength": 80
      },
      "cooldown_seconds": {
       "description": "Per device and normalized type (default 30)",
       "maximum": 86400,
       "type": "integer",
       "minimum": 0
      },
      "source_id": {
       "description": "Required for applet.event (and legacy application.event)",
       "type": "string",
       "maxLength": 80
      },
      "applet_id": {
       "description": "Applet identifier for applet.event",
       "type": "string",
       "maxLength": 80
      },
      "longitude": {
       "maximum": 180,
       "description": "Required for geofence",
       "type": "number",
       "minimum": -180
      }
     },
     "required": ["type"]
    },
    "steps": {
     "minItems": 1,
     "maxItems": 32,
     "type": "array",
     "items": {
      "additionalProperties": false,
      "type": "object",
      "properties": {
       "seconds": {
        "description": "For ring",
        "maximum": 30,
        "type": "integer",
        "minimum": 1
       },
       "destinations": {
        "minItems": 1,
        "maxItems": 3,
        "description": "Required for alert: 1-3 owner-approved destination ids",
        "type": "array",
        "items": {"type": "string"}
       },
       "text": {
        "description": "Required for speak, alert and event",
        "type": "string",
        "maxLength": 4096
       },
       "type": {
        "type": "string",
        "enum": [
         "notice",
         "speak",
         "ring",
         "alert",
         "event"
        ]
       },
       "title": {
        "description": "Required for notice",
        "type": "string",
        "maxLength": 120
       }
      },
      "required": ["type"]
     }
    }
   },
   "required": [
    "idempotency_key",
    "name",
    "trigger",
    "steps"
   ]
  },
  "mcp": {
   "path": "/mcp",
   "arguments_schema": "mcp_input_schema",
   "tool": "bridgit_workflow_propose"
  },
  "required_arguments_transport": "mcp",
  "tool": "workflow.propose"
 }
}
