Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion mini_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,10 @@ async def run(self, cancel_event: Optional[asyncio.Event] = None) -> str:
else:
try:
tool = self.tools[function_name]
result = await tool.execute(**arguments)
# Filter arguments to only include parameters defined in tool schema
valid_params = tool.parameters.get('properties', {}).keys()
filtered_args = {k: v for k, v in arguments.items() if k in valid_params}
result = await tool.execute(**filtered_args)
except Exception as e:
# Catch all exceptions during tool execution, convert to failed ToolResult
import traceback
Expand Down