# Bug in tool invocation for native function calling with Anthropic/Claude

**URL:** <https://community.crewai.com/t/bug-in-tool-invocation-for-native-function-calling-with-anthropic-claude/7392>\
**Category:** Crews\
**Tags:** tools\_issues\
**Created:** [March 10, 2026, 5:02am UTC](https://community.crewai.com/t/bug-in-tool-invocation-for-native-function-calling-with-anthropic-claude/7392 "2026-03-10T05:02:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![moy](https://avatars.discourse-cdn.com/v4/letter/m/f475e1/32.png) [@moy](https://community.crewai.com/u/moy)\
**Post date:** [March 10, 2026, 5:02am UTC](https://community.crewai.com/t/bug-in-tool-invocation-for-native-function-calling-with-anthropic-claude/7392/1 "2026-03-10T05:02:57Z")

</div>

I am using Crewai 1.9.3. I suspect the issue is present in current 1.10.x as well.

My issue is that I was unable to invoke tools when using Claude Opus 4.5. It was always returning responses like:

[ToolUseBlock(id=‘toolu\_01Fsjgx8uZ2MAHE5pi6BQ1dW’, input={‘text’: ‘…’, ‘search\_params’: {}, ‘endpoint\_’: {}}, name=‘my\_function’, type=‘tool\_use’, caller={‘type’: ‘direct’}), ToolUseBlock(id=‘toolu\_01ECrhtNPvDLiXbxCFkHDLrB’, input={‘text’: ‘…’, ‘search\_params’: {}, ‘endpoint\_’: {}}, name=‘my\_function’, type=‘tool\_use’, caller={‘type’: ‘direct’})]

I had Claude Code debug it for me and it identified the bug as summarized below:

The issue was in CrewAI’s get\_llm\_response() function in crewai/utilities/agent\_utils.py. When processing LLM responses through \_setup\_after\_llm\_call\_hooks(), any response that isn’t a BaseModel gets converted to a string via str(answer) (line 1018). This converted Anthropic’s ToolUseBlock list to a string like “[ToolUseBlock(id=‘…’, name=‘…’)]” instead of keeping the structured objects.

I hope someone from CrewAI dev team fixes this or lets me know if there is any other solution to the issue.
