feat: 重构 MCP 工具导出逻辑并完善返回值类型系统

This commit is contained in:
lilong.129
2025-05-31 00:28:24 +08:00
parent 2a392f204b
commit 9089bd9324
7 changed files with 924 additions and 52 deletions
+5
View File
@@ -82,6 +82,11 @@ func (c *MCPClient4XTDriver) Close() error {
return nil
}
// GetToolByAction implements ActionToolProvider interface
func (c *MCPClient4XTDriver) GetToolByAction(actionName option.ActionName) ActionTool {
return c.Server.GetToolByAction(actionName)
}
func (dExt *XTDriver) ExecuteAction(ctx context.Context, action MobileAction) (err error) {
// Find the corresponding tool for this action method
tool := dExt.client.Server.GetToolByAction(action.Method)