Issue while processing the input

I have created a CustomTool and have defined the input class as
class IdentityNamespaceInput(BaseModel): """Input schema for IdentityNamespaceTool.""" identity_namespace_codes: List[str] = Field( ..., description="List of identity namespace codes to be created." )

When i am kicking off the crew with this
`if name == “main”:
namespace_codes = [
‘b2b_person’,
‘b2b_account’,
‘b2b_opportunity’,
‘b2b_account_person’,
‘b2b_opportunity_person’,
‘b2b_campaign’,
‘b2b_campaign_member’,
‘b2b_marketing_list’,
‘b2b_marketing_list_member’
]

inputs = {
    'identity_namespace_codes': namespace_codes
}

result = IdentityNamespacesCrew().crew().kickoff(
    inputs=inputs
)
print(result)`

Getting error : ## Using tool: IdentityNamespaceTool

Tool Input:

“{"identity_namespace_codes": {"description": "List of identity namespace codes to be created.", "type": "list", "value": ["b2b_person", "b2b_account", "b2b_opportunity", "b2b_account_person", "b2b_opportunity_person", "b2b_campaign", "b2b_campaign_member", "b2b_marketing_list", "b2b_marketing_list_member"]}}”

Tool Output:

I encountered an error while trying to use the tool. This was the error: Arguments validation failed: 1 validation error for IdentityNamespaceInput
identity_namespace_codes
Input should be a valid list [type=list_type, input_value={‘description’: ‘List of …marketing_list_member’]}, input_type=dict]
For further information visit Redirecting....
Tool IdentityNamespaceTool accepts these inputs: Tool Name: IdentityNamespaceTool
Tool Arguments: {‘identity_namespace_codes’: {‘description’: ‘List of identity namespace codes to be created.’, ‘type’: ‘list’}}
Tool Description: Tool to get existing namespaces and create identity namespaces if it is not present in existing namespaces.
Moving on then. I MUST either use a tool (use one at time) OR give my best final answer not both at the same time. When responding, I must use the following format:

What does the tool run method look like? Something like

def _run(self, identity_namespace_codes: List[str]) -> str:

Can you share your tool code?

Hi I am able to fix this issue but I am getting error while accessing the output of previous task in the custom tool I am creating. Do you have any example of that. I am passing the context of the previous task while creating new task.

You don’t access it directly, it is injected into your task automatically. You don’t have to do anything.