diff --git a/routes.el b/routes.el index 3b5b12d..f224409 100644 --- a/routes.el +++ b/routes.el @@ -335,6 +335,12 @@ fn handle_connectors(method: String, clean: String, body: String) -> String { if str_eq(clean, "/api/connectors/oauth/start") { return connectd_post("/mcp/oauth/start", body) } + // Call a connector tool directly (pre-chat), e.g. WhatsApp get_pairing_qr / get_login_status for + // the pairing UI. Body: {"name":"mcp____","input":{...}}. Keeps the app on the + // app->soul->connectd path (the UI never hits connectd directly) and works for remote/hosted apps. + if str_eq(clean, "/api/connectors/call") { + return connectd_post("/mcp/call", body) + } return "{\"ok\":false,\"error\":\"unknown connectors route\"}" }