Repository: phidatahq/phidata
Issue category: Bug Report

Bedrock - Claude 3.5 Sonnet not working for Multi Agent Team
**When trying to run a Multi-Agent Team using Amazon Bedrock Claude 3.5 Sonnet, then I get the following error.**
Traceback (most recent call last):
  File "/Users/RyanBlake/Desktop/Source Control/PhiData Agents/FinanceAgentTeam.py", line 34, in <module>
    agent_team.print_response("Summarize analyst recommendations and share the latest news for CPI Capitec", stream=True)
  File "/opt/homebrew/lib/python3.11/site-packages/phi/agent/agent.py", line 2765, in print_response
    for resp in self.run(message=message, messages=messages, stream=True, **kwargs):
  File "/opt/homebrew/lib/python3.11/site-packages/phi/agent/agent.py", line 1787, in _run
    for model_response_chunk in self.model.response_stream(messages=messages_for_model):
  File "/opt/homebrew/lib/python3.11/site-packages/phi/model/aws/bedrock.py", line 493, in response_stream
    for chunk in response:
  File "/opt/homebrew/lib/python3.11/site-packages/phi/model/aws/bedrock.py", line 126, in invoke_stream
    response = self.bedrock_runtime_client.converse_stream(**body)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/botocore/client.py", line 569, in _api_call
    return self._make_api_call(operation_name, kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/botocore/client.py", line 980, in _make_api_call
    request_dict = self._convert_to_request_dict(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/botocore/client.py", line 1047, in _convert_to_request_dict
    request_dict = self._serializer.serialize_to_request(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/botocore/validate.py", line 381, in serialize_to_request
    raise ParamValidationError(report=report.generate_report())
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid length for parameter toolConfig.tools[0].toolSpec.description, value: 0, valid min length: 1
Invalid length for parameter toolConfig.tools[1].toolSpec.description, value: 0, valid min length: 1

**I used the examples is, but just swopped out the model. 
Here is my Python script.**
from phi.agent import Agent
from phi.tools.googlesearch import GoogleSearch
from phi.model.aws.claude import Claude
from phi.tools.yfinance import YFinanceTools

web_agent = Agent(
    name="Web Agent",
    model=Claude(id="anthropic.claude-3-5-sonnet-20240620-v1:0"),
    tools=[GoogleSearch()],
    #description="You are a professional financial analyst agent that helps people find financial data.",
    instructions=["Always include sources"],
    markdown=True,
)

finance_agent = Agent(
    name="Finance Agent",
    role="Get financial data",
    model=Claude(id="anthropic.claude-3-5-sonnet-20240620-v1:0"),
    tools=[YFinanceTools(stock_price=True, analyst_recommendations=True, company_info=True)],
    #description="You are a professional financial analyst agent that helps people find financial data.",
    instructions=["Use tables to display data"],
    show_tool_calls=True,
    markdown=True,
)

agent_team = Agent(
    team=[web_agent, finance_agent],
    model=Claude(id="anthropic.claude-3-5-sonnet-20240620-v1:0"),
    instructions=["Always include sources", "Use tables to display data"],
    show_tool_calls=True,
    markdown=True,
)

agent_team.print_response("Summarize analyst recommendations and share the latest news for NVDA Nvidia", stream=True)



Functions to edit:
phi/tools/function.py:Function.process_entrypoint

Patch:
diff --git a/phi/tools/function.py b/phi/tools/function.py
index 24d103165..89520833e 100644
--- a/phi/tools/function.py
+++ b/phi/tools/function.py
@@ -175,7 +175,7 @@ def process_entrypoint(self, strict: bool = False):
         except Exception as e:
             logger.warning(f"Could not parse args for {self.name}: {e}", exc_info=True)
 
-        self.description = getdoc(self.entrypoint)
+        self.description = getdoc(self.entrypoint) or self.description
         self.parameters = parameters
         self.entrypoint = validate_call(self.entrypoint)