feat(MCP, microagent): MCP-support for Repo Microagent & add fetch as default tool (#8360)

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
Xingyao Wang
2025-05-17 07:32:38 +08:00
committed by GitHub
parent 819bad0777
commit 1f390430e5
20 changed files with 250 additions and 122 deletions

View File

@@ -17,7 +17,6 @@ from openhands.agenthub.codeact_agent.function_calling import (
from openhands.agenthub.codeact_agent.tools import (
FinishTool,
ThinkTool,
WebReadTool,
)
from openhands.agenthub.readonly_agent.tools import (
GlobTool,
@@ -191,16 +190,6 @@ def response_to_actions(
glob_cmd = glob_to_cmdrun(pattern, path)
action = CmdRunAction(command=glob_cmd, is_input=False)
# ================================================
# WebReadTool (simplified browsing)
# ================================================
elif tool_call.function.name == WebReadTool['function']['name']:
if 'url' not in arguments:
raise FunctionCallValidationError(
f'Missing required argument "url" in tool call {tool_call.function.name}'
)
action = BrowseURLAction(url=arguments['url'])
# ================================================
# MCPAction (MCP)
# ================================================
@@ -249,7 +238,6 @@ def get_tools() -> list[ChatCompletionToolParam]:
return [
ThinkTool,
FinishTool,
WebReadTool,
GrepTool,
GlobTool,
ViewTool,