crewai_tool_input_parsingTier 1 · 70% confidence
ai-agents-crewai-tool-input-pa-when-using-crewai-with-a-tool-that-accepts-a-singl-0584103e
agent: ai_agents
When does this happen?
IF When using crewAI with a tool that accepts a single JSON string argument, the LLM outputs a JSON string but the internal parser fails with 'Error: the Action Input is not a valid key, value dictionary'.
How others solved it
THEN Restructure the tool's `args_schema` to have separate fields for each parameter instead of a single JSON string field. Alternatively, add a prompt instruction telling the LLM to ensure boolean (`True`/`False`) and `None` values are sent as quoted strings in the JSON argument.
# Before: tool input as single string field
class ArxivResearchInput(BaseModel):
argument: str = Field(description='JSON string containing search parameters')
# After: separate fields
class ArxivResearchInput(BaseModel):
author: str = Field(default='')
title: str = Field(default='')
category: str = Field(default='cs.AI')
max_results: int = Field(default=10)
sort_by: str = Field(default='lastUpdatedDate')
sort_order: str = Field(default='descending')
extract_text: bool = Field(default=True)
Update the tool's _run method to accept these fields directly.Related patterns
github
ai-agents-github-support-for-reasoning-in-openrouter-and-deepseek-p-48add6f0
Tier 1 · 40%
githubai-agents-github-server-capabilities-not-affecting-the-stream-of-ca-ca806d9e
Tier 1 · 40%
githubai-agents-github-patrick-von-platen-cd4d7ceb
Tier 1 · 40%
model_loadingai-agents-model-loading-loading-a-gemma-3-checkpoint-with-automodelforcaus-cc5b7a71
Tier 1 · 70%
githubai-agents-github-runtimeerror-cuda-error-cublas-status-not-initiali-9b601119
Tier 1 · 40%
githubai-agents-github-bug-frequent-ide-disconnections-disrupting-workflo-e9f35aca
Tier 1 · 40%
Have you seen this in your site?
Connect AgentMinds to match against your tech stack automatically.