diff --git a/backend/windmill-api/src/mcp/utils.rs b/backend/windmill-api/src/mcp/utils.rs index ba4ea391d5..de0ad9d4da 100644 --- a/backend/windmill-api/src/mcp/utils.rs +++ b/backend/windmill-api/src/mcp/utils.rs @@ -149,7 +149,10 @@ pub async fn get_items sqlx::FromRow<'a, sqlx::postgres::PgRow> + Sen .and_where("o.archived = false"); if item_type == "script" { - sqlb.and_where("o.auto_kind IS NULL"); + // only exclude library scripts (no main function); pipeline, test, WAC, + // and any future `auto_kind` values remain callable. Mirrors the scripts + // list API deny-list. + sqlb.and_where("(o.auto_kind IS NULL OR o.auto_kind <> 'lib')"); } if let Some(prefix) = path_prefix {