microsoft/autogen · error · InvalidToolArgumentsException
Error: Invalid arguments: {message.arguments}
Error message
Error: Invalid arguments: {message.arguments} What it means
Error "Error: Invalid arguments: {message.arguments}" thrown in microsoft/autogen.
Source
Thrown at python/packages/autogen-core/src/autogen_core/tool_agent/_tool_agent.py:91
Raises:
ToolNotFoundException: If the tool is not found.
InvalidToolArgumentsException: If the tool arguments are invalid.
ToolExecutionException: If the tool execution fails.
"""
tool = next((tool for tool in self._tools if tool.name == message.name), None)
if tool is None:
raise ToolNotFoundException(
call_id=message.id, content=f"Error: Tool not found: {message.name}", name=message.name
)
else:
try:
arguments = json.loads(message.arguments)
result = await tool.run_json(
args=arguments, cancellation_token=ctx.cancellation_token, call_id=message.id
)
result_as_str = tool.return_value_as_string(result)
except json.JSONDecodeError as e:
raise InvalidToolArgumentsException(
call_id=message.id, content=f"Error: Invalid arguments: {message.arguments}", name=message.name
) from e
except Exception as e:
raise ToolExecutionException(call_id=message.id, content=f"Error: {e}", name=message.name) from e
return FunctionExecutionResult(content=result_as_str, call_id=message.id, is_error=False, name=message.name)
View on GitHub (pinned to 027ecf0a37)
Solutions
- Supply arguments matching the tool's parameter schema
Example fix
Validate/parse arguments as JSON matching the tool schema before calling
When it happens
Trigger: Thrown at python/packages/autogen-core/src/autogen_core/tool_agent/_tool_agent.py:91 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/autogen@027ecf0a37 (2026-08-15).
Data as JSON: /api/errors/deb64b3ce5218a08.
Report an issue: GitHub.