# Feeding the tool arguments interrupted

**URL:** <https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815>\
**Category:** CrewAI Community Support\
**Tags:** tools\_issues, crewai\
**Created:** [October 15, 2024, 7:38pm UTC](https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815 "2024-10-15T19:38:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayonesa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/mayonesa/32/59_2.png) [@mayonesa](https://community.crewai.com/u/mayonesa)\
**Post date:** [October 15, 2024, 7:38pm UTC](https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815/1 "2024-10-15T19:38:05Z")

</div>

Pretty consistently, I get an error like this when calling a tool:

```auto
Action Input: {"tail": "ARGUME12024-10-15 19:14:55,670 - 127923010462336 - __init__.py- __init__ :1236 - WARNING: SDK is disabled.

```

where the action input seems to get interrupted/truncated by a warning. That results in a Pydantic error because the tool has 2 parameters instead of 1. Because of self-healing it is later on able to overcome that by trying again this time w/o truncation. However, instead of using the full first argument, it accepts the previous, truncated one. For this example, it uses

ARGUME

instead of

ARGUMENT

I naively tried disabling the warnings but they did not disable to begin w/.

---

<div class="post-metadata">

**Author:** ![moto](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@moto](https://community.crewai.com/u/moto)\
**Post date:** [October 15, 2024, 7:49pm UTC](https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815/2 "2024-10-15T19:49:05Z")

</div>

> [@mayonesa](#):
>
> `is`

what llm were you using?

---

<div class="post-metadata">

**Author:** ![mayonesa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/mayonesa/32/59_2.png) [@mayonesa](https://community.crewai.com/u/mayonesa)\
**Post date:** [October 15, 2024, 8:24pm UTC](https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815/3 "2024-10-15T20:24:30Z")

</div>

I have no choice in this but it is an open source one.

---

<div class="post-metadata">

**Author:** ![moto](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@moto](https://community.crewai.com/u/moto)\
**Post date:** [October 15, 2024, 10:01pm UTC](https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815/4 "2024-10-15T22:01:52Z")

</div>

Seems to me this sort of behavior is often caused by llm’s that are not good at function calling/tool use. Try adding to your system prompt,  
When you are using a tool, you MUST use valid JSON format for your input to the tool.

Sometimes this helps, sometimes not depending on the llm.

---

<div class="post-metadata">

**Author:** ![mayonesa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/mayonesa/32/59_2.png) [@mayonesa](https://community.crewai.com/u/mayonesa)\
**Post date:** [October 15, 2024, 10:07pm UTC](https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815/5 "2024-10-15T22:07:07Z")

</div>

> [@moto](#):
>
> you MUST use valid JSON format for your input to the tool

This is news for me. I have not been using JSON at all. Do you have any doc reference for this?

---

<div class="post-metadata">

**Author:** ![moto](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@moto](https://community.crewai.com/u/moto)\
**Post date:** [October 15, 2024, 11:14pm UTC](https://community.crewai.com/t/feeding-the-tool-arguments-interrupted/815/6 "2024-10-15T23:14:53Z")

</div>

no reference. the tools need input to be structured when they are called. any llm does its best to comply with instructions and create the proper format for inputs to pass to a tool. this sometimes helps. crewai is telling the llm to do the formatting correctly based on the tool parm inputs. sometimes the llm does it correctly, sometimes not. depends on how adept the llm is at tool use.
