mirror of
https://github.com/agentuniverse-ai/agentUniverse.git
synced 2026-02-09 01:59:19 +08:00
fix: revert error MCPToolkit method
This commit is contained in:
@@ -100,13 +100,23 @@ class MCPToolkit(Toolkit):
|
|||||||
origin_tool_name=tool.name,
|
origin_tool_name=tool.name,
|
||||||
args_model_schema=tool.inputSchema,
|
args_model_schema=tool.inputSchema,
|
||||||
input_keys=tool.inputSchema['required'],
|
input_keys=tool.inputSchema['required'],
|
||||||
transport=self.transport,
|
**self.get_mcp_server_connect_args()
|
||||||
url=self.url,
|
|
||||||
command=self.command,
|
|
||||||
args=self.args,
|
|
||||||
env=self.env,
|
|
||||||
connection_kwargs=self.connection_kwargs
|
|
||||||
)
|
)
|
||||||
|
# TODO The following revision still has issues that need to be fixed.
|
||||||
|
# tool_instance = MCPTool(
|
||||||
|
# name=tool_name,
|
||||||
|
# description=f'{tool.description}\n{str(tool.inputSchema)}',
|
||||||
|
# server_name=self.server_name,
|
||||||
|
# origin_tool_name=tool.name,
|
||||||
|
# args_model_schema=tool.inputSchema,
|
||||||
|
# input_keys=tool.inputSchema['required'],
|
||||||
|
# transport=self.transport,
|
||||||
|
# url=self.url,
|
||||||
|
# command=self.command,
|
||||||
|
# args=self.args,
|
||||||
|
# env=self.env,
|
||||||
|
# connection_kwargs=self.connection_kwargs
|
||||||
|
# )
|
||||||
ToolManager().register(tool_instance.get_instance_code(), tool_instance)
|
ToolManager().register(tool_instance.get_instance_code(), tool_instance)
|
||||||
|
|
||||||
def _initialize_by_component_configer(self, component_configer: ComponentConfiger) -> 'MCPToolkit':
|
def _initialize_by_component_configer(self, component_configer: ComponentConfiger) -> 'MCPToolkit':
|
||||||
|
|||||||
Reference in New Issue
Block a user