# I encountered an error while trying to use the tool. This was the error: StructuredTool.\_run() missing 1 required keyword-only argument: 'config'

**URL:** <https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351>\
**Category:** CrewAI Community Support\
**Created:** [September 12, 2024, 7:02pm UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351 "2024-09-12T19:02:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rameryp](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/rameryp/32/266_2.png) [@rameryp](https://community.crewai.com/u/rameryp)\
**Post date:** [September 12, 2024, 7:02pm UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/1 "2024-09-12T19:02:34Z")

</div>

Any idea how to fix this one ? I’m using a custom tool built using BaseTool

---

<div class="post-metadata">

**Author:** ![jklre](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jklre](https://community.crewai.com/u/jklre)\
**Post date:** [September 12, 2024, 8:25pm UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/2 "2024-09-12T20:25:36Z")

</div>

Can you share your tools code and the crew agent that is running it?

---

<div class="post-metadata">

**Author:** ![NaritaF](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/naritaf/32/275_2.png) [@NaritaF](https://community.crewai.com/u/NaritaF)\
**Post date:** [September 13, 2024, 3:39am UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/3 "2024-09-13T03:39:44Z")

</div>

Seeing the same error here when running FileReadTool so my agent can read a csv file. It was working last week and when I was running my code again today, it is throwing this error:

I encountered an error while trying to use the tool. This was the error: StructuredTool.\_run() missing 1 required keyword-only argument: ‘config’.  
Tool Ask question to co-worker accepts these inputs: Ask a specific question to one of the following co-workers: [My Agent]

---

<div class="post-metadata">

**Author:** ![jklre](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@jklre](https://community.crewai.com/u/jklre)\
**Post date:** [September 13, 2024, 3:51am UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/4 "2024-09-13T03:51:50Z")

</div>

Did you update or change anything? Are you running which OS. Windows can have some weird file path issues vs OSX or linux. Also can you share a bit more info so we can figure this out please?

---

<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:** [September 13, 2024, 4:33am UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/5 "2024-09-13T04:33:25Z")

</div>

Sounds like an llm just making an error. Did you run it with gpt 4 ?

---

<div class="post-metadata">

**Author:** ![NaritaF](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/naritaf/32/275_2.png) [@NaritaF](https://community.crewai.com/u/NaritaF)\
**Post date:** [September 13, 2024, 8:30pm UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/6 "2024-09-13T20:30:38Z")

</div>

I am running my code on a Mac, so Mac OS. And using gpt 4-turbo.

There is nothing fancying on my code, just trying to have the agent to read a csv file on my computer.

---

<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:** [September 13, 2024, 9:32pm UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/7 "2024-09-13T21:32:45Z")

</div>

Ok so probably not the llm. Need to see the tool code and the verbose=true messages statements. Is it setting up the right action input, etc.  
Also is the tool setup in Agent or Task or both. Try all 3 different approaches.

---

<div class="post-metadata">

**Author:** ![NaritaF](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/naritaf/32/275_2.png) [@NaritaF](https://community.crewai.com/u/NaritaF)\
**Post date:** [September 13, 2024, 9:53pm UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/8 "2024-09-13T21:53:32Z")

</div>

So the tool code is just an import from crewai\_tools to get FileReadTool. Verbose = True and tools are setup in the Agent. Thought it was not possible at the task level…  
Heard something in other forums that Langchain changed something in their StructuredTool.\_run() which might got me thinking that it might be the caused of this error?

---

<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:** [September 14, 2024, 12:00am UTC](https://community.crewai.com/t/i-encountered-an-error-while-trying-to-use-the-tool-this-was-the-error-structuredtool-run-missing-1-required-keyword-only-argument-config/351/9 "2024-09-14T00:00:55Z")

</div>

You can setup the tool in Task. Try all 3. What are the messages for action input, etc. is it setting up correctly to use the tool parameter wise? Where Is it failing after it says its going to use the tool? Where exactly is the error appearing?
