mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user