arcade-mcp/arcade
Eric Gustin 4608cce862
Fix parameterized type bug & better error message (#273)
## PR Description
### 1. Bug Fix
A bug was observed where tools that were using [parameterized
generics](https://docs.python.org/3/library/stdtypes.html#types-genericalias)
(e.g., `dict[str, Any]`) for their input parameters or output, then this
would cause the Worker to fail on startup with the error `issubclass()
arg 1 must be a class` for Python3.13+. This error would not occur for
Python versions less than 3.13.

In Python <3.13, parameterized generics would implicitly be treated as
their underlying type (its origin), so it was possible to treat
`dict[str, Any]` as a class and pass it to `issubclass`. This is not the
case for Python 3.13, so we need to explicitly strip the GenericAlias
(e.g., `dict[str, Any]`) down to its origin (e.g., `dict`), before
checking if it is a subclass of `Enum`.

### 2. Better Error Message
When a tool used an unsupported parameter/output type, then Arcade would
display the following message:
```
Failed to start Arcade Worker: 
Type error encountered while adding tool get_website_map from arcade_web.tools.firecrawl. 
Reason: issubclass() arg 1 must be a class
```

But now it displays
```
Failed to start Arcade Worker: 
Error encountered while adding tool get_website_map from arcade_web.tools.firecrawl. 
Reason: Unsupported type: tuple[str, str]
```
2025-03-07 11:46:42 -08:00
..
arcade Fix parameterized type bug & better error message (#273) 2025-03-07 11:46:42 -08:00
tests fix: Tool secret keys must use a case-insensitive comparison (#275) 2025-03-04 14:33:55 -08:00
codecov.yaml Add `GET /v1/tools/list` (#100) 2024-10-09 21:02:23 -07:00
poetry.toml Dockerfiles for Actor container (#18) 2024-08-22 16:28:42 -07:00
pyproject.toml fix: Package version in pyproject.toml is wrong (#276) 2025-03-05 16:15:23 -08:00
README.md Update Examples & Various Renames (#233) 2025-01-28 17:17:29 -08:00
run_cli.py Add New Gmail Tools To The Google Toolkit (#41) 2024-09-19 10:18:49 -07:00
tox.ini Fix extras in pyproject.toml (#58) 2024-09-24 18:02:56 -07:00

Arcade Python SDK and CLI

Arcade provides developer-focused tooling and APIs designed to improve the capabilities of LLM applications and agents.

By removing the complexity of connecting agentic applications with your users' data and services, Arcade enables developers to focus on building their agentic applications.

To learn more, check out our