# 'StructuredTool' object has no attribute 'model\_fields' error

**URL:** <https://community.crewai.com/t/structuredtool-object-has-no-attribute-model-fields-error/2423>\
**Category:** CrewAI Community Support\
**Created:** [January 3, 2025, 9:49am UTC](https://community.crewai.com/t/structuredtool-object-has-no-attribute-model-fields-error/2423 "2025-01-03T09:49:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hitesh\_Gupta](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/hitesh_gupta/32/1600_2.png) [@Hitesh\_Gupta](https://community.crewai.com/u/Hitesh_Gupta)\
**Post date:** [January 3, 2025, 9:49am UTC](https://community.crewai.com/t/structuredtool-object-has-no-attribute-model-fields-error/2423/1 "2025-01-03T09:49:06Z")

</div>

I am facing an issue with the tools uses in the agent. PFB the code that I am trying to use -  
I have imported the relevant packages needed for the tools.

# Creating Agents

lead\_data\_agent = Agent(  
config=lead\_agents\_config[‘lead\_data\_agent’],  
tools=[SerperDevTool(), ScrapeWebsiteTool()],  
llm=llm  
)

AttributeError: ‘StructuredTool’ object has no attribute ‘model\_fields’

I am tried this using multiple versions of crewAI and tools package. the last one used are  
crew 0.9.2  
crewai 0.86.0  
crewai-tools 0.25.5

---

<div class="post-metadata">

**Author:** ![Gauranga](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/gauranga/32/1424_2.png) [@Gauranga](https://community.crewai.com/u/Gauranga)\
**Post date:** [April 4, 2025, 11:05am UTC](https://community.crewai.com/t/structuredtool-object-has-no-attribute-model-fields-error/2423/2 "2025-04-04T11:05:02Z")

</div>

I am facing the same issue , has anyone resolved this ?

---

<div class="post-metadata">

**Author:** ![Eden\_Canlilar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.crewai.com/eden_canlilar/32/1422_2.png) [@Eden\_Canlilar](https://community.crewai.com/u/Eden_Canlilar)\
**Post date:** [June 11, 2025, 4:20am UTC](https://community.crewai.com/t/structuredtool-object-has-no-attribute-model-fields-error/2423/3 "2025-06-11T04:20:41Z")

</div>

I am having the same issue trying to run the notebook from this official lesson by crew ai locally: [Practical Multi AI Agents and Advanced Use Cases with crewAI - DeepLearning.AI](https://learn.deeplearning.ai/courses/practical-multi-ai-agents-and-advanced-use-cases-with-crewai/lesson/j0doo/support-data-insight-analysis)

crewai==0.75.0  
crewai-tools==0.12.1

Here’s the full traceback:

```auto
--------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[4], line 2
      1 # Creating Agents
----> 2 suggestion_generation_agent = Agent(
      3 config=agents_config['suggestion_generation_agent'],
      4 tools=[csv_tool]
      5 )
      7 reporting_agent = Agent(
      8 config=agents_config['reporting_agent'],
      9 tools=[csv_tool]
     10 )
     12 chart_generation_agent = Agent(
     13 config=agents_config['chart_generation_agent'],
     14 allow_code_execution=False
     15 )

    [... skipping hidden 1 frame]

File ~/anaconda3/envs/crewai-env-2/lib/python3.11/site-packages/crewai/agent.py:174, in Agent.post_init_setup(self)
    167 self.function_calling_llm = LLM(
    168 model=getattr(self.function_calling_llm, "model_name", None)
    169 or getattr(self.function_calling_llm, "deployment_name", None)
    170 or str(self.function_calling_llm)
    171 )
    173 if not self.agent_executor:
--> 174 self._setup_agent_executor()
    176 return self

File ~/anaconda3/envs/crewai-env-2/lib/python3.11/site-packages/crewai/agent.py:181, in Agent._setup_agent_executor(self)
    179 if not self.cache_handler:
    180 self.cache_handler = CacheHandler()
--> 181 self.set_cache_handler(self.cache_handler)

File ~/anaconda3/envs/crewai-env-2/lib/python3.11/site-packages/crewai/agents/agent_builder/base_agent.py:262, in BaseAgent.set_cache_handler(self, cache_handler)
    260 self.cache_handler = cache_handler
    261 self.tools_handler.cache = cache_handler
--> 262 self.create_agent_executor()

File ~/anaconda3/envs/crewai-env-2/lib/python3.11/site-packages/crewai/agent.py:292, in Agent.create_agent_executor(self, tools, task)
    275 if self.response_template:
    276 stop_words.append(
    277 self.response_template.split("{{ .Response }}")[1].strip()
    278 )
    280 self.agent_executor = CrewAgentExecutor(
    281 llm=self.llm,
    282 task=task,
    283 agent=self,
    284 crew=self.crew,
    285 tools=parsed_tools,
    286 prompt=prompt,
    287 original_tools=tools,
    288 stop_words=stop_words,
    289 max_iter=self.max_iter,
    290 tools_handler=self.tools_handler,
    291 tools_names=self.__tools_names(parsed_tools),
--> 292 tools_description=self._render_text_description_and_args(parsed_tools),
    293 step_callback=self.step_callback,
    294 function_calling_llm=self.function_calling_llm,
    295 respect_context_window=self.respect_context_window,
    296 request_within_rpm_limit=(
    297 self._rpm_controller.check_or_wait if self._rpm_controller else None
    298 ),
    299 callbacks=[TokenCalcHandler(self._token_process)],
    300 )

File ~/anaconda3/envs/crewai-env-2/lib/python3.11/site-packages/crewai/agent.py:397, in Agent._render_text_description_and_args(self, tools)
    395 tool_strings = []
    396 for tool in tools:
--> 397 args_schema = str(tool.model_fields)
    398 if hasattr(tool, "func") and tool.func:
    399 sig = signature(tool.func)

AttributeError: 'StructuredTool' object has no attribute 'model_fields'

```

Please help!

---

<div class="post-metadata">

**Author:** ![CinthiaKleiner](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@CinthiaKleiner](https://community.crewai.com/u/CinthiaKleiner)\
**Post date:** [July 23, 2025, 1:05pm UTC](https://community.crewai.com/t/structuredtool-object-has-no-attribute-model-fields-error/2423/4 "2025-07-23T13:05:17Z")

</div>

I am having the same problem. I tried different crewai and crewai\_tools versions. Someone resolve this ?  
crewai==0.75  
crewai\_tools==0.12.1
