#7536·crewAI

[BUG] native tool calls crash when arguments JSON is not an object

Author: MohammadHijjawi97Created Sep 17, 2026Updated Sep 17, 2026

Description

parse_tool_call_args JSON-decodes string arguments and returns whatever type json.loads produced. A JSON array, string, or number is not a mapping, so later fn(**args) raises TypeError. Bedrock streaming already coerces non-dict JSON to a dict. Native tool calls do not.

Steps to Reproduce

python
from crewai.utilities.agent_utils import parse_tool_call_args

args, error = parse_tool_call_args('["oops"]', "get_weather", "call_1")
print(args, error)
# later: fn(**args)

Expected behavior

Non-object JSON is treated as invalid input and returns an error result, not a list.

Screenshots/Code snippets

TypeError: dict argument ... when expanding a list into keyword arguments.

Operating System

Windows 11

Python Version

3.12

crewAI Version

main

Additional context

Native tool execution in agent_utils uses the parsed value as kwargs.