From 82d6661dd979ff4bf166321aef907ac35c981e52 Mon Sep 17 00:00:00 2001 From: Eric Gustin <34000337+EricGustin@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:27:23 -0700 Subject: [PATCH] Better error message (#789) We should be checking if the entrypoint file is in the current directory before we validate that it's a valid python file. Otherwise, the error message will be "invalid name for python file" when someone provides a path to a valid python file. --- > [!NOTE] > **Low Risk** > Low risk: only adjusts input validation/error messaging for `arcade configure` stdio entrypoints and bumps the package patch version. > > **Overview** > Improves `arcade configure` stdio entrypoint validation by **rejecting path-like values** (e.g., containing `/` or `\\`) before checking filename format, producing a clearer error when users pass a path instead of a file in the current directory. > > Bumps the project version from `1.13.0` to `1.13.1`. > > Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 4d02ee947740f839fd46d9faf62cfa766d5dae47. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot). --- libs/arcade-cli/arcade_cli/configure.py | 10 ++++++++-- pyproject.toml | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libs/arcade-cli/arcade_cli/configure.py b/libs/arcade-cli/arcade_cli/configure.py index 68ca07a4..9f503799 100644 --- a/libs/arcade-cli/arcade_cli/configure.py +++ b/libs/arcade-cli/arcade_cli/configure.py @@ -526,12 +526,18 @@ def configure_client( server_name = Path.cwd().name if transport == "stdio": - if not bool(re.match(r"^[a-zA-Z0-9_-]+\.py$", entrypoint_file)): - raise ValueError(f"Entrypoint file '{entrypoint_file}' is not a valid Python file name") + if "/" in entrypoint_file or "\\" in entrypoint_file: + raise ValueError( + f"Entrypoint file '{entrypoint_file}' must be a filename in the current " + f"directory, not a path" + ) if not (Path.cwd() / entrypoint_file).exists(): raise ValueError(f"Entrypoint file '{entrypoint_file}' is not in the current directory") + if not bool(re.match(r"^[a-zA-Z0-9_-]+\.py$", entrypoint_file)): + raise ValueError(f"Entrypoint file '{entrypoint_file}' is not a valid Python file name") + client_lower = client.lower() if client_lower == "claude": diff --git a/pyproject.toml b/pyproject.toml index 87c7d0e6..906852ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "arcade-mcp" -version = "1.13.0" +version = "1.13.1" description = "Arcade.dev - Tool Calling platform for Agents" readme = "README.md" license = { file = "LICENSE" }