arcade-mcp/libs/tests/tool
Eric Gustin 25267ab6ee
JSON-safety validation for ToolMetadata.extras (#773)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Medium Risk**
> Tightens validation on tool metadata, which may break existing tools
that relied on non-JSON-serializable `extras` values or keys; changes
are localized and well-covered by tests.
> 
> **Overview**
> Adds **JSON-safety enforcement** for `ToolMetadata.extras`: top-level
keys must be strings at model construction, and `validate_for_tool()`
now recursively rejects non-JSON-native values (including non-finite
floats) with path-rich `ToolDefinitionError` messages.
> 
> Expands tests to cover valid/invalid nested `extras` cases and
error-message quality, and bumps `arcade-core` version to `4.5.0`.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2bab0db3c17f0ddb97868764d10494da543b39e5. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
2026-02-25 09:48:04 -08:00
..
test_create_tool_definition.py PagerDuty typed OAuth object (#718) 2025-12-15 17:42:11 -03:00
test_create_tool_definition_errors.py Tool Error Handling (#539) 2025-09-10 10:45:18 -07:00
test_create_tool_definition_new.py 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
test_create_tool_definition_pydantic.py Support Tool Output in ValueSchema of ToolDefinition (#487) 2025-07-24 15:32:35 -07:00
test_create_tool_definition_pydantic_errors.py Support Tool Output in ValueSchema of ToolDefinition (#487) 2025-07-24 15:32:35 -07:00
test_create_tool_definition_typeddict.py Support Tool Output in ValueSchema of ToolDefinition (#487) 2025-07-24 15:32:35 -07:00
test_create_tool_definition_typeddict_errors.py Support Tool Output in ValueSchema of ToolDefinition (#487) 2025-07-24 15:32:35 -07:00
test_fully_qualified_tool_name.py 🏗️ Restructure: Multi-Package Architecture + uv Migration (#412) 2025-06-11 16:48:17 -07:00
test_tool_metadata.py JSON-safety validation for ToolMetadata.extras (#773) 2026-02-25 09:48:04 -08:00